MIKR/lectures/Timer/timerCMP.c

16 lines
221 B
C
Raw Permalink Normal View History

2024-04-16 20:18:18 +02:00
#include<avr/io.h>
int main(void) {
DDRB |= _BV(DDB7);
PORTB &= ~_BV(PORTB7);
TCCR3A |= _BV(COM3B0);
TCCR3A &= ~_BV(COM3A1);
TCCR3B |= _BV(CS32) | _BV(CS30) | _BV(WGM32);
OCR3A = 0x0FFF;
for(;;);
return 0;
}