This tutorial explains how to read the content of the microcontroller’s flash memory. The source microcontroller reads the content of the memory and displays it on the LEDs. The content is nothing but the program written in the memory of microcontroller. This step is often used to verify whether microcontroller has been correctly programmed or…
AT89S51/52 ISP Programmer – Signature Byte Read
The Signature Byte is a unique sequence of bytes which are used to identify the chip. It is written in the memory of the chip during the manufacturing process and cannot be changed. These memory locations are read only. Every chip manufactured by a company with the same number has the same signature byte.…
AT89S51/52 ISP Programmer – Erase
This is the first operation that needs to be performed on the target microcontroller. It is assumed that the target microcontroller has some code in its flash memory. If it does not has any content, write any program in the memory using a programmer. Whenever the flash memory of the chip is erased successfully,…
89S51/52 ISP Programmer – Basics
Everyone in their daily life has been using microcontrollers knowingly or unknowingly embedded in machines like cars, TV, refrigerator, washing machine, etc. Many of you know the capabilities of microcontrollers and have worked with it. You should have programmed it using different programmers by manufacturers. Have you ever thought how does a programmer work?…
How to control Stepper Motor using ULN2003 and 8051 Microcontroller (AT89C51)- (Part 17/45)
Stepper motor is a variable reluctance DC motor. When correct input sequence of signal is given to the motor, it starts rotation in steps. (For more detail refer Unipolar Stepper motor interfacing with microcontroller AT89C51). ULN2003 is high voltage, high current Darlington arrays each containing seven open collector Darlington pairs with common emitters. Here it…
How to interface Stepper Motor with 8051 Microcontroller (AT89C51)- (Part 16/45)
Stepper motor is one of the commonly used motors for precise angular movement. The advantage of using a stepper motor is that the angular position of the motor [[wysiwyg_imageupload::]]shaft can be controlled without any feedback mechanism. Stepper motors are widely used in industrial and commercial applications. They are also commonly used as in drive systems of autonomous robots.This article explains the unipolar stepper motor interfacing with AT89C51 microcontroller. The microcontroller is programmed to rotate the stepper in wave drive and half drive stepping modes. For basic concepts and working of a stepper motor, refer the article on Stepper Motors. A Unipolar Stepper Motor is rotated by energizing the stator coils in a sequence. In unipolar stepper, the direction of current in stator coils is not required to be controlled by the driving circuit. Just applying the voltage signals across the motor coils or motor leads in a sequence is sufficient to drive the motor.
How to display string on Graphics LCD using 8051 Microcontroller (AT89C52)- (Part 44/45)
Simple operations with graphics LCD have been explained in the previous article. This article demonstrates the functionality of graphics LCD to display strings of [[wysiwyg_imageupload::]]different fonts. It explains the program to display strings in 8×8 and 5×7 fonts and also to scroll them vertically.The Graphics LCD used here is JHD12864E. This LCD is divided into two parts which are controlled by two different controllers. Each of these parts is divided into rows and columns. For basic instructions and programming procedure, refer to interfacing Graphics LCD with 8051.To display different font types, corresponding header files have been created. These header files contain the bitmap information of all alphabetic, numeric characters and symbols of a particular font. These header files are included into the main program. (The header file declarations are given in Code2).
How to interface Graphics LCD with 8051 Microcontroller (AT89C52)- (Part 43/45)
The graphical LCD used here is JHD12864E. This LCD is divided into two parts which are controlled by two different controllers. Each of these parts is divided into [[wysiwyg_imageupload::]]rows and columns.User friendly visual displays are used nowadays to keep track of working of any device. Such a visual display can be anything ranging from old Analog meters to new and smart Digital meters. In digital world to keep track of devices, LCDs are very commonly used. LCDs are easy to program and prove to be a better display unit as compared to other devices like seven segments and LED display units.The graphics LCDs are preferred over the character LCDs for those applications where both character and graphical representation are required. This article explains the basics of a 128×64 Graphics LCD and how it can be interfaced with AT89C52 to display basic shapes. The graphical LCD used here is JHD12864E. This LCD is divided into two parts which are controlled by two different controllers. Each of these parts is divided into rows and columns.To interface this LCD with microcontroller, two registers (Input and Output register) are provided in the LCD. These registers are selected by the combination of RS and RW signals.
How to interface GPS with 8051 Microcontroller (AT89C51)- (Part 36/45)
GPS has become an efficient tool in the field of scientific use, commerce, surveillance and tracking. This project presents a small application based onGlobal [[wysiwyg_imageupload::]]Positioning System. It depicts the use of GPS module/receiver to find latitude and longitude of its location. The data obtained from GPS receiver (GPGGA sentence) is processed by the microcontroller to extract its latitude and longitude values.The GPS Module has been interfaced with AT89C51 and the location values are displayed on a 16×2 LCD interface. The GPS module continuously transmits serial data (RS232 protocol) in the form of sentences according to NMEA standards. The latitude and longitude values of the location are contained in the GPGGA sentence (refer NMEA format). In this program, these values are extracted from the GPGGA sentence and are displayed on LCD.The serial data is taken from the GPS module through MAX232 into the SBUF register of 8051 controller (refer serial interfacing with 8051). The serial data from the GPS receiver is taken by using the Serial Interrupt of the controller.
How to extract details from GPS Receiver using 8051 Microcontroller- (Part 37/45)
This project is an extension to interfacing GPS with 8051. Here the microcontroller interfaced with GPS module is used to obtain latitude, longitude, time, date and [[wysiwyg_imageupload::]]speed of the receiver. These received values are displayed on a 16×2 character LCD.The GPS module continuously transmits serial data (RS232 protocol) in the form of sentences according to NMEA standards. The latitude, longitude, time, date and speed values of the receiver are contained in the GPRMC sentence as given in the following example (also refer NMEA format for other sentences). In this project, these values are extracted from the GPRMC sentence and are displayed on LCD.Example : $GPRMC,132455.970,A,2651.0145,N,07547.7051,E,0.50,342.76,301010,,,A*64The serial data is taken from the GPS module through MAX232 into the SBUF register of 8051 controller (refer serial interfacing with 8051). The serial data from the GPS receiver is taken by using the Serial Interrupt of the controller. This data consists of a sequence of NMEA sentences from which GPRMC sentence is identified and processed.
How to interface Humidity Sensor with 8051 Microcontroller (AT89C51)- (Part 31/45)
Humidity sensor works on the principle of relative humidity and gives the output in the form of voltage. This analog voltage provides the information about the percentage relative humidity present in the environment. The relative humidity is defined as: The analog output of sensor is connected to ADC to get its corresponding digital value.…
Servo Motor control through Keypad using 8051 Microcontroller (AT89C51)- (Part 20/45)
The basic operations of servo motor control have been discussed in interfacing servo with 8051. This project allows the servo motor to move to an angle specified [[wysiwyg_imageupload::]]by the user. The pulse train required to rotate the servo is produced by AT89C51 microcontroller. The desired angle of rotation is provided through a 4×3 keypad interfaced to the microcontroller. A 16×2 LCD is also connected with the microcontroller to display the angle of rotation entered by the user. For basic operations and control of servo motor, refer interfacing servo with 8051. The first pin of port P1 (P1^0) of AT89C51 microcontroller is set as the output pin to provide control signal to the servo motor. Ports P0 and P2 are used to interface keypad and data pins of LCD, respectively. Ports P1^3, P1^4 and P1^5 are connected to RS, RW and EN pins of LCD, respectively. Before connecting to the control wire of servo, the output from the microcontroller (P1^0) is fed through a comparator IC (LM324) so that the signal is protected from any loss due to overloading.
How to interface Servo Motor with 8051 Microcontroller (AT89C51)- (Part 19/45)
This project demonstrates the operation of a servo motor. The control signals for the rotation of the motor are provided by 8051 microcontroller (AT89C51). Here, [[wysiwyg_imageupload::]]the servo arm is rotated by 5° from the previous position, starting from 0 °as initial position. As the servo reaches a limit, the arm comes back to the initial position (0°). For basic concepts and know-how of a servo motor, refer to the article Servo Motor.The servo motor is controlled by feeding pulse width modulated (PWM) signal at the control wire of the servo motor. In addition a 4.8V (ideally 5V) DC supply is provided to the red lead of the servo. The black lead of the servo is connected to Ground. The first pin of port P1 (P1^0) of AT89C51 microcontroller is set as the output pin to provide control signal to the servo motor. Before connecting to the control wire of servo, the output from the microcontroller is fed through a comparator IC (LM324) so that the signal is protected from any loss due to overloading.
How to interface GSM Module with 8051 microcontroller (AT89C51) using PC- (Part 38/45)
GSM is widely used mobile communication architecture used in most of the countries. This project demonstrates the interfacing of [[wysiwyg_imageupload::]]microcontroller AT89C51 with HyperTerminal and GSM module. It aims to familiarize with the syntax of AT Commands and their Information Response and Result Codes. The ASCII values of characters in the Information Response, Result Codes and their syntax can be monitored by an LED array. For the basic concepts, working and operation of AT commands and GSM module refer GSM/GPRS Module. The project explains interfacing of the AT89C51 microcontroller with the GSM module and the HyperTerminal. HyperTerminal is a Windows application. TheAT commands are sent by the HyperTerminal to the GSM module. The Information Response and/or Result Codes are received at the microcontroller and retransmitted to the HyperTerminal by the controller. Read on to understand how does this circuit work and how its microcontroller can be programmed.
How to interface GSM Module with 8051 microcontroller (AT89C51) using PC and LCD- (Part 39/45)
This project is an extension of interfacing microcontroller with hyperterminal and GSM module. The previous project explained a way to interface a GSM [[wysiwyg_imageupload::]]module with 8051 microcontroller where the information response and result codes received by the controller were sent back to computer to display them at HyperTerminal. In this project, the same output is displayed on a 16×2 LCD interface. This project is first step towards making and independent system using the GSM module and a microcontroller. Here the HyperTerminal (computer) has been replaced with LCD at the output end. In the next project (MC076), the AT Commands will be transmitted to the GSM module by the microcontroller itself thus avoiding the need of using HyperTerminal entirely. This project adds a feature to display the information response and result codes on a 16×2 LCD in response to the AT commands sent through the HyperTerminal of computer. The characters typed at HyperTerminal get transmitted serially through the transmit pin (Tx) of RS232 interface.
How to Reset EEPROM (24C02) Memory using 8051 microcontroller- (Part 42/45)
AT24C02 is two-wire serially programmable EEPROM. This means that for programming, the data and control signals are provided serially along with clock signals from the other wire. The read-write operations are accomplished by sending a set of control signals including the address and/or data bits from a microcontroller. This project demonstrates the memory reset operation of a 24C02 IC by using AT89C51. For basic operations of AT24C02, refer interfacing serial EEPROM with 8051. It writes & reads a byte to/from the EEPROM displaying it on a 16×2 LCD, and then resets the memory. The results can be monitored on the LCD display.AT24C02 is a two-wire serial EEPROM from Atmel. 24C02 is an 8 pin IC and reads 8 bit data serially. Its memory size is 2KB. Pins 1- 3 are address pins which are connected to ground. Pin 4 is GND; Pin 5 is SDA (serial data); and pin 6 is SCL (serial clock input). Pin 7 is WP (write protect) pin and is connected to GND. Pin 8 is Vcc for providing power supply.
How to Interface Serial EEPROM 24C02 with 8051 microcontroller (AT89C51)- (Part 41/45)
EEPROM stands for electrically erasable programmable read only memory. It is a secondary storage device that once written (programmed) can hold data even [[wysiwyg_imageupload::]]when the power is removed. The EEPROM is a class of read only memory that can be electrically erased and reprogrammed.AT24C02 is a two wire 2Kbits serial EEPROM by Atmel. The memory is organized in 256 words of single byte each arranged in 32 pages of 8 bytes each. The addressing of memory locations requires eight bit addresses.AT24C02 is two-wire serially programmable i.e., for programming, the data and control signals are provided serially along with clock signals from the other wire. The read-write operations are accomplished by sending a set of control signals including the address and/or data bits. The control signals must be accompanied with proper clock signals.The AT24C02 has hard wire addressing of 3 bit length. This facilitates interfacing of a maximum of eight (23) 24C02 devices to a system thereby, incorporating a maximum 16Kbits memory. Multiple 24C02 devices can be connected to a microcontroller/microprocessor based system using I2C interface.
Toll plaza system based on vehicle category using 8051 microcontroller (AT89C51)
This topic is an extension to Simple toll plaza system. The toll amount is charged based on the category of the vehicle driving through the plaza. The vehicle categories taken here are two-wheeler & four-wheeler. When a user scans his ID at the toll plaza, some amount is charged from his account depending upon his vehicle category. User also has the facility to recharge his account.The project has been developed by interfacing RFID with AT89C51. The relevant messages are also displayed on a 16×2 LCD. The free source code for the program is available in C.Simple toll plaza system charges the toll tax from the user irrespective of the type of his vehicle. This project also considers the vehicle type while charging the toll amount. The RFID tag is used as a unique identity for account of a particular user. When a vehicle drives through the toll plaza, its driver is prompted to scan his RFID tag. If the identity (serial number of the tag, i.e., 12 byte data) is matched with the one already stored in the system, the toll amount is deducted from his account. After this, the vehicle gets immediate access to drive through. All the features of the Simple toll plaza system are also provided in this project by interfacing RFID with AT89C51.
Simple toll plaza system using low frequency RFID interfaced with 8051 microcontroller (AT89C51)
Electronic/automated toll collection systems are very popular these days. They do not require manual collection and operation of toll barriers. The details about [[wysiwyg_imageupload::]]the vehicles and payment are stored in an RFID based system.This article explains the working of a simple toll plaza system interfaced with RFID. Each user holds a unique ID for his vehicle. When the user scans his tag while passing through the plaza, a certain amount is deducted from his account. A user may also recharge his account in case of insufficient balance. The project has been developed by interfacing RFID with AT89C51. The relevant messages are also displayed on a 16×2 LCD. The free source code for the program is available in C.Low frequency RFID work at 125 KHz frequency with radio waves. There is a coil inside the RFID tag and when it is influenced by a magnetic field, it sends a 12 byte identity code to RFID reader for further processing. The RFID tag is used as a unique identity for account of a particular user. When a vehicle drives through the toll plaza, its driver is prompted to scan his RFID tag. If the identity (serial number of the tag, i.e., 12 byte data) is matched with the one already stored in the system, the toll amount is deducted from his account. After this, the vehicle gets immediate access to drive through.
Interfacing RFID with 8051 microcontroller (AT89C51) using serial interrupt- (Part 35/45)
This topic covers the interfacing of RFID system with microcontroller through serial interrupt. An RFID system consists of a reader device and a transponder. A transponder or tag has a unique serial number which is identified by the reader. RFID tag is applied to products, individuals or animals to identify and track them through this number. The interfacing has been…