So this is how initial things should work, as I see it:
1. We sent interrupt on rising edge of PORTC.4
2. As PORTC.4 gets high, timer is started, and counts to predefined value (width of 1st pulse)
3. While timer is running, PORTC.4 is still being continuously checked, to determine, whenever it is still high. It should be high while timer is counting, if it gets low, while timer is on, this means, this is not proper pulse, so we should reset and start everything over.
4. If timer counting ended, and PORTC.4 was high all that time, this means that sync pulse was captured correctly, and we're ready for the next step.
This appears quite simple in words, but all Greek for me, in code, so far, my practical experience with timers and pwm is light dimming, and playing polyphonic tunes via it
![]()


, so far, my practical experience with timers and pwm is light dimming, and playing polyphonic tunes via it


Bookmarks