??? 10/02/08 14:26 Read: times |
#158767 - come conufusion with the file Responding to: ???'s previous message |
sorry michael, what happened was there were two versions of the header file . lcd_en, LEN and EN are one and the same thing .(in the latest ver. i have replaced all the En & LEN to only LCD_EN ) {i assumed there was a conflict some where so i went about again sorry for the confusion.
as you can see from the pin connections p3.7 - EN
and p3.5 - RS . so p3.7 corisponds to the MSB ( hence i have used 0X80 [1000 0000] ) and p3.5 is the 6th bit (hence 0x20 [0010 0000 ]) about your suggestion michale as far as my knowledge goes ( which is very limited indeed ) doen't the LCD only accept data or commands only then the Enable pit is toggled (high to low ) ?? if this is true then in the command void lcd_data (unsigned char dat)
{ lcd_port = (((dat >> 4) & 0x0F)|RS); lcd_port = (((dat >> 4) & 0x0F)|EN|RS); lcd_port = (((dat >> 4) & 0x0F)|RS); the first line lcd_port = (((dat >> 4) & 0x0F)|RS); will simply be ignored . |