Hello, I've been having trouble getting this little timer routine to work correctly. I started out with a little program that switches the output of a pin every 240µs which turned out to work as expected:
Attiny85 Manchester Encoding Timing Problem
Code (C):
- // This program switches the output of PB3 every 240µs.
- #include <avr/interrupt.h>
- #include <avr/io.h>
- ISR(TIMER0_COMPA_vect)
- {
- PORTB ^= _BV(PB3);
- }
- int main()
- {
- DDRB |= _BV(PB3);
- TCCR0A = _BV(WGM01);
- TCCR0B = _BV(CS00);
- TIMSK =...