Timeline for LED Blink in assembly with timer1 output compare interrupt not working
Current License: CC BY-SA 4.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 22, 2021 at 12:36 | comment | added | timemage |
Well, the frequency of what appears on T1 is being effectively divided by what you're doing with your ISR/TCNT1 /OCRA1A ; one cycle on T1 is not one execution of sbi PINB, LED_PIN , and each toggling corresponds to just the high or just the low period of the LED cycle. Then, you might also have high frequency components being seen at T1. If you wanted to experiment with that, the thing to do would be to feed a solid 60Hz into T1 to eliminate the unknown components there. By the way, your ISR should probably be preserving r16 .
|
|
May 22, 2021 at 5:25 | comment | added | Mahmoud Salah | and the main frequency in my country is around 60 HZ and the LED clearly didn't blink on that frequency it was fast but not that fast at all. How is that? is there an explanation for the altered frequency? | |
May 22, 2021 at 5:07 | comment | added | Mahmoud Salah | OPS, Yup that Was it although I read the datasheet and saw that it was 100 don't know how it ended up as 111. anyway as a suggestion for an environment I use avrdude and avra assembler on linux mint terminal with the arduino uno | |
May 22, 2021 at 5:05 | vote | accept | Mahmoud Salah | ||
May 21, 2021 at 11:10 | history | answered | timemage | CC BY-SA 4.0 |