Tutorial

PIC Microcontroller

Contact us at any time

Door No.510
Samastha jubilee memorial soudham
Mele-thampanoor
Thiruvananthapuram
Kerala-695001
Ph:+91 9633 11 80 80
Email:info@hexcodeplus.com

Enquire and suggestions

Whatsapp +91 9633 11 80 80

Introduction to PIC Microcontroller

PIC Microcontroller

The PIC microcontroller is having the real name as ‘PICmicro’, but generally in current scenario is called as PIC(Peripheral Interface Controller) only. Its first chip version was designed in 1975 by General Instruments. That chip called “PIC1650” was meant for totally different purposes. After ten years later, by adding EEPROM memory to that microcontroller, that was transformed into a real PIC microcontroller. In current microcontroller industry, Microchip Technology announces a manufacturing of the 5 billionth samples of microcontrollers.

Harvard architecture is used in all PIC microcontrollers. That means, the program memory is connected to CPU via more than 8 lines. There are 12, 14 and 16 bit microcontrollers depending on the bus-width.
The 8 bit PIC Microcontroller is classified as Four based on the architecture:

1) Base Line PIC:

These are the least complex PIC microcontrollers. They work on 12 bit instruction architecture. That means, the word size of instruction sets are of 12 bits. These are the cheapest and smallest PICs, available with 6 to 40 pin packaging.

2) Mid-Range PIC:

This category based on 14 bit instruction architecture. Can work up to 20 MHz speed. Available with 8 to 64 pin packaging. These having different peripherals like ADC, PWM, Op-Amps and different communication protocols like USART, SPI, I2C (TWI), etc.

3) Enhanced Mid-Range PIC:

These are enhanced version of Mid-Range core. It provides additional performance, greater flash memory and high speed at very low power consumption. It also includes multiple peripherals and supports protocols like USART, SPI, I2C etc.

4) PIC18 Family:

It is having 16 bit instruction architecture incorporating advanced RISC architecture. That makes it as highest performer among the all 8 bit PIC families. Those are integrated with new age communication protocols like USB, CAN, LIN, Ethernet (TCP/IP protocol) to communicate with local and/or internet based networks.

Generally, PIC microcontrollers are available with different memory options. Those are mask ROM, EPROM and flash memory. They are denoted with different symbols such as given in the following table:



PIC Microcontroller Architecture:

The PIC microcontroller architecture includes CPU, Input/output ports, and memory organization, Analogue to Digital converter, timers/counters, interrupts, serial communication, Oscillator, and CCP module.

pic architecture

Flash memory

Program storage area is known as flash memory. It gives the most important benefit for using a PIC microcontroller that it can program many times. That is, it can be re-programmed up to 100,000 times (probably more) as they use Flash memory. There is also available One Time Programmable (OTP) types that can once programmed, but can't program it again!

ICSP

The Circuit Serial Programming (ICSP) is the next most important benefit while using PIC family. Instead of transferring the IC from the programmer, the development board just leave it in the board. By arranging the programming connections, the circuit correctly won't need to remove the chip! It can re-program the device while it's still in the circuit so once the programme is setup.

I/O Ports

Input / Output ports (I/O Ports) let us to communicate with the outside world. It can control LEDs, LCDs or just about anything with the right interface. It can set them as inputs to gather information.

Pin direction

Most PIC microcontroller pins can be set as an input or and output pin. The TRIS register controls the I/O directions. And this used to set a bit in this register to zero sets the pin as output; while setting it as one sets the pin as input.

Current

High current ports capable of directly driving LEDs along PIC I/O Ports (up to 25ma output current) .Total current allowed usually ~200mA.

CCP module

It stands for Capture/Compare/PWM. It works in three modes:
Capture Mode:It captures the time of arrival of a signal, or in other words. When the CCP pin goes high, it captures the value of the Timer 1.
Compare Mode:It acts as an analogue comparator. When the Timer 1 value reaches a certain reference value, then it generates an output.
PWM Mode:It provides pulse width modulated output with a 10 bit resolution and programmable duty cycle.

Interrupts

PIC microcontroller consists of 20 internal interrupts and 3 external interrupt sources which are associated with different peripherals.

Timer / Counters

PIC microcontroller has three timers; Timer 0, Timer 1 and Timer 2. That can either use as a timer or a counter (Timer 0 & 1) or a baud clock (Timer 2).

USART

To transmit and receive the data, bit by bit, over a single wire with respect to clock pulses. PIC microcontroller has two pins TXD and RXD. These pins are used for transmitting and receiving the data serially.

Random Access Memory (RAM)

RAM is an unstable memory which is used to store the data temporarily in its registers. The RAM registers are classified into two types:
1. Special Function Registers (SFR)
2. General Purpose Registers (GPR)

Read Only Memory (ROM)

ROM is a stable memory which is used to store the data permanently. The ROM is also called as program memory.


Follow us

Tutorials / Code