#include <stdint.h>
#include <avr/io.h>
#include <avr/interrupt.h>

ISR (TIMER1_COMPA_vect) { PORTB &= 0xfe; }
ISR (TIMER1_COMPB_vect) { PORTB |= 0x01; }

int main (void)
{
	DDRB   = 0xff;
	PORTB  = 0x01;
	OCR1A  = 31250;
	OCR1B  = 15625;
	SREG = 0x80;
	TIMSK  = _BV(OCIE1A) | _BV(OCIE1B);
	TCCR1B = _BV(WGM12) | _BV(CS12);
}
