real time clock on lcd display in ASCII format....

Status
Not open for further replies.
Hi,
what happened is
12+30 = 42(in ASCii B),13+30 = 43(in ASCii C),35+30 = 65(in ASCii e) as you mentioned

but what you have to do is

separate 12 as 1+30 = 31(in ASCII 1) and 2+30 = 32(in ASCII 2)
separate 13 as 1+30 = 31(in ASCII 1) and 3+30 = 33(in ASCII 3)
separate 35 as 3+30 = 33(in ASCII 3) and 5+30 = 35(in ASCII 5)

in your code add two more variable and try as follow,

time[1] = hour;
a = (time[1] & 0x0F);
b = (time[1] & 0xF0);
b = b>>4;
lcddata(b+0x30); // b will be 1
lcddata(a+0x30); // a will be 2
 

    V

    Points: 2
    Helpful Answer Positive Rating
hi arun ,

thanks for ASCII conversion calculation and my real time clock working now ......thank u very much.....
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…