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 = 19999;
- while (1)
- {
- OCR1A =1000;
- _delay_ms(1000);
- OCR1A =1400;
- _delay_ms(1000);
- OCR1A =1800;
- _delay_ms(1000);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement