CLICK here for a quick PIC microcontroller tutorial
PIC microcontroller is very convenient choice to get started with a microcontroller projects. In this tutorial we will study:
A Microcontroller is an inexpensive single-chip computer. The microcontroller’s most important feature is its capabilities of STORING and RUNNING a program.
Every Microcontroller (also MCU) consists of several major units:
Characteristics of the RISK (Reduce Instruction Set Control) system:
Microcontrollers PICmicro MCU from Microchip Company divided into 4 large families. Each family has a variety of components that provide built-in special features:
CLICK here to learn more about PIC microcontrollers from Microchip
Each type of PIC microcontroller provides a different combination of features, thus the most suitable can be selected for any given application. Some of the main selection criteria are:
When developing an embedded system, the number and type of inputs and outputs need to be determined. After the hardware requirements have been established, the program need to be written and tested. Once the size of the program known, the chip memory size can be determined.
The following table is the summary information for selected PIC flash microcontrollers as a guide to the features available:
PIC # | # of pins | I/O pins | Program
ROM words | File
RAM bytes | EEPROM bytes | Analogue inputs | Timers
8/16 bits | Max clock (MHz) | Internal osc. (MHz) | In-circuit debug | Serial comms |
12F675 | 8 | 6 | 1k | 64 | 128 | 4x10-bit | 1/1 | 20 | 4 | YES | NO |
16F628A | 18 | 16 | 2k | 224 | 128 | NO | 2/1 | 20 | 4 | NO | UART |
16F630 | 14 | 12 | 1k | 64 | 128 | NO | 1/1 | 20 | 4 | YES | NO |
16F648A | 18 | 16 | 4k | 256 | 256 | NO | 2/1 | 20 | 4 | NO | UART |
16F676 | 14 | 12 | 1k | 64 | 128 | 8x10-bit | 1/1 | 20 | 4 | YES | UART |
16F73 | 28 | 22 | 4k | 192 | NO | 5x8-bit | 2/1 | 20 | NO | NO | ALL |
16F77 | 40 | 33 | 8k | 368 | NO | 8x8-bit | 2/1 | 20 | NO | NO | ALL |
16F818 | 18 | 16 | 1k | 128 | 128 | 5x10-bit | 2/1 | 20 | 8 | YES | I2C,SPI |
16F84 | 18 | 13 | 1k | 64 | 64 | NO | 1/0 | 10 | NO | NO | NO |
16F84A | 18 | 13 | 1k | 64 | 64 | NO | 1/0 | 20 | NO | NO | NO |
16F88 | 18 | 16 | 4k | 368 | 256 | 7x10-bit | 2/1 | 20 | 8 | YES | ALL |
16F874A | 40 | 33 | 4k | 192 | 128 | 8x10-bit | 2/1 | 20 | NO | YES | ALL |
16F876A | 28 | 22 | 8k | 256 | 368 | 5x10-bit | 2/1 | 20 | NO | YES | ALL |
16F877A | 40 | 33 | 8k | 256 | 368 | 8x10-bit | 2/1 | 20 | NO | YES | ALL |
18F2320 | 28 | 25 | 4k | 512 | 256 | 10x10-bit | 1/3 | 40 | 8 | YES | ALL |
18F6520 | 64 | 52 | 16k | 2048 | 1024 | 12x10-bit | 1/3 | 40 | NO | YES | ALL |
18F8621 | 80 | 68 | 32k | 3840 | 1024 | 16x8-bit | 1/3 | 40 | 10 | YES | I2C,SPI |
18F8720 | 80 | 68 | 64k | 3840 | 1024 | 16x10-bit | 1/3 | 40 | NO | YES | ALL |
Source: "PIC microcontrollers" by Martin Bates
The PIC16 family is the most common used family from the PIC families. Compared to PIC 17/18 families, the PIC16 family are easy to study and can be used to create “smart” applications.
The great advantage of this PIC is a Flash memory, allowing to burn to the memory unlimited number of times. You can write the program and burn it to the memory inside the microcontroller.
You conduct a test of what was written on the assembled circuit. If you find a mistake or want to make another change in the program, after the change, you can burn the new program once again to the same microcontroller. During the burning process, the old program is deleted, and instead the new program is burned to the FLASH memory. This process can be to done tens of thousands of times. Another advantage is that the price is low.
The PIC microcontrollers are widely used in industry and education fields (projects, labs). In fact, almost any systems where there is a need to control certain processes, to obtain information from external sources, and interpret collected information, the microcontrollers is used.
For example, the ABS (an Anti-lock Braking System) is a safety system which prevents the wheels on a motor vehicle from locking while braking, includes a microcontroller. Likewise, all electronics devices in the household are based on microcontrollers, because there is need to monitor certain processes or perform some actions.
"Car with remote control” - This project includes a simple transmitter and receiver. One microcontroller is located inside the car and the other inside the remote.
"Voice recognition" – This project includes a microcontroller with A/D converter. Let’s assume the user records a name and the phone number. The information will be converted to digital information and will be stored in the memory. At any time, the user can speak up the desire name and microcontroller, after recognizing the name, will display the phone number.
"Smart Car" - This project includes two sensors. The 2 sensors are connected to the microcontroller and transmitting a comprehensive data on: