??? 09/03/05 18:46 Read: times |
#100552 - 8-bit or 4-bit? Responding to: ???'s previous message |
D.narender Reddy said:
how to initialize a 16*1 lcd module in 4 bit mode in c language. void LCD_init(void)
{ LCD_write(0,0x30); LCD_write(0,0x0F); LCD_write(0,0x06); LCD_write(0,0x01); LCD_write(0,0x00); } Do you want to communicate with the LCD in 8-bit mode or 4-bit mode? Because the 0x30 initialization above is setting the LCD to 8-bit mode. Sending 0x20 would be appropriate if you really want 4-bit mode. However, I wonder if you really want 4-bit mode because your LCD_write routine is also communicating with the LCD in 8-bit mode, not 4-bit mode. I'm also not sure what the 0x00 "command" is supposed to do. I'm not aware of that being a valid LCD command nor do I know what happens if you send it. Regards, Craig Steiner |
Topic | Author | Date |
lcd_init() function | 01/01/70 00:00 | |
open it:) | 01/01/70 00:00 | |
i had but its not working | 01/01/70 00:00 | |
So debug it! | 01/01/70 00:00 | |
8-bit or 4-bit?![]() | 01/01/70 00:00 |