Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<avr/io.h>
- int main(void){
- DDRA = 0xff;
- for(;;){
- PORTA = _BV(3) | _BV(4);
- for(int i = 3;i >=0;i--){
- PORTA |= _BV(i) | _BV(7-i);
- for(unsigned long i=0; i<=16000;i++){
- __asm__ ( "nop;");
- }
- };
- for(int i=0;i<3;i++){
- PORTA &= ~(_BV(i) | _BV(7-i));
- for(unsigned long i=0; i<=16000;i++){
- __asm__ ( "nop;");
- }
- };
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement