Gast
#215902
Hi, ich habe ein display vom Typ T6963 an einen AVR angeschlossen. Es funktioniert ja auch schon so weit ganz gut. Z.B. möchte ich ein Pixel bzw. meherer Pixel löschen können. Das mit dem Pixel setzen funktioniert auch super nur die Routine ClearPixel funktioniert nicht. void LCD_PutPixel(unsigned char x, unsigned char y, unsigned char Set) { unsigned int XY; unsigned char bitByte; XY=0x0000; XY=XY+(y*22); XY=XY+(x/6); out(0x24, XY & 0x00FF, XY>>8); 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 lcd_clear_pixel(unsigned char x, unsigned char y) { unsigned int XY; unsigned char bitByte; unsigned char data; XY=0x0000; XY=XY+(y*22); XY=XY+(x/6); out(0x24, XY & 0x00FF, XY>>8); data = 5-(x % 6); /* Read existing display */ out(0xC5,0,0); data = (~data) & read_data(); /* Write modified data */ out(0xC0,0,data); }