PIC Microcontrollers from Microchip is a popular choice for creating microcontroller-based projects. It has a wide range portfolio which you can select depending on the requirements of your project. And it is easy to get started because of a lot of materials already available
Whether you are a beginner trying to blink an LED or an advanced developer processing input from different sensors, you can always find the PIC that suits your needs and supporting documents to help you get started.
What is a microcontroller?
A microcontroller is an inexpensive single chip computer and it consists of the following major units:
Processor or CPU is the brain of the PIC Microcontroller. It is responsible for fetching, decoding and executing instructions.
- Memory (ROM, RAM, EEPROM)
Memory is used to store data and program.
- Input / Output Ports
The I/O ports are mainly utilized for interfacing or driving various components like sensors, displays, etc. to a PIC Microcontroller.
It also contains three or more of the following peripherals:
ADC (Analog-to-Digital Converters) are used for converting signals to digital signals. The output signal are then used for various applications.
DAC performs the reverse of ADC. It converts the digital signal fed to the microcontroller to an analog signal.
One of the most useful peripheral in a PIC microcontroller. It provides timing and counting functionality.
- Serial Ports
Provide various serial interfaces between an mcu and other peripherals.
Architecture of a PIC Microcontroller
PIC microcontrollers are based on advanced RISC architecture. RISC is short for Reduced Instruction Set Computer. This architecture utilizes a small, highly-optimized set of instructions which increases the speed of the system.
For the internal data transfer, the PIC MCU follows the Harvard architecture. In the Harvard architecture, it uses separate memories for program and data which are accessed by the cpu through different buses. This has a faster performance compared to Von Neumann architecture where the program and data uses the same memory and are fetched from the same bus.
How to select a PIC Microcontroller
Each PIC microcontroller offers different combinations of features. Thus, when selecting a PIC microcontroller for a project you will have to select the mcu that best fits to your needs. The following are the main criteria that you have to consider when selecting an mcu:
- Available I/O pins
- RAM Size
- ROM Size
- Will you need an EEPROM?
- Number of timer peripherals
- Will you need an 8-bit timer? a 16-bit timer? or both?
- Interrupt sources
- Analog input
- Communication interfaces (USART, SPI, I2C, CAN)
- Will you require an internal oscillator?
- In-circuit debugging
- Package type (DIP, SOIC, PLCC, QFP)
After establishing your hardware requirements, you can now determine the PIC microcontroller that best fits your project. You can then input your required parameters in Microchip’s Advanced Part Selector to see which PIC Microcontroller best fits your specifications.
Recommended PIC Microcontroller Projects for Beginners
- Up / Down Counter
Using a PIC Microcontroller connect a seven segment display and two buttons. The seven segment will display the values from 1 to 99. When a button is pressed, increment the counter and if button B is pressed decrement the counter. The initial value displayed on microcontroller reset is 1.
- Traffic Light
Connect LEDs to the PIC Microcontroller and simulate the behavior of a traffic light.
- LED Binary Clock
Attach LEDs to the PIC Microcontroller and program it to tell time using binary numbers.