I am a new hand to STM32F1x and I am trying to do a project that really needs to use the RTC/TIM function.
What I am trying to do is to display a 20 second count-up timer on the LCD. Something that looks like:
TIMER: 12.34 s
So what I want to write in the program is:
var s =0
if "counted 1s "
{
drawchar (3, 1, s)
s++
}
if "counted 10s"
{
drawchar(3, 0, x)
x++
}
So the problem is what to write in order to get:
if (counted 1s);
Thank you very much and sorry, that I don't really have much knowledge on it.
Let me explain more, base on my little knowledge. What I know is like, when I press a button, I can do sth/ interrupt.
while(1){
if(GPIO_ReadInputDataBit(GPIOB,GPIO_Pin_9)==1){
LCD_DrawString(0, 0, name, 8);
}
}
Thats basically what I can do.
So, instead of pressing a button to draw sth, I would like to make it draw when the timer/RTC rising edge.