Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <avr/io.h>
- #include <avr/interrupt.h>
- int main (void)
- {
- DDRB |= (1 << PB2);
- TCCR1B|=(1 << WGM12);
- OCR1A=27;
- TCCR1B|=(1 << CS10);
- TIMSK |= (1 << OCIE1A);
- TIMSK |= (1 << OCIE1B);
- sei();
- while(1)
- {
- }}
- ISR(TIMER1_COMPA_vect)
- {
- PORTB ^= (1<<PB2);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement