The term PIC, or Peripheral Interface Controller, has been coined by Microchip technology to identify its single chip microcontrollers. PIC microcontrollers possess an array of features that make them attractive for a wide range of applications. Furthermore these microcontrollers are available with a range of capabilities, packaged in both dual-in-line(DIP) packages and surface-mount packages. Factors that account for the wide popularity of PIC microcontrollers include the following:
- Speed: When operated at its maximum clock rate, a PIC executes most of its instructions in 0.2µs, or 5 instructions per microsecond.
- Instruction set simplicity: The instruction set consists of just 35 instructions.
- Integration of operational features: Power-on Reset and Brown –out protection insure that the chip operates only when the supply voltage is within specification. A watchdog timer resets the PIC if the chip ever malfunctions and deviates from its normal operations.
- Programmable timer options: The versatile timers can characterize inputs, control outputs and provide timing for program execution.
- Interrupt control: Up to 12 independent interrupt sources can control when the CPU will deal with each source.
- Powerful output pin control: A single instruction can select and drive a single output pin high or low in its 0.2µs instruction execution time. The pin can drive a load of up to 25mA.
- I/O port expansion: The built-in serial peripheral interface can make use of standard 16-pin shift register parts to add any number of I/O pins.
- Serial programming via two pins: The simplicity of programming hardware supports the availability of PIC programmers for under $100.
PICs use a RISC instruction set, which varies in length from about 35 instructions for the low-end PICs to about 70 instructions for the high-end PICs. The instruction set includes instructions to perform a variety of operations on the accumulator and a constant or the accumulator and a memory location, as well as for conditionally executing code and jumping/calling other parts of the program and returning from them, and specific hardware features like interrupts and one low-power mode called sleep. Microchip provides a freeware IDE package called MPLAB, which also includes a software simulator as well as an assembler.
The word size of PICs is a source of much confusion. All PICs (except dsPICs and PIC24s) handle data in 8-bit chunks, so they should be called 8-bit microcontrollers. But unlike most CPUs, PICs use Harvard architecture, so the size of an instruction can be different from the size of the data. In fact, different PIC families use different instruction sizes, which make it a challenge to compare the code size of PICs to other microcontrollers. For example, say a microcontroller has 6144 bytes of program memory. For a 12-bit PIC, this works out to 4096 words (or assembly instructions); for a 16-bit PIC, this is 3072 words.
PICmicro devices are grouped by the size of their instruction word and their instruction set. The four current PICmicro families and their instruction word length are:
- Base-Line: 12-bit instruction Word length
- Mid-Range: 14-bit instruction Word length
- High-End: 16-bit instruction Word length
- Enhanced: 16-bit instruction Word length
The PIC18FXXX MCU family belongs to the Enhanced MCU family of devices. These devices have full-speed USB support, all sorts of inbuilt hardware and are very powerful and versatile.
Microchip offers three program memory types. The memory type is designated in the part number by the first letter(s) after the family affiliation designators.
- C, as in PIC18CXXX. These devices have EEPROM type memory.
- CR, as in PIC18CRXXX. These devices have ROM type memory.
- F, as in PIC18FXXX. These devices have FLASH type memory.
The PIC18FXXX family offers the advantages of all PIC18 microcontrollers-namely, high computational performance at an economical price-with the addition of high-endurance, Enhanced flash program memory.
Microchip offers a wide range of development tools that allows users to efficiently develop and debug application code. Microchip’s development tools can be broken down into four categories:
- Code generation
- Hardware/Software debug
- Device programmer
- Product evaluation boards
All tools developed by Microchip operate under the MPLAB@ Integrated Development Environment (IDE).