Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <avr/io.h>
- #include <util/delay.h>
- int main(void)
- {
- DDRD = 0xff;
- PORTD = 0x00;
- while (1)
- {
- for (int i=0; i<=2; i++)
- {
- PORTD |= (1<<i);
- _delay_ms(100);
- PORTD &= ~(1<<i);
- _delay_ms(100);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement