I'm working to test the timings of DH11 received 40-bits data, and wanted to implement my Arduino Uno TIMER0 for this purpose.
I thought I configured the TIMER0 as I wanted but I think it's not! I learned in the datasheet that I just need to enable CS00 to activate TIMER0
Then I tried to change the prescaler bit for my test condition, but the same result. Then I cleared TCCR0B and surprisingly the LCD also shows random numbers like other selecting bits.
This is my test code, I also tried a delay instead of the while loop.
TCNT0=0; while(m<100)m++; num = TCNT0; itoa(num,str_arr,10); LCD_string(str_arr); _delay_ms(1000); clr_dis(); _delay_ms(1000);