Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<avr/io.h>
- int main(void){
- DDRA = 0xFF;
- DDRB = 0x0F;
- unsigned char wezyk[10];
- wezyk[0] = 0b01000111;//E
- wezyk[1] = 0b01001110;//r
- wezyk[2] = 0b01000111;//o
- //PORTA = wezyk[1];
- //PORTB = 0b00000111;
- unsigned char ruchy[4][4] =
- {
- {0b01000111,0b11111111, 0b11111111,0b11111111},
- {0b01001110,0b11111111, 0b11111111,0b11111111},
- {0b01011110,0b11111110, 0b11111111,0b11111111},
- {0b01111110,0b11111110, 0b11111110,0b11111111}
- };
- for(;;){
- for(unsigned char j= 0 ; j < 4 ; j++){
- for (unsigned char i = 0; i<4 ; i++){
- PORTB = ~(_BV(3-i));
- PORTA = ruchy[j][i];
- for(unsigned long i=0; i<=10;i++){
- __asm__ ( "nop;");
- }
- }
- for(unsigned long i=0; i<=8000;i++){
- __asm__ ( "nop;");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement