Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <mega328p.h>
- #include <delay.h>
- void main(void) {
- int i = 0;
- while(1){
- i = i ^ 1;
- delay_ms(200);
- PORTB = (i<<PORTB7)|(i<<PORTB6)|(i<<PORTB5)|(i<<PORTB4)|(i<<PORTB3)|(i<<PORTB2)|(i<<PORTB1)|(i<<PORTB0);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement