2018-05-01 03:39 AM
Hi.
I was working with my new stm8s105 MCU trying to get started with the timers.
But every time I use the command to display the time on the LCD the same number showed every time.I thought that the problem is my timer code but when I just put a number on the LCD to show it just showed an irrelevant number.
I use the same LCD.h on LPC1768 and STM32F2 and just converted the same header.The only difference is that I used Keil compiler for them and now I'm using IAR.
lcd_gotoxy(1,2);
sprintf(buf,'%d',100);lcd_print(buf);delay_ms(1000);This is a simple code that must show 100 but it displays 12594
>:(
The characters are displayed properly.The problem is numbers.
Solved! Go to Solution.
2018-05-01 12:27 PM
I don't know why does this message 'declared implicitly' is shown in the message box and I don't know what is it at all.
When I use this header in stm32f no such warning appears!!
Is it the problem?
2018-05-01 12:37 PM
Thank you very much.
I just thought that the warnings are not important.
I searched this warning and as you said that I have to include string.h but I just had to include stdio.h.And that warning disappeared and it worked.
Thanks
2018-05-01 02:45 PM
Yes.My problem is fixed using stdio.h.
Thanks
2018-05-01 02:55 PM
Sometimes it take time when you do not see all Warnings from the console. I usually clear all Warnings before I test the software.
Thanks for letting me know!