Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define F_CPU 1000000UL
- #include <avr/io.h>
- #include <util/delay.h>
- int main(void)
- {
- DDRB = 0xff;
- TCCR1A |= 1<<WGM11 | 1<<COM1A1 ;
- TCCR1B |= 1<<WGM13 | 1<<WGM12 | 1<<CS10;
- ICR1 = 1023;
- PORTB |= 1<< PB0;
- OCR1A =512;
- while (1)
- {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement