Zeige Beiträge
|
Seiten: [1]
|
4
|
LCDs und -Software / LCDs Allgemein / Re: T6963 Bitmap darstellen funktioniert nicht
|
am: Februar 21, 2005, 12:45:28
|
Hallo!
Im Anhang befindet sich der C-Code. Wie müsste die Funktion aussehen, damit ich ein Bitmap darstellen lassen kann? Ich habe ein tool mit dem ich die Bitmap Datei umwandeln kann, so dass ich nur noch eine Routine brauch um das Bild darstellen zu können. Kann mir da jemand helfen?
void LCD_PutPixel(unsigned char x, unsigned char y, unsigned char Set) { unsigned int XY; unsigned char bitByte;
XY=0x000; XY=XY+(y*22); XY=XY+(x/6);
out(0x24, XY & 0x00FF, XY>> ; bitByte=5-(x % 6); if (0 != Set) { bitByte |= 0xF8; } else { bitByte|=0xF0; }
out(bitByte, 0, 0); //0b1111SXXX , s is set/reset, xxx is bit number xxx //(Each memorybyte i six graphics bits (pixels)) }
void out(char commando,char dataa, char datab) { lcd_status(); pause(); rd = 1; pause(); cd = 0; pause(); PORTC = dataa; pause(); wr = 0; pause(); wr = 1; pause(); PORTC = datab; pause(); wr = 0; pause(); wr = 1; pause(); cd = 1; pause(); PORTC = commando; pause(); wr = 0; pause(); wr = 1; pause(); cd = 1; pause(); } //----------------------------------// void autoreset(void) { PORTC = 0xB2; pause(); wr = 0; pause(); wr = 1; }
void autowrite(void) { PORTC = 0xB0; pause(); wr = 0; pause(); wr = 1; }
void lcd_data(char daten) { lcd_status(); cd = 0; pause(); PORTC = daten; pause(); wr = 0; pause(); wr = 1; pause(); cd = 1; }
void lcd_commando(char commando) { pause(); rd = 1; pause(); cd = 1; pause(); PORTC = commando; pause(); wr = 0; pause(); wr = 1; pause(); cd = 1; pause(); } |
|
|
|
|