plugin23

5e

Feb 10th, 2016
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.50 KB | None | 0 0
  1. /*
  2.  * zadanie5e.c
  3.  *
  4.  * Created: 28.1.2016 11:36: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.     DDRC = 0x00;
  17.    
  18.     int pole[16] = {0b00000011, 0b11110011, 0b00100101, 0b00001101, 0b10011001, 0b01001001, 0b11000001, 0b00011111, 0b00000001, 0b00011001, 0b00010001, 0b00000001, 0b01100011, 0b00000011, 0b01100001, 0b01110001};
  19.    
  20.     while(1)
  21.     {
  22.         int i = PINC;
  23.         PORTD = pole[i];
  24.     }
  25. }
Add Comment
Please, Sign In to add comment