{"id":11,"date":"2012-04-19T11:02:39","date_gmt":"2012-04-19T10:02:39","guid":{"rendered":"http:\/\/www.kanda.com\/blog\/?p=11"},"modified":"2012-04-26T14:45:57","modified_gmt":"2012-04-26T13:45:57","slug":"pic-microcontroller","status":"publish","type":"post","link":"https:\/\/www.kanda.com\/blog\/microcontrollers\/pic-microcontrollers\/pic-microcontroller\/","title":{"rendered":"PIC Microcontroller"},"content":{"rendered":"
PIC microcontrollers are manufactured by Microchip<\/a><\/p>\n They cover a huge range of devices, from tiny 8-bit microcontrollers to 32-bit advanced PIC32 devices. All PIC microcontrollers use Harvard architecture, which means that they have separate buses for data and instructions. If a device is called an 8-bit microcontroller, this means that its data bus is 8-bit, a 16-bit device has a 16-bit data bus and, guess what, a 32-bit microcontroller has an 32-bit data bus. The instruction bus is always bigger, and different 8-bit PIC families have various sizes of instruction. The bigger the instruction bus, the bigger the memory that can be accessed with each instruction, as part of the instruction can include an address.<\/p>\n The F means that devices have flash memory, so they can be reprogrammed lots of times, including in circuit. Older C devices are OTP, One Time Programmable, except PIC16C84 that has EEPROM so can be reprogrammed. In this day and age, avoid using C devices unless you are using millions of them!<\/p>\n All 8-bit PIC microcontrollers have a reduced instruction set (RISC). This makes execution much faster than earlier microcontrollers such as 8051 and this coupled with lower cost made the PIC so successful. The baseline PIC devices only have 35 different instructions but this has increased to 80 in the later high end core, mainly to\u00a0accommodate\u00a0the needs of efficient C compilers.<\/p>\n Apart from the core, all PIC devices have a range of peripherals built-in. These include timers, communication channels like UART, I2C and SPI plus ADC, Analog comparators and PWM for analog work. They also come with different amounts of I\/O pins:<\/p>\n Available program memory also varies with the different families:<\/p>\n There are hundreds of different PIC microcontrollers available, so where do you start if you are a beginner? If you have a particular project in mind, the main factor is the pin count, which is harder to alter later. Versions with more memory have the same pin layout as smaller memory devices, so it is easier to upgrade to more memory later if you need to. This is one of the better features of the PIC family,\u00a0consistent\u00a0pin layout.<\/p>\n If you want to learn PIC microcontroller<\/a> programming from scratch, we suggest that the mid-range PIC16F series is the place to start, in particular the PIC16F887<\/a>. This is the replacement for the popular PIC16F877 but is half the price. The web is littered with code examples for this device, it is 40-pin and has 14KB of program memory, making it a flexible first choice.<\/p>\n As well as the code memory, it has 256 bytes of EEPROM memory for storing data such as serial numbers, or configuration parameters. Its instruction set is pretty good and free C compilers produce reasonable code,although we believe that you should start in assembler so that you develop more understanding of the structure and how microcontrollers work.<\/p>\n Once you have learnt to code for a PIC16F microcontroller, then you can upgrade to PIC18F series if you need more memory, more pins or faster speed. Kanda have a PIC training kit<\/a> that starts with PIC16F887 and then moves on to PIC18F, using both assembly code and C programming, and it includes a book to get you going.<\/p>\n <\/p>\n","protected":false},"excerpt":{"rendered":" PIC microcontrollers are manufactured by Microchip They cover a huge range of devices, from tiny 8-bit microcontrollers to 32-bit advanced PIC32 devices. All PIC microcontrollers use Harvard architecture, which means that they have separate buses for data and instructions. If a device is called an 8-bit microcontroller, this means that its data bus is 8-bit, … Continue reading PIC Microcontroller<\/span>
\n
\nLater PIC families have a 16-bit data bus, which include PIC24 and dsPIC series so these are 16-bit microcontrollers but they have a 24-bit instruction bus, hence the PIC24 name. PIC32 series have 32-bit data bus.<\/p>\n\n
\n
\n