has anyone interfaced a powertip lcd to 167/ST10? If yes, Pls let me know the ports used and the initialisation sequence regards rajesh
Hello everyone!I'm having some problems with my LCD module too...I trying to make it work with my 8051 emulation board. I am using Philip EB-51 board with powertip PC1602F LCD module.. I've already set up everything but have problems with the C program. Can anyone send me a copy of your program please.. prefer to hav it in basic C. Thank you!
It is common that LCDs require a "repeat" of some initialization. ref http://www.8052.com/forum/read.phtml?id=101969 Erik
How about i post a copy of my C program here?Is that allow?? I really need help with this..i'm not really good with this LCD interface..
#include<reg51.h> sbit RS = P2^0; sbit RW = P2^1; sbit E = P2^2; void long_delay(unsigned int y) { unsigned int x; for (x=0;x<y;x++); } void delay(unsigned char y) { unsigned char x; for (x=0;x<y;x++); } void strobe() { E = 1; delay(150); E = 0; delay(150); } void LCD_init() { unsigned char x; for (x=0;x<3;x++) { P0=0x30; RS=0; RW=0; strobe(); delay(150); } P0=0x38; strobe(); P0=0x0c; strobe(); P0=0x01; strobe(); P0=0x02; strobe(); } void LCD_print(unsigned char x) { P0=x; RS=1; RW=0; strobe(); } void main() { LCD_init(); RI=0; E=0; for(;;) { while (RI==0); RI=0; LCD_print("Hello!!"); } }
you have no ideas of the length of delay() since it is written in C. Erik