Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
was it to asciibcd to binary to display on the lcd
unsigned char DEC2BCD(unsigned char dec)
{
return ( dec /10 ) <<4 + (dec % 16);
}
unsigned char BCD2DEC(unsigned char bcd)
{
return (bcd>> 4)* 10 + (bcd % 10);
}
I don't even know what RTCC he is using?
void TimeDisplay(void)
{
while (BusyXLCD())
LCD_Move(0,1); //move to col 0 row 1
while (BusyXLCD());
itoa(lcd,hours,10);
putsXLCD(lcd);
while(BusyXLCD());
putrsXLCD(":");
while(BusyXLCD());
itoa(lcd,minutes,10);
putsXLCD(lcd);
DelayXLCD();
}
void TimeDisplay(void)
{
char buff[17];
sprintf(buff,"%02d:%02d",lcd.hours,lcd.minutes);
while (BusyXLCD())
LCD_Move(0,1); //move to col 0 row 1
putsXLCD(buff);
}