AnsweredAssumed Answered

Problem in displaying a number on char LCD displays

Question asked by Arman Ilmak on May 1, 2018
Latest reply on May 1, 2018 by Bogdan Golab

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.

Outcomes