Hi everyone,
I was interfacing lcd JHD162a with AT89S52 atmel microcontoller. I made a code and burned in the processor but LCD didn't display anything. According to the code it should initialise lcd and cursor must be blinking. I made the program in micro proc for 8051 by Microelectronika.
I want to know whether problem is in the program or lcd is faulty.So if any of you have access to these devices kindly check the code provided and see if lcd is displaying lcd. I have attached its hex file and datasheet of lcd.
I was interfacing lcd JHD162a with AT89S52 atmel microcontoller. I made a code and burned in the processor but LCD didn't display anything. According to the code it should initialise lcd and cursor must be blinking. I made the program in micro proc for 8051 by Microelectronika.
Rich (BB code):
sbit LCD_RS at P2_0_bit;
sbit LCD_EN at P2_1_bit;
sbit LCD_D4 at P2_4_bit;
sbit LCD_D5 at P2_5_bit;
sbit LCD_D6 at P2_6_bit;
sbit LCD_D7 at P2_7_bit;
// End Lcd module connections
void main()
{
Lcd_Init(); // initialise lcd
Delay_ms(100); // command Lcd
LCD_EN=0;
LCD_RS=0;
LCD_D4=0;
LCD_D5=0;
LCD_D6=0;
LCD_D7=0;
LCD_EN=0;
Delay_ms(500);
LCD_EN=1;
Delay_ms(100);
LCD_D4=1;
LCD_D5=1;
LCD_D6=1;
LCD_D7=0;
LCD_EN=1;
Delay_ms(500);
LCD_EN=0;
}
Attachments
-
876 bytes Views: 10
-
260.8 KB Views: 15