Guest User

a44_test.c

a guest
Apr 15th, 2019
288
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.41 KB | None | 0 0
  1. /*
  2.  * at44_test.c
  3.  *
  4.  * Created: 4/13/2019 12:09:57 PM
  5.  * Author : sami
  6.  */
  7. #define F_CPU 20000000UL
  8. #include <avr/io.h>
  9. #include <util/delay.h>
  10.  
  11. int main(void)
  12. {  
  13.     DDRA =0b00011000;       //Set PA3 and 4 as OUTPUT  
  14.     while (1)
  15.     {
  16.    
  17.         PORTA = 0b00001000;  
  18.         PORTA = 0b00010000;  
  19.         _delay_ms(500);
  20.        
  21.         PORTA = 0b00010000;
  22.         PORTA = 0b00001000;
  23.         _delay_ms(500);
  24.     }
  25.     return 1;
  26. }
Add Comment
Please, Sign In to add comment