Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<avr/io.h>
- int main(void)
- {
- DDRA=0xFF;
- TCCR2=(1<<CS22)|(1<<CS21)|(1<<CS20)|(1<<WGM21);
- OCR2=252;
- uint8_t i;
- while(1)
- {
- PORTA=PORTA^3;
- for(i=0;i<31;i++)
- {
- TIFR|=(1<<OCF2);
- while(!(TIFR&(1<<OCF2)));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement