Using Interrupt with PIC Microcontroller

Introduction Interrupt is the one of the most powerful feature in embedded applications. Almost all the real time applications are implemented using Interrupts. So what is an Interrupt...?? As the name suggests Interrupts are special events that requires immediate attention, it stops a microcontroller/microprocessor from the running task and to serve a special task known as Interrupt Service Routine (ISR) or Interrupt Handler. Suppose you are at home, taking coffee. Suddenly your mobile phone rings. You stop taking coffee and answer the call. When you have...

Using Analog Comparator in PIC Microcontroller

Comparator Module in PIC Analog Comparator is a device which compares two voltage signals and switches its output to indicate which one is larger. The analog comparator is used in many applications such as battery charger, analog to digital converters, IR sensors where we need to compare two signals. Most of the PIC Microcontrollers have built in Comparator Module which makes ease of design and saves cost. For demonstration, we use PIC16F877A. PIC16F877A consists of two analog comparators which can be used in eight different...

Interfacing EEPROM with PIC Microcontroller

What is an EEPROM ? EEPROM is an abbreviation for Electrically Erasable  Programmable Read Only Memory and it is a Non-Volatile memory. It is used in computers and other electronic devices to store data that must me saved during no power supply. EEPROM is a class of ROM (Read Only Memory) which can be electrically erased in bit by bit and able to store new data. A small amount of EEPROM (usually 128/256 bytes) is available internally with PIC Microcontrollers. I have already posted about Using...

Interfacing Matrix Keypad with PIC Microcontroller using MikroC Library

I already posted about Interfacing Matrix Keypad with PIC Microcontroller with some user-defined functions. Advantages in using user-defined functions are we can extend it up to any number of keys and able to customise according to our application. The MikroC Pro for PIC Microcontrollers provides a library for working with 4*4 keypad. It can also be used to interface 4*3, 4*2 and 4*1 keypads. MikroC provides the following three functions to interface Matrix Keypad. Keypad_Init Keypad_Key_Press Keypad_Key_Click Keypad_Init Prototype: void Keypad_Init(void); It initializes a particular port for working with keypad. A global...

Using Internal EEPROM of PIC Microcontroller

There are commonly three types of memories in a PIC Microcontroller, Flash Program Memory, Data Memory (RAM) and EEPROM Data Memory. We write Programs in the Flash Program Memory of a microcontroller. Flash memory makes it possible to program a microcontroller many times before installing to device and even after the installation we can change the program. RAM Data Memory is used for storing data temporarily during program execution and it is volatile. That is, this memory is cleared when the power...

Interfacing Servo Motor with PIC Microcontroller

Servo Motor uses error sensing negative feedback to control the precise angular position. Servos are used for precise positioning in robotic arms, legs, RC Aeroplanes, Helicopters etc. Please read the article Servo Motor for more information about its working and construction. Hobby Servo Motors have three wires, two of them (RED and BLACK) are used to given power and the third one is used to give control signals. Servo can be easily be controlled using microcontrollers using Pulse Width Modulated (PWM) signals on  the...

Interfacing Stepper Motor with PIC Microcontroller

Introduction A Stepper Motor is a brushless, synchronous DC electric motor, which divides the full rotation into a number of equal steps. It finds great application in field of microcontrollers such as robotics. Please refer the article Stepper Motor or Step Motor for detailed information about working of stepper motor, types and modes of operation. Unipolar Motor is the most popular stepper motor among electronics hobbyist because of its ease of operation and availability. Here I explaining the working of Unipolar and Bipolar Stepper Motor...

Reading Multiple Pressed Keys from Matrix Keypad using PIC Microcontroller

I have already post about Interfacing Matrix Keypad with PIC Microcontroller. I suggest to read that article before reading this. In some applications it may require to scan more than one key at a time. Reading Multiple Pressed Keys from Matrix Keypad is not simple as reading Single key. We want to change the program as well as the circuit of matrix keypad for reading multiple keys. The main problem is unexpected shorts may come to act when we press more...

>