bianchi77
Advanced Member level 4
- Joined
- Jun 11, 2009
- Messages
- 1,313
- Helped
- 21
- Reputation
- 44
- Reaction score
- 20
- Trophy points
- 1,318
- Location
- California
- Activity points
- 9,442
can not display sprintf to LCD ?
Guys,
Why suddenly sprintf doesn't work ?
It was working yesterday, I shut down the power supply now, it's not giving me a good response
code :
If I commented out sprintf, now it's running properly, I can see RTC on USART, but if I use sprintf, it's running 2 seconds and freeze......any ideas ?
Thanks
Guys,
Why suddenly sprintf doesn't work ?
It was working yesterday, I shut down the power supply now, it's not giving me a good response
code :
Code:
uint32_t /*Tmp,*/THH,TMM,TSS,WEEKDAY,DATE,MONTH,YEAR;
unsigned char date[10],day[10],month[10],year[10],hour[10],min[10],sec[10];
struct tm *utcTimeSnapshot;
Tmp = RTC_GetCounter();
TSS = utcTimeSnapshot->tm_sec;
sprintf(sec,"%02d",TSS);
lcd_string(sec);
If I commented out sprintf, now it's running properly, I can see RTC on USART, but if I use sprintf, it's running 2 seconds and freeze......any ideas ?
Thanks