Home/ Tutorials / AVR/ 8051/ Interfacing On Atmel Microcontroller AT89S51/52/53 Development Board-7 segment Display, LCD, Buzzer
Atmel AT89S951/52/53 is basically designed to do all general purpose applications. This board contains hardware components, interfaces like LEDs, Buzzer, EEPROM, Keyboards, and LCDs etc. Also this board includes a COM port for serial communication using RS232.
Atmel Microcontroller AT89S51/52/53 Development Board consists of
Basically a 7 segment display in the board is a display consisting of illuminated segments to show the numerical symbols when it is powered ON. Each segment is connected to Port 2 of the AT89S51/52/53 microcontroller via a binary to decimal converter and current limiting resistor. As shown in Figure1 the board consists of 4 seven segments.
7 SEGMENT Display Program
Take “New µvision Project”. Create Project Name “ Sevensegment”.
Since our microcontroller is Atmel ATS952/51/53 select it.
Take “File” then New and enter the file name “ Sevensegment.c” and save.
Now add the file “Sevensegment.c” to the project created.
Compiling the program leads to the step of build project.
Here we will be discussing how to interface a 16x2 LCD with Atmel ATS951/52/53 board. This will display 16 characters in one row. The pin configuration is given below.
Pin No: |
Name |
Function |
Port P1.2 |
RS |
Write data to be displayed LCD. |
Port P1.1 |
R/W |
Read or write data from or to LCD. |
Port P1.0 |
E |
Start the Module |
Port 0 (P0.0-P0.7) |
DBO-DB7 |
Give data to be displayed |
Steps to display data on LCD
Send command to the LCD
Some useful commands for LCD Interfacing
LCD Program To display 'g'
Buzzer is just a piezoelectric material in the Atmel board. In this particular board, first set the port P1.4 to one. The sound from the buzzer is due to the piezoelectric diaphragm. The program is given below. Here a delay loop is created for the operation.
Buzzer Interfacing Program
Atmel development board for the microcontroller interfacing is really good for different applications .Its capability to interface 7segment, LCD, LED and other interfaces is an advantage.
Note: Refer 8051 microcontroller to know more about Embedded C tutorial using Keil compilers …..