plugin23

7

Feb 10th, 2016
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.53 KB | None | 0 0
  1. /*
  2.  * zadanie4b.c
  3.  *
  4.  * Created: 22.10.2015 11:45:17
  5.  *  Author: d14valicek
  6.  */
  7.  
  8. #define F_CPU 1000000UL
  9. #include <avr/io.h>
  10. #include <stdio.h>
  11. #include <util/delay.h>
  12.  
  13. int main(void)
  14. {
  15.     DDRD = 0xFF;
  16.    
  17.     while(1){
  18.        
  19.         int i[16] = {0b00000011, 0b11110011, 0b00100101, 0b00001101, 0b10011001, 0b01001001, 0b11000001, 0b00011111, 0b00000001, 0b00011001, 0b00010001, 0b00000001, 0b01100011, 0b00000011, 0b01100001, 0b01110001};
  20.         for(int j = 0; j <= 15; j++){
  21.             PORTD = i[j];
  22.             _delay_ms(500);
  23.         }
  24.     }
  25.    
  26.     return 0;
  27. }
Add Comment
Please, Sign In to add comment