Advertisement
plugin23

zadanie9

Mar 31st, 2016
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.40 KB | None | 0 0
  1. /*
  2.  * zadanie9.c
  3.  *
  4.  * Created: 31.3.2016 11:31:06
  5.  *  Author: d14valicek
  6.  */
  7.  
  8.  
  9. #define F_CPU 1000000UL
  10. #include <avr/io.h>
  11. #include <stdio.h>
  12. #include <util/delay.h>
  13.  
  14. int main(void)
  15. {
  16.     PORTD = 0xFF;  
  17.     while(1)
  18.     {
  19.         for(int i = 1; i <= 100; i++){
  20.         PORTD = 0b00000000;
  21.         _delay_us(1000);
  22.         PORTD = 0b10000000;
  23.         _delay_us(1000);
  24.         }
  25.         _delay_ms(200);
  26.     }
  27.     return 0;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement