Saturday, June 23, 2012

Why use the PIC

Code Efficiency The PIC is an 8 bit Microcontroller based on the Harvard architecture – which means there are separate internal busses for memory and data. The throughput rate is therefore increased due to simultaneous access to both data and program memory. Conventional microcontrollers tend to have one internal bus handling both data and program. This slows operation down by at least a factor of 2 when compared to the PICmicro®MCU.

Safety All the instructions fit into a 12 or 14 bit program memory word. There is no likelihood of the software jumping onto the DATA section of a program and trying to execute DATA as instructions. This can occur in a non Harvard architecture microcontroller using 8-bit busses.

Instruction Set There are 33 instructions you have to learn in order to write software for the 16C5x family and 14 bits wide for the 16Cxx family. Each instruction, with the exception of CALL, GOTO or bit testing instructions (BTFSS, INCFSZ), executes in one cycle.


Speed The PIC has an internal divide by 4 connected between the oscillator 13 and the internal clock bus. This makes instruction time easy to calculate, especially if you use a 4 MHz crystal. Each instruction cycle then works out at 1 uS. The PIC is a very fast micro to work with e.g. a 20MHz crystal steps through a
program at 5 million instructions per second! – almost twice the speed of a 386SX 33!

Static Operation The PIC is a fully static microprocessor; in other words, if you stop the clock, all the register contends are maintained. In practice you would not actually do this, you would place the PIC into a Sleep mode – this stops the clock and sets up various flags within the PIC to allow you to know what state it
was in before the Sleep. In Sleep, the PIC takes only its standby current which can be less the 1uA.

No comments:

Post a Comment