Know about Peripheral Interface Controller Architecture and Its Working

PIC Microcontroller Architecture

PIC Microcontroller Architecture

The term PIC stands for the peripheral interface controller was developed in the year 1993 by “Microchip Technology”. Firstly, this controller was developed for supporting PDP computer to regulate its peripheral devices, and thus, termed as a peripheral interface device.PIC microcontrollers are very fast and executing a program can be made easy compared with other controllers. The architecture of this microcontroller based on “Harvard architecture”. The specifications of this microcontroller include wide availability, ease of programming, serial programming capacity, large user base, interfacing of microcontroller with other peripherals, etc.

What is a Peripheral Interface Controller?

PIC (peripheral Interface Controller) is the world’s smallest microcontroller that can be programmed to carry out a vast range of tasks. These programming and the simulated process of this microcontroller can be done by a circuit-wizard software. PIC microcontroller is an IC and its architecture comprises of CPU, RAM, ROM, timers, counters and protocols like SPI, UART, CAN which are used for interfacing with other peripherals. Applications of microcontroller include industrial purpose. The advantages of using this microcontroller include low power consumption, high performance, supports hardware and software tools such as simulators, compilers, and debuggers.

Peripheral Interface Controller

Peripheral Interface Controller

Peripheral Interface Controller Architecture

The architecture of Peripheral Interface Controller comprises of central processing unit (CPU), I/O ports, A/D converter, memory organization, timers/counters, serial communication, interrupts, oscillator and CCP module that are discussed in detailed below.

Architecture of PIC Microcontroller

Architecture of PIC Microcontroller

Central Processing Unit (CPU)

PIC microcontroller’s CPU is not different like other microcontroller CPU, which includes the ALU, controller unit, the memory unit, and accumulator. ALU is mainly used for arithmetic and logical operations. The memory unit is used to store the commands after processing. The control unit is used to control the internal & external peripherals, and the accumulator is used to store the final results and further process.

Memory Organization

The memory module in the PIC microcontroller architecture consists of Random Access Memory, Read Only Memory and STACK.

Memory Organization

Memory Organization

RAM (Random Access Memory)

RAM is used to store the information temporarily in its registers. It is categorized into two banks, each bank has so many registers. The RAM registers are categorized into two types, namely SFR (Special Function Registers) and GPR (General Purpose Registers).

GPR (General Purpose Registers)

As the name implies, these registers are used for general purpose only. For instance, if we want to multiply any two numbers by using this microcontroller. Usually, registers are used for multiplying and storing in other registers. So, GPR registers don’t have any superior function,- CPU can simply access the data in the registers.

Special Function Registers

As the name implies, SFRs are used only for special purposes. These registers will work based on the function assigned to them, and these registers cannot work as a normal register. For instance, if you cannot use the STATUS register for storing the information, SFRs are used for viewing the status of the program. So, a consumer cannot change the SFR’s function; the function is given by the retailer at the time of built-up.

Memory Organization

The memory organization of Peripheral Interface Controller includes the following

  • Read Only Memory (ROM)
  • Electrically Erasable Programmable Read Only Memory (EEPROM)
  • Flash Memory
  • Stack

I/O Ports

The PIC microcontroller consists of 5-ports, namely Port A, Port B, Port C, Port D and Port E.

BUS

BUS is used to transfer & receive the data from one peripheral to another. It is categorized into two types like data bus and address.Data Bus is used to transfer or receive the data.

BUS

BUS

The address bus is used to transfer the memory address from the peripherals to the central processing unit. Input/Output pins are used to interface the exterior peripherals; both the UART & USART are serial communication protocols, used to interface with serial devices such as GPS, GSM, IR, Bluetooth, etc.

A/D Converters

A/D converter is used to convert analog voltage values to digital voltage values. An A/D module in Peripheral Interface Controller comprises of 5-inputs for 28-pin devices & 8-inputs for 40-pin devices. The operation of the A/D converter is controlled by special registers like ADCON0 & ADCON1. The upper and lower bits of the converter are stored in registers like ADRESH and ADRESL. In this process, it needs 5V of an analog reference voltage.

Analog to Digital converter

Analog to Digital converter

Timers/ Counters

PIC microcontroller has four-timer/counters wherein the one 8-bit timer and the remaining timers have the choice to select 8 or 16-bit mode. Timers are used for generating accuracy actions, for example, creating specific time delays between two operations.

Interrupts

PIC microcontroller consists of 20 internal & 3-external interrupt sources which are allied with different peripherals like USART, ADC, Timers, and so on.

Serial Communication

Serial communication is the method for transferring one-bit data at a time sequentially over a communication channel.

Serial Communication

Serial Communication

USART

The term USART stands for “Universal synchronous and Asynchronous Receiver” and Tx which is a serial communication for two protocols. USART is used for transmitting & receiving the data bit by bit over a single wire with respect to CLK pulses. The Peripheral Interface Controller consists of two pins TXD & RXD. These pins are used for transmitting & receiving the data serially.

SPI Protocol

The term SPI (Serial Peripheral Interface) is used to send information between PIC microcontroller and other peripherals like sensors, SD cards, and shift registers. This microcontroller supports 3-wire SPI communications between two devices on a common CLK source. The data rate of this protocol is more than that of the USART.

I2C Protocol

The term I2C stands for “Inter-Integrated Circuit”, and it is a serial protocol, used to connect low-speed devices like EEPROMS, A/D converters, microcontrollers, etc. PIC microcontroller supports this communication between two devices which can work as both Master & Slave device.

Oscillators

Oscillators are used for timing generation. This microcontroller comprises of external oscillators such as crystal oscillators or RC oscillators.Where the crystal oscillator is associated with the two pins of the oscillator. The capacitor value is connected to each pin that chooses the operation mode of the oscillator. These modes are the high-speed mode, crystal mode, and the low-power mode. In the case of RC oscillators, the resistor value and capacitor decide the CLK frequency and the clock frequency range from 30KHz to 4MHz.

CCP Module

The term CCP stands for “capture/compare/PWM” where it works in 3-modes such as compare mode, capture mode, and PWM mode.

Capture Mode

This mode captures the signal arrival time, or in other words, when the pin of this mode goes high, it captures the Timer1 value.

Compare Mode

Compare mode performances as an analog comparator. When the value of the timer1 reaches a certain reference value, then it produces an o/p.

PWM Mode

The PWM mode offers pulse width modulated o/p with a 10-bit resolution and programmable duty cycle.

Applications of Peripheral Interface Controller

The applications of PIC microcontroller involve in peripherals, video games, audio accessories, etc. For a better understanding of this microcontroller, the following project demonstrates its operation.

Street Light that Glows on Detecting Vehicle Movement

The main objective of this project is to notice the movement of vehicles on highways to turn on a block of street lights ahead of it, and also turn off the lights to protect energy. In this project, a Peripheral Interface Controller is done by using embedded C or assembly language.

Street Light that Glows on Detecting Vehicle Movement by Edgefxkits.com

Street Light that Glows on Detecting Vehicle Movement by Edgefxkits.com

The power supply circuit of this project includes a stepping down, rectifying, filtering and regulating AC mains supply. When there are no vehicles on the road, then all street lights will turn OFF so that the power can be saved. The infrared sensors are located on the road to detect the movement of vehicles. When there are vehicles on the road, then the sensor detects the vehicle movement instantly, it sends the commands to the microcontroller to turn ON the LEDs. A bunch of LEDS will be turned ON when a vehicle come near to the sensor and once the vehicle passes away from the sensor the light intensity will become lower than the light emitting diodes will turn OFF

Thus, this is all about the peripheral interface controller architecture. Apart from this, for any assistance regarding any electrical and electronic projects, you can contact us by commenting in the comment section below. Here is a question for you, What is the difference between PIC and 8051 microcontroller?

Add Comment

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