isidur
Joined: 13 Feb 2008 Posts: 2
|
glcd problem using 18f452 and ds1307 |
Posted: Thu Mar 13, 2008 12:03 am |
|
|
write program I used glcd and ds1307 and I convert from numbers to string and if number increase 10 and string numbers mixed and simulate proteus below write a code;
Code: |
ds1307_get_time(hr,min,sec);
sprintf(hour_s,"%d",hr);
sprintf(min_s,"%d",min);
sprintf(sec_s,"%d",sec);
delay_ms(5);
//*********************** display glcd ******************************************
glcd_text57(10,3,text1,1,ON);
glcd_text57(1,15,text2,1,ON);
glcd_text57(32,15,text8,1,ON);
glcd_text57(65,15,text3,1,ON);
glcd_text57(90,15,text9,1,ON);
glcd_text57(10,25,text4,1,ON);
glcd_text57(45,25,hour_s,1,ON);
glcd_text57(58,25,text10,1,ON);
glcd_text57(65,25,min_s,1,ON);
glcd_text57(78,25,text10,1,ON);
glcd_text57(85,25,sec_s,1,ON);
glcd_text57(10,35,text11,1,ON);
glcd_text57(1,45,text6,1,ON);
glcd_text57(52,45,text7,1,ON);
glcd_text57(45,55,text12,1,ON);
|
and show a photos first photo is error photo
second photo minutes value is lower than ten number(correct working)
|
|