Get the Flash Player to see this player.

time2online Joomla Extensions: Simple Video Flash Player Module
Tablica LED

Tu jest wczesna wersja kodu:

#include <avr/io.h>
#include <stdlib.h>
#include <util/delay_basic.h>
 
#define LINEX PORTB  //port za wiersz
#define LINEY PORTD  //port za kolumna
#define LINEZ PORTC  //port za Z
 
#define XDDR DDR(LINEX)
#define YDDR DDR(LINEY)
#define ZDDR DDR(LINEZ)
#define DDR(x)  _SFR_IO8(_SFR_IO_ADDR(x) - 1)
 
 
int tab[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // espace
0x20,0x20,0x20,0x20,0x20,0x00,0x20,0x00, // !
0x50,0x50,0x50,0x00,0x00,0x00,0x00,0x00, // "
0x50,0x50,0xF8,0x50,0xF8,0x50,0x50,0x00, // #
0x20,0x78,0xA0,0x70,0x28,0xF0,0x20,0x00, // $
0xC0,0xC8,0x10,0x20,0x40,0x98,0x18,0x00, // %
0x60,0x90,0xA0,0x40,0xA8,0x90,0x68,0x00, // &
0x60,0x20,0x40,0x00,0x00,0x00,0x00,0x00, // '
0x10,0x20,0x40,0x40,0x40,0x20,0x10,0x00, // (
0x40,0x20,0x10,0x10,0x10,0x20,0x40,0x00, // )
0x00,0x20,0xA8,0x70,0xA8,0x20,0x00,0x00, // *
0x00,0x20,0x20,0xF8,0x20,0x20,0x00,0x00, // +
0x00,0x00,0x00,0x00,0x60,0x20,0x40,0x00, // ,
0x00,0x00,0x00,0xF0,0x00,0x00,0x00,0x00, // -
0x00,0x00,0x00,0x00,0x00,0x60,0x60,0x00, // .
0x00,0x08,0x10,0x20,0x40,0x80,0x00,0x00, // /
0x70,0x88,0x98,0xA8,0xC8,0x88,0x70,0x00, // 0
0x20,0x60,0x20,0x20,0x20,0x20,0xF8,0x00, // 1
0x70,0x88,0x10,0x20,0x40,0x80,0xF8,0x00, // 2
0xF0,0x08,0x08,0xF0,0x08,0x08,0xF0,0x00, // 3
0x10,0x30,0x50,0x90,0xF8,0x10,0x10,0x00, // 4
0xF8,0x80,0x80,0xF0,0x08,0x08,0xF0,0x00, // 5
0x30,0x40,0x80,0xF0,0x88,0x88,0x70,0x00, // 6
0xF8,0x08,0x10,0x20,0x40,0x40,0x40,0x00, // 7
0x70,0x88,0x88,0x70,0x88,0x88,0x70,0x00, // 8
0x70,0x88,0x88,0x70,0x08,0x08,0x70,0x00, // 9
0x00,0x60,0x60,0x00,0x60,0x60,0x00,0x00, // :
0x00,0x60,0x60,0x00,0x60,0x20,0x40,0x00, // ;
0x10,0x20,0x40,0x80,0x40,0x20,0x10,0x00, // <
0x00,0x00,0xF8,0x00,0xF8,0x00,0x00,0x00, // =
0x40,0x20,0x10,0x08,0x10,0x20,0x40,0x00, // >
0x70,0x88,0x08,0x10,0x20,0x00,0x20,0x00, // ?
0x70,0x88,0x08,0x68,0xA8,0xA8,0x70,0x00, // @
0x70,0x88,0x88,0xF8,0x88,0x88,0x88,0x00, // A
0xF0,0x88,0x88,0xF0,0x88,0x88,0xF0,0x00, // B
0x78,0x80,0x80,0x80,0x80,0x80,0x78,0x00, // C
0xF0,0x88,0x88,0x88,0x88,0x88,0xF0,0x00, // D
0xF8,0x80,0x80,0xF8,0x80,0x80,0xF8,0x00, // E
0xF8,0x80,0x80,0xF8,0x80,0x80,0x80,0x00, // F
0x78,0x80,0x80,0xB0,0x88,0x88,0x70,0x00, // G
0x88,0x88,0x88,0xF8,0x88,0x88,0x88,0x00, // H
0x70,0x20,0x20,0x20,0x20,0x20,0x70,0x00, // I
0x78,0x08,0x08,0x08,0x08,0x90,0x60,0x00, // J
0x88,0x90,0xA0,0xC0,0xA0,0x90,0x88,0x00, // K
0x80,0x80,0x80,0x80,0x80,0x80,0xF8,0x00, // Luint8
0x88,0xD8,0xA8,0x88,0x88,0x88,0x88,0x00, // M
0x88,0x88,0xC8,0xA8,0x98,0x88,0x88,0x00, // N
0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x00, // O
0xF0,0x88,0x88,0xF0,0x80,0x80,0x80,0x00, // P
0x70,0x88,0x88,0x88,0xA8,0x98,0x78,0x00, // Q
0xF0,0x88,0x88,0xF0,0xA0,0x90,0x88,0x00, // R
0x78,0x80,0x80,0x70,0x08,0x08,0xF0,0x00, // S
0xF8,0x20,0x20,0x20,0x20,0x20,0x20,0x00, // T
0x88,0x88,0x88,0x88,0x88,0x88,0x70,0x00, // U
0x88,0x88,0x88,0x88,0x88,0x50,0x20,0x00, // V
0x88,0x88,0x88,0xA8,0xA8,0xD8,0x88,0x00, // W
0x88,0x88,0x50,0x20,0x50,0x88,0x88,0x00, // X
0x88,0x88,0x88,0x50,0x20,0x20,0x20,0x00, // Y
0xF8,0x10,0x20,0x40,0x80,0x80,0xF8,0x00, // Z
0x60,0x40,0x40,0x40,0x40,0x40,0x60,0x00, // [
0x00,0x80,0x40,0x20,0x10,0x08,0x00,0x00, // '\'
0x18,0x08,0x08,0x08,0x08,0x08,0x18,0x00, // ]
0x20,0x50,0x88,0x00,0x00,0x00,0x00,0x00, // ^
0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x00, // _
0x40,0x20,0x10,0x00,0x00,0x00,0x00,0x00, // `
0x00,0x00,0x70,0x08,0x78,0x88,0x78,0x00, // a
0x80,0x80,0x80,0xB0,0xC8,0x88,0xF0,0x00, // b
0x00,0x00,0x70,0x80,0x80,0x88,0x70,0x00, // c
0x08,0x08,0x08,0x68,0x98,0x88,0x78,0x00, // d
0x00,0x00,0x70,0x88,0xF8,0x80,0x70,0x00, // e
0x30,0x48,0x40,0xE0,0x40,0x40,0x40,0x00, // f
0x00,0x00,0x78,0x88,0x88,0x78,0x08,0x70, // g
0x80,0x80,0xB0,0xC8,0x88,0x88,0x88,0x00, // h
0x00,0x20,0x00,0x20,0x20,0x20,0x20,0x00, // i
0x10,0x00,0x30,0x10,0x10,0x90,0x60,0x00, // j
0x80,0x80,0x90,0xA0,0xC0,0xA0,0x90,0x00, // k
0x60,0x20,0x20,0x20,0x20,0x20,0x70,0x00, // l
0x00,0x00,0xD0,0xA8,0xA8,0x88,0x88,0x00, // m
0x00,0x00,0xB0,0xC8,0x88,0x88,0x88,0x00, // n
0x00,0x00,0x70,0x88,0x88,0x88,0x70,0x00, // o
0x00,0x00,0xF0,0x88,0x88,0xF0,0x80,0x80, // p
0x00,0x00,0x68,0x90,0x90,0xB0,0x50,0x18, // q
0x00,0x00,0xB0,0xC8,0x80,0x80,0x80,0x00, // r
0x00,0x00,0x70,0x80,0x70,0x08,0xF0,0x00, // s
0x40,0x40,0xE0,0x40,0x40,0x48,0x30,0x00, // t
0x00,0x00,0x88,0x88,0x88,0x98,0x68,0x00, // u
0x00,0x00,0x88,0x88,0x88,0x50,0x20,0x00, // v
0x00,0x00,0x88,0x88,0xA8,0xA8,0x50,0x00, // w
0x00,0x00,0x88,0x50,0x20,0x50,0x88,0x00, // x
0x00,0x00,0x88,0x88,0x88,0x78,0x08,0x70, // y
0x00,0x00,0xF8,0x10,0x20,0x40,0xF8,0x00, // z
0x20,0x40,0x40,0x80,0x40,0x40,0x20,0x00, // {
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x00, // |
0x40,0x20,0x20,0x10,0x20,0x20,0x40,0x00, // }
0x00,0x00,0x40,0xA8,0x10,0x00,0x00,0x00, // ~
0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC, // 95 rectangle
0x40,0x20,0x10,0xF8,0x10,0x20,0x40,0x00,// 96 fl?he droite
0x10,0x20,0x40,0xF8,0x40,0x20,0x10,0x00,// 97 fl?he gauche
0x20,0x70,0xA8,0x20,0x20,0x20,0x00,0x00,// 98 fl?he haut
0x00,0x20,0x20,0x20,0xA8,0x70,0x20,0x00,// 99 fl?he bas
0x00,0x70,0xF8,0xF8,0xF8,0x70,0x00,0x00,// 100 rond
 
};
 
 
 
 
 
 
 
void kolumnawysw(int liczba, int osX, int osZ){
 LINEX=255;
 LINEY=255;
 LINEZ=255;
 
 LINEZ=~(0b00000001<<osZ);
 LINEX=~(0b00000001<<osX);
 LINEY=liczba;
 _delay_loop_1(30);
 
}
 
 
int main(void)
{
 
 char napis[] = "AVRkwiat";
 
 int i=0;
 int j=0;
 int liczba = 0;
 int czas=0;
 
 //jak szybbko sie porusza
 int opoznienie=200;
 
 int wielkosc = 8;
 int szerokoscCzcionki = 8;
 int pusteKolumny = 10;
 
 int przesun=0;
 
 //init
 LINEX = 255;
 LINEY = 255;
 LINEZ = 255;
 XDDR = 255;
 YDDR = 255;
 ZDDR = 255;
 
 
 //dlugosc tablicy
 for(i=0; napis[i] != NULL; i++){
 liczba++;
 };
 
 //dlugosc wysweitlanej tablicy literi + puste miejsce po literce + wolne na koncach i poczatku
 liczba=(liczba*szerokoscCzcionki) + liczba + (2*pusteKolumny);
 
 //czyszczenie tablicy do wyswietlenia
 int tabTest[liczba];
 for(i=0; i<liczba; i++){
 tabTest[i]=255;
 
 };
 
 //tworzenie tablicy do wyswietlenia
 for(j=0; napis[j] != NULL; j++){
 for(i=0; i<szerokoscCzcionki+1; i++){
 if(i != szerokoscCzcionki){
 //negacja=tab[(napis[j]-65)*szerokoscCzcionki+i];
 tabTest[pusteKolumny+(szerokoscCzcionki+1)*j+i]=~tab[(napis[j]-32)*szerokoscCzcionki+i];
 }
 else tabTest[pusteKolumny+(szerokoscCzcionki+1)*j+i]=255;
 };
 
 };
 
 
 while(1)
 {
 przesun++;
 for(czas=0; czas<opoznienie;czas++){
 for (i=0;i<wielkosc;i++){
 for(j=0;j<wielkosc;j++){
 kolumnawysw(tabTest[(szerokoscCzcionki*i+j)+przesun],j,i);
 
 
 }
 }
 }
 if(przesun>=liczba-pusteKolumny){
 przesun=0;
 }
 
 
 }
}

 

Nowa wersja z odwróconymi czcionkami:

/*
author: Marcin Kwiatkowski
Mail: Makwiatkow gmail.com
Version: 1.0
year: 2016-10-01
Microcontroler: Atmega32
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */
#include <avr/io.h>
#include <avr/interrupt.h>
#include <avr/eeprom.h>
 
#include <stdlib.h>
#include <util/delay_basic.h>
 
#define LINEX PORTB  //port za wiersz (os x)
#define LINEY PORTA  //port za kolumna (os y)
#define LINEZ PORTC  //port za Z
 
#define XDDR DDR(LINEX)
#define YDDR DDR(LINEY)
#define ZDDR DDR(LINEZ)
#define DDR(x)  _SFR_IO8(_SFR_IO_ADDR(x) - 1)
 
#define PAMIEC  1024
 
 
 
 
char tab[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // espace
0x20,0x20,0x20,0x20,0x20,0x00,0x20,0x00, // !
0x50,0x50,0x50,0x00,0x00,0x00,0x00,0x00, // "
0x50,0x50,0xF8,0x50,0xF8,0x50,0x50,0x00, // #
0x20,0x78,0xA0,0x70,0x28,0xF0,0x20,0x00, // $
0xC0,0xC8,0x10,0x20,0x40,0x98,0x18,0x00, // %
0x60,0x90,0xA0,0x40,0xA8,0x90,0x68,0x00, // &
0x60,0x20,0x40,0x00,0x00,0x00,0x00,0x00, // '
0x10,0x20,0x40,0x40,0x40,0x20,0x10,0x00, // (
0x40,0x20,0x10,0x10,0x10,0x20,0x40,0x00, // )
0x00,0x20,0xA8,0x70,0xA8,0x20,0x00,0x00, // *
0x00,0x20,0x20,0xF8,0x20,0x20,0x00,0x00, // +
0x00,0x00,0x00,0x00,0x60,0x20,0x40,0x00, // ,
0x00,0x00,0x00,0xF0,0x00,0x00,0x00,0x00, // -
0x00,0x00,0x00,0x00,0x00,0x60,0x60,0x00, // .
0x00,0x08,0x10,0x20,0x40,0x80,0x00,0x00, // /
0x70,0x88,0x98,0xA8,0xC8,0x88,0x70,0x00, // 0
0x20,0x60,0x20,0x20,0x20,0x20,0xF8,0x00, // 1
0x70,0x88,0x10,0x20,0x40,0x80,0xF8,0x00, // 2
0xF0,0x08,0x08,0xF0,0x08,0x08,0xF0,0x00, // 3
0x10,0x30,0x50,0x90,0xF8,0x10,0x10,0x00, // 4
0xF8,0x80,0x80,0xF0,0x08,0x08,0xF0,0x00, // 5
0x30,0x40,0x80,0xF0,0x88,0x88,0x70,0x00, // 6
0xF8,0x08,0x10,0x20,0x40,0x40,0x40,0x00, // 7
0x70,0x88,0x88,0x70,0x88,0x88,0x70,0x00, // 8
0x70,0x88,0x88,0x70,0x08,0x08,0x70,0x00, // 9
0x00,0x60,0x60,0x00,0x60,0x60,0x00,0x00, // :
0x00,0x60,0x60,0x00,0x60,0x20,0x40,0x00, // ;
0x10,0x20,0x40,0x80,0x40,0x20,0x10,0x00, // <
0x00,0x00,0xF8,0x00,0xF8,0x00,0x00,0x00, // =
0x40,0x20,0x10,0x08,0x10,0x20,0x40,0x00, // >
0x70,0x88,0x08,0x10,0x20,0x00,0x20,0x00, // ?
0x70,0x88,0x08,0x68,0xA8,0xA8,0x70,0x00, // @
0x70,0x88,0x88,0xF8,0x88,0x88,0x88,0x00, // A
0xF0,0x88,0x88,0xF0,0x88,0x88,0xF0,0x00, // B
0x78,0x80,0x80,0x80,0x80,0x80,0x78,0x00, // C
0xF0,0x88,0x88,0x88,0x88,0x88,0xF0,0x00, // D
0xF8,0x80,0x80,0xF8,0x80,0x80,0xF8,0x00, // E
0xF8,0x80,0x80,0xF8,0x80,0x80,0x80,0x00, // F
0x78,0x80,0x80,0xB0,0x88,0x88,0x70,0x00, // G
0x88,0x88,0x88,0xF8,0x88,0x88,0x88,0x00, // H
0x70,0x20,0x20,0x20,0x20,0x20,0x70,0x00, // I
0x78,0x08,0x08,0x08,0x08,0x90,0x60,0x00, // J
0x88,0x90,0xA0,0xC0,0xA0,0x90,0x88,0x00, // K
0x80,0x80,0x80,0x80,0x80,0x80,0xF8,0x00, // Luint8
0x88,0xD8,0xA8,0x88,0x88,0x88,0x88,0x00, // M
0x88,0x88,0xC8,0xA8,0x98,0x88,0x88,0x00, // N
0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x00, // O
0xF0,0x88,0x88,0xF0,0x80,0x80,0x80,0x00, // P
0x70,0x88,0x88,0x88,0xA8,0x98,0x78,0x00, // Q
0xF0,0x88,0x88,0xF0,0xA0,0x90,0x88,0x00, // R
0x78,0x80,0x80,0x70,0x08,0x08,0xF0,0x00, // S
0xF8,0x20,0x20,0x20,0x20,0x20,0x20,0x00, // T
0x88,0x88,0x88,0x88,0x88,0x88,0x70,0x00, // U
0x88,0x88,0x88,0x88,0x88,0x50,0x20,0x00, // V
0x88,0x88,0x88,0xA8,0xA8,0xD8,0x88,0x00, // W
0x88,0x88,0x50,0x20,0x50,0x88,0x88,0x00, // X
0x88,0x88,0x88,0x50,0x20,0x20,0x20,0x00, // Y
0xF8,0x10,0x20,0x40,0x80,0x80,0xF8,0x00, // Z
0x60,0x40,0x40,0x40,0x40,0x40,0x60,0x00, // [
0x00,0x80,0x40,0x20,0x10,0x08,0x00,0x00, // '\'
0x18,0x08,0x08,0x08,0x08,0x08,0x18,0x00, // ]
0x20,0x50,0x88,0x00,0x00,0x00,0x00,0x00, // ^
0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x00, // _
0x40,0x20,0x10,0x00,0x00,0x00,0x00,0x00, // `
0x00,0x00,0x70,0x08,0x78,0x88,0x78,0x00, // a
0x80,0x80,0x80,0xB0,0xC8,0x88,0xF0,0x00, // b
0x00,0x00,0x70,0x80,0x80,0x88,0x70,0x00, // c
0x08,0x08,0x08,0x68,0x98,0x88,0x78,0x00, // d
0x00,0x00,0x70,0x88,0xF8,0x80,0x70,0x00, // e
0x30,0x48,0x40,0xE0,0x40,0x40,0x40,0x00, // f
0x00,0x00,0x78,0x88,0x88,0x78,0x08,0x70, // g
0x80,0x80,0xB0,0xC8,0x88,0x88,0x88,0x00, // h
0x00,0x20,0x00,0x20,0x20,0x20,0x20,0x00, // i
0x10,0x00,0x30,0x10,0x10,0x90,0x60,0x00, // j
0x80,0x80,0x90,0xA0,0xC0,0xA0,0x90,0x00, // k
0x60,0x20,0x20,0x20,0x20,0x20,0x70,0x00, // l
0x00,0x00,0xD0,0xA8,0xA8,0x88,0x88,0x00, // m
0x00,0x00,0xB0,0xC8,0x88,0x88,0x88,0x00, // n
0x00,0x00,0x70,0x88,0x88,0x88,0x70,0x00, // o
0x00,0x00,0xF0,0x88,0x88,0xF0,0x80,0x80, // p
0x00,0x00,0x68,0x90,0x90,0xB0,0x50,0x18, // q
0x00,0x00,0xB0,0xC8,0x80,0x80,0x80,0x00, // r
0x00,0x00,0x70,0x80,0x70,0x08,0xF0,0x00, // s
0x40,0x40,0xE0,0x40,0x40,0x48,0x30,0x00, // t
0x00,0x00,0x88,0x88,0x88,0x98,0x68,0x00, // u
0x00,0x00,0x88,0x88,0x88,0x50,0x20,0x00, // v
0x00,0x00,0x88,0x88,0xA8,0xA8,0x50,0x00, // w
0x00,0x00,0x88,0x50,0x20,0x50,0x88,0x00, // x
0x00,0x00,0x88,0x88,0x88,0x78,0x08,0x70, // y
0x00,0x00,0xF8,0x10,0x20,0x40,0xF8,0x00, // z
0x20,0x40,0x40,0x80,0x40,0x40,0x20,0x00, // {
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x00, // |
0x40,0x20,0x20,0x10,0x20,0x20,0x40,0x00, // }
0x00,0x00,0x40,0xA8,0x10,0x00,0x00,0x00, // ~
0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC, // 95 rectangle
0x40,0x20,0x10,0xF8,0x10,0x20,0x40,0x00,// 96 fl?he droite
0x10,0x20,0x40,0xF8,0x40,0x20,0x10,0x00,// 97 fl?he gauche
0x20,0x70,0xA8,0x20,0x20,0x20,0x00,0x00,// 98 fl?he haut
0x00,0x20,0x20,0x20,0xA8,0x70,0x20,0x00,// 99 fl?he bas
0x00,0x70,0xF8,0xF8,0xF8,0x70,0x00,0x00,// 100 rond
 
};
 
 
uint8_t eeprom_val[PAMIEC] __attribute__((section(".eeprom")));
//unsigned char EEMEM  my_eeprom_array[PAMIEC];
 
 
int m=1;
char temp;
 
ISR(USART_RXC_vect)
{
 while ( !(UCSRA & (1<<RXC)) );
 temp=UDR;
 
 eeprom_busy_wait();
 eeprom_write_byte (&eeprom_val[m], temp); // zapis do eeprom
 m++;
 eeprom_busy_wait();
 eeprom_write_byte (&eeprom_val[0], m); // zapis do eeprom
 if(temp =='$'){
 for(m=0;m<PAMIEC;m++){
 eeprom_write_byte (&eeprom_val[m], 0xFF);
 }
 }
 
 
}
 
 
 
 
void kolumnawysw(int liczba, int osX, int osZ){
 LINEX=255;
 LINEY=255;
 LINEZ=255;
 
 LINEZ=~(0b00000001<<osZ);
 LINEX=~(0b00000001<<osX);
 LINEY=liczba;
 _delay_loop_1(30);
 
}
 
 
 
int main(void)
{
 int i=0;
 int j=0;
 int k=0;
 int liczba = 0;
 int czas=0;
 
 //char napis[] = "abcdefghijklmnoprstuwyzABCDEFGHIJKLMNOPRSTUWYZ";
 
 
 //sczytanie wielkosci napisu z eepromu, ktory znajduje sie w zerowej komorce pamieci
 eeprom_busy_wait();
 liczba= eeprom_read_byte(&eeprom_val[0]);
 
 //liczba=10;
 //scczytywanie liter z eeprom
 char napis[liczba];
 for(i=1;i<liczba;i++){
 eeprom_busy_wait();
 napis[i]= eeprom_read_byte(&eeprom_val[i]);
 }
 
 
 //jak szybko sie porusza
 int opoznienie=200;
 
 int wielkosc = 8;
 int szerokoscCzcionki = 8;
 int pusteKolumny = 10;
 
 int przesun=0;
 
 //init
 LINEX = 255;
 LINEY = 255;
 LINEZ = 255;
 XDDR = 255;
 YDDR = 255;
 ZDDR = 255;
 
 //RS232 deklaracja
 UBRRL = 51;  //predkosc 9600 uart
 UCSRB =_BV(TXEN)|_BV(RXEN)|_BV(RXCIE);
 UCSRC |= (1<<URSEL)|(3<<UCSZ0);
 sei();    // włącz obsługę przerwań
 
 
 //dlugosc wysweitlanej tablicy literi + puste miejsce po literce + wolne na koncach i poczatku
 liczba=(liczba*szerokoscCzcionki) + (2*pusteKolumny);
 
 //czyszczenie tablicy do wyswietlenia
 char tabTest[liczba];
 
 for(i=0; i<liczba; i++){
 tabTest[i]=255;
 
 };
 char cache[wielkosc];
 
 
 //odwracanie czcionek
 for(j=1; napis[j] != NULL; j++){
 for(i=0;i<wielkosc;i++){
 cache[i]=0;
 }
 
 for (i=0;i<wielkosc;i++){
 
 for(k=0;k<wielkosc;k++){
 cache[k]|=(((1<<k)&(tab[(napis[j]-32)*wielkosc+i]))>>k)<<i;
 }
 
 //tworzenie tablicy do wyswietlenia 
 }
 for(i=0; i<szerokoscCzcionki; i++){
 tabTest[pusteKolumny+(szerokoscCzcionki-1)*j+i]=~cache[wielkosc-1-i];
 
 /*if(i != szerokoscCzcionki){
 tabTest[pusteKolumny+(szerokoscCzcionki+1)*j+i]=~tab[(napis[j]-32)*szerokoscCzcionki+i];
 }
 else tabTest[pusteKolumny+(szerokoscCzcionki+1)*j+i]=255;
  */
 };
 
 };
 
 
 while(1)
 {
 przesun++;
 for(czas=0; czas<opoznienie;czas++){
 for (i=0;i<wielkosc;i++){
 for(j=0;j<wielkosc;j++){
 kolumnawysw(tabTest[(szerokoscCzcionki*i+j)+przesun],j,i);
 
 
 }
 }
 }
 if(przesun>=liczba-(2*pusteKolumny)){
 przesun=0;
 }
 
 
 }
}