Protocol for USBGraph2 LCDHype driver ===================================== 12.03.2006 Holger Klabunde hk@holger-klabunde.de http://www.holger-klabunde.de Maybe this file is NOT complete ! I made this protocol for using (USB-) COM port based graphical LCD displays with LCDHype. LCD displays are driven by a microcontroller. Used combinations til now: PIC18F2550 and T6963 display 240x64 pixel ATMega128 with FTDI FT245BM and T6963 display 240x64 pixel PIC18F4550 and KS108 display 240x64 pixel (four KS108 controllers) What you have ============= Maximum display size is 256x256 pixel. Parameters are single byte at this time. So each parameter value can vary from 0..255 only. T6963 has 96 characters build in hardware text font in 8x8 or 8x6 sizes. KS108 has 8x8 font (in microcontroller memory !) only. Usable character codes from 0x20 to 0x7F. 32 self definable custom characters. Character Codes 0x00 to 0x1F. Commandset used =============== ############################# # CLEAR_SCREEN 0xB0 ############################# Function: Clear text and graphics screen. Parameter: None ############################# # SET_CURSOR 0xB1 ############################# Function: Set text cursor to position x,y. Parameters: x = coloumn 1 based position y = row 1 based position Position (1,1) is top/left Position ############################# # CURSOR_HOME 0xB2 ############################# Function: Move text cursor to top/left position (1,1). Parameters: None ############################# # SET_CONTRAST 0xB3 ############################# Function: Set contrast value. Parameter: contrast value 0..255 ############################# # SET_LIGHT 0xB4 ############################# Function: Set backlight brightness. Parameter: brightness value 0..255 ############################# # SET_CGCHAR 0xB5 ############################# Function: Programm your own custom character. Parameters: Number of the CG-Char 0..31 (Yes ! 32 Bytes) 8 Bytes of data. Each byte for one row, beginning at the top row. ############################# # SET_PIXEL 0xB6 ############################# Function: Set single pixel !!! FUNCTION REMOVED !!! Very slow :( Parameters: X-Position 0..255 Y-Position 0..255 Pixel value 0..1. 1 is set pixel, 0 is clear pixel ############################# # SET_GFX 0xB7 ############################# Function: Set an array of pixels Parameters: X-Startposition 0..255 Y-Startposition 0..255 Pixel array, 6 or 8 pixel in one byte Pixels are right aligned. ############################# # CLEAR_TEXT 0xB8 ############################# Function: Clear text screen, not used yet Parameter: None ############################# # CLEAR_GFX 0xB9 ############################# Function: Clear grapics screen, not used yet Parameter: None ############################# # SET_GFXBUFFER 0xBA ############################# Function: Set a buffer of pixel arrays Parameters: X-Startposition 0..255 Y-Startposition 0..255 Number of bytes in buffer 0..255 Number * (Pixel arrays, 6 or 8 pixel in one byte) following. Buffer never contains data of TWO or more rows. Data always is in one row. ############################# # SET_BITMAP 0xBB ############################# Function: Transmit a bitmap up to 255 bytes per row and up to 255 rows Parameters: X-Startposition 0..255 Y-Startposition 0..255 Number of bytes in one row of the bitmap Height of the bitmap ############################# # SET_OUTPUTS 0xBE ############################# Function: Set or reset up to 8 pins of your microcontroller Parameters: Number of the port 8 bits of data for the port ############################# # LAST_COMMAND 0xBF ############################# Function: None, never used Parameters: None