ArticlesMicro controllers

Everything about PIC Microcontroller

Today in this session we will learn Everything about PIC Microcontroller in a detail. The PIC microcontroller contains a processor, memory, and input/output ports, and the program is stored in flash ROM memory in numbered locations. So without wasting time lets dive into the topic.

Introduction to PIC Microcontroller

There are three main components of a computer or digital controller: input and output devices, to communicates with the outside world. Processor, to calculate and handle Data operations; And memory to store, programs, and data. The range of available PIC Microcontrollers is expanding rapidly.

The first widely used, the Intel 8051, was developed with an early Intel PC processor, such as the 8086. This tool dominated the area for a while; Others appear only slowly, especially as complex processors for applications such as engine management systems.


These devices were relatively expensive, so they were only reasonably priced Products. The potential for microcontrollers seems to be slowly being realized.

Evolution of PIC Microcontroller

The development of the Flash ROM helped open the market and was one of the microchips to Take advantage of first. Cheap and reprogrammable PIC16F84 became the most widely known. Basically, it is fastly becoming the number one tool for students and hobbies.

Features of PIC Microcontroller

The range of microcontrollers has now evolved as features of the MCU.
It should be as close as possible to the actual requirements used in any particular circuit. Here are some key features to consider:

  • The number of inputs and outputs.
  • Program memory size.
  • Data RAM size.
  • Unnecessary data memory.
  • Maximum clock speed.
  • Interface The scope of the interface.
  • Development system support.
  • Cost and availability.

The most important difference between PIC chips is the instruction size, which can be 12, 14, or 16 bits. The suffix A indicates that the chip has a maximum clock speed of 20 MHz, a major upgrade from the original 16F877 device. These chips may be identical. The suffixes are optional for many purposes. Often this microcontroller is programmed using MPLABX IDE.

Registers on PIC Microcontroller

Each PIC microcontroller has a set of registers that act as RAM (random access memory). Special purpose control registers for on-chip hardware resources are mapped to the data space. Each PIC has a stack that saves return addresses. The software was not accessible in older versions of Stack PIC, but this restriction was later removed on this device.

Key features of PIC include wide availability, low cost, ease of reprogramming with built-in EEPROM (electrically removable programmable read-only memory), a wide collection of free application notes, ample development tools, and a great deal of information available on the Internet. Actually, PIC microcontrollers often appear under the brand name PICmicro.

PIC Microcontroller Pin configuration

When programming a PIC microcontroller, some operational modes will have to be set Before downloading the main program. These are controlled by individual bits in a special configuration register separated from the main memory block. The main options are As follows.

  • Clock vibration type
  • Watchdog, power-up, gray-out timers
  • Low voltage programming
  • Code security
  • Circuit debug mode

PIC16F877 MCU block diagram

PIC16F877 MCU block diagram
PIC16F877 MCU block diagram

The PIC architecture consists of two memories: program memory and data memory.

Program memory:

This is 4K * 14 memory space. It is used to store 13-bit instructions or program code. Program memory data is accessed by the program counter register. which contains the address of the program memory. Address 00000H is used as reset memory space and 0004H resistor is used as memory space.

Data memory:

Data memory consists of 368 bytes of RAM and 266 bytes of EEPROM. RAM consists of 368 bytes of multiple banks. Each bank has general-purpose registers and special function registers.

Special Function Registers

Special function registers contain control registers to control various operations of chip resources. Such as timers, digital converters analog, serial ports, I / O ports, etc. For example, the TRISA register whose bits can be changed to change the input or the output function of port A

General Purpose Registers

General-purpose registers are registers that are used to store temporary data and processing results. These general-purpose registers are each 8bit registers.

Working Register:

It consists of a memory space that stores operands for each instruction. It also stores the results of each implementation.

Status Register:

The bits of the position register indicate the position of the ALU (arithmetic logic unit) after each execution of the instruction. This is also used to select one of the 4 banks’ of RAM.

File selection register:

It serves as an indicator of any other general purpose register. It contains a register file address, and it is used as an indirect address.

Another common purpose register is the program counter register. which is a 13-bit register. Upper 5-bits are used as PCLATH (program counter latch) others act independently as other registers, and lower 8 – bits are used as program counter bits. The program counter acts as an indicator of instructions stored in program memory.

EEPROM:

It contains 256 bytes of memory space. It is a permanent memory like ROM, but its contents can be deleted and changed during the operation of the microcontroller. The contents of EEPROM can be read using special function registers such as EECON1, EECON, etc.

Wrapping up

Finally, today we have learned Everything about PIC Microcontroller. I hope this short and sweet article was helpful for you. If you have any doubts or queries then do let me know them in the comments below.

Recommended Readings:

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button