This should really be posted in the assembly section.
I don't think so. There's enough problems with C in this code.
See comments inline.
I am stuck when i try to display the time on the Lcd panel. It can't seems to show any numbers and update itself. It will keep printing some wierd thing and eventually cover up the " Clock: " word. I am using keil uVsion 3 complier.
Here is my code, hope someone can give me some guidance as i am new and weak in programming. Thanks in advance!
void Lcd_Write(unsigned char Data); unsigned int sec, min, hour; void main (void) { Lcd_Command(0xc0); // print at 2nd line while(1) { Lcd_Write(hour); // Lcd_Write is declared as Lcd_Write(unsigned char. hour is // declared as unsigned int. Lcd_Write(':'); Lcd_Write(min); Lcd_Write(':'); Lcd_Write(sec); // Don't you need some command to get back to the // beginning of the 2nd line? }