//------------------------------------------------- // Shenzhen TOPWAY Technology Co.,Ltd. // LCD Module: LM24064F // Display Size: 240x64 // Driver/Controller: T6963 // Interface: 8080 mode // by: GuoQ // Date: 2009-11-10 // System; AT89S52 (12MHz) //------------------------------------------------- #include #include #include #define uchar unsigned char // 0~255 #define uint unsigned int // 0~65535 #define TxHm 0x00 // Text DATA RAM Home Address (High byte only) #define GpHm 0x08 // Graphic DATA RAM Home Address (High byte only) #define LCDBUS P1 sbit _WR = P3^7; sbit _RD = P3^0; sbit _CE = P3^1; sbit C_D = P3^6; sbit _RST = P3^5; sbit FS1 = P3^4; //----------------------------------- // Graphic dispaly data //----------------------------------- // TOPWAY Graphics LOGO (240x64) uchar code GraphicLogo[]={ /*-- ????????????D:\guoq files\technic support\pic\logo pic\LM24064F-logo.bmp --*/ /*-- ????x???=240x64 --*/ 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x00, 0x00,0x00,0x00,0x05,0x55,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x00,0x00, 0x02,0xAA,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x55,0x54, 0x1F,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x00,0x0A,0xAA,0xA1,0xFF,0x80, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x01,0x55,0x55,0x07,0xFF,0x80,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x01,0x80,0x00,0x2A,0xAA,0xAA,0x3F,0xFF,0x90,0x00,0x48,0x20,0x40, 0x10,0x00,0x42,0x04,0x88,0x08,0x41,0x04,0x00,0x10,0x09,0x00,0x40,0x3B,0xF0,0x24, 0x00,0x05,0x80,0x55,0x55,0x55,0x50,0xFF,0xFF,0x8B,0xFC,0x49,0x20,0x22,0x13,0xF8, 0x24,0x0A,0xA8,0x70,0x41,0x04,0x0F,0xF8,0x48,0x80,0x42,0x2A,0x10,0x24,0x0F,0xFF, 0xAA,0xAA,0xAA,0xAA,0xA3,0xFF,0xFF,0x82,0x04,0x49,0x2F,0xFF,0x10,0x81,0xFF,0xD2, 0xA8,0x12,0x41,0x04,0x02,0x20,0x88,0x0F,0xFF,0x2A,0x10,0x42,0x00,0x05,0x80,0x00, 0x15,0x55,0x4F,0xFF,0xFF,0xA0,0x90,0x49,0x20,0x20,0x7C,0x81,0x24,0x83,0xEE,0x11, 0x47,0xBF,0x82,0x20,0xFF,0xE0,0x80,0x2B,0xF0,0x42,0x1F,0xF5,0x80,0x00,0x02,0xAA, 0x1F,0xFF,0xFF,0x91,0x49,0xF9,0x23,0xFC,0x11,0x00,0xA5,0x04,0x14,0xFC,0x41,0x04, 0x02,0x20,0x10,0x01,0xFC,0x32,0x10,0x81,0x00,0x05,0x80,0x00,0x05,0x54,0x7F,0xFF, 0xFF,0x80,0x40,0x49,0x22,0x24,0x15,0x03,0xFF,0xCB,0xF4,0x12,0x41,0x9F,0x1F,0xFC, 0x1F,0x83,0x04,0x2B,0xF1,0x10,0x87,0xC5,0x80,0x00,0x0A,0xA9,0xFF,0xFF,0xFF,0x8B, 0xFC,0x49,0x22,0x24,0x1B,0xF0,0x00,0x18,0x14,0x39,0x43,0x11,0x02,0x20,0x10,0x85, 0xFC,0x2A,0x92,0x10,0x44,0x45,0x80,0x00,0x05,0x53,0xFF,0xFF,0xFF,0x90,0x40,0x49, 0x22,0x24,0x75,0x10,0x7F,0x09,0xD4,0x54,0x75,0x11,0x02,0x20,0x28,0x89,0x04,0x2A, 0xA0,0x20,0x04,0x45,0x80,0x00,0x0A,0xA7,0xFF,0xFF,0xFF,0xB0,0xE0,0x79,0x22,0x24, 0x11,0x10,0x41,0x09,0x48,0x97,0xC1,0x0A,0x02,0x20,0x25,0x01,0xFC,0x3A,0x40,0x24, 0x07,0xC5,0x80,0x00,0x15,0x4F,0xFF,0xFF,0xFF,0x91,0x51,0xC9,0x22,0x24,0x11,0x10, 0x7F,0x09,0x68,0x10,0x41,0x04,0x04,0x20,0x42,0x01,0x04,0x22,0x20,0x42,0x04,0x45, 0x80,0x00,0x2A,0x9F,0xFF,0xFF,0xFF,0x96,0x4C,0x90,0x22,0x2C,0x11,0xF0,0x41,0x0A, 0x54,0x10,0x41,0x0A,0x08,0x20,0x8D,0x81,0x04,0x22,0x90,0xFF,0x00,0x15,0x80,0x00, 0x15,0x3F,0xFF,0xFF,0xFF,0x90,0x40,0x20,0x20,0x20,0x31,0x10,0x7F,0x0C,0x22,0x10, 0x43,0x71,0x90,0x21,0x30,0x61,0x0C,0x23,0x08,0x41,0x00,0x09,0x80,0x00,0x2A,0x7F, 0xFF,0xFF,0xFF,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x54,0xFF,0xFF,0xFF, 0xFF,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x00,0xA9,0xFF,0xFF,0xFF,0xFF,0x80, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x53,0xFF,0xFF,0xFF,0xFF,0x9F,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFD,0x80,0x00,0xA7,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x01,0x80,0x01,0x4F,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01, 0x80,0x02,0x9F,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x01, 0x3F,0xFF,0xFF,0xFF,0xFF,0x86,0x40,0x00,0x08,0x00,0x03,0xE7,0x1E,0x88,0x88,0x88, 0x7C,0x00,0x80,0x01,0x00,0x00,0x03,0x80,0x01,0x00,0x40,0x01,0x80,0x02,0x3F,0xFF, 0xFF,0xFF,0xFF,0x89,0x40,0x00,0x08,0x00,0x00,0x88,0x92,0x94,0x94,0x50,0x10,0x00, 0x80,0x01,0x00,0x00,0x04,0x40,0x01,0x10,0x40,0x01,0x80,0x04,0x70,0x63,0x0D,0xDD, 0xDD,0x88,0x71,0x9C,0xEE,0x33,0x80,0x88,0x92,0x55,0x14,0x50,0x11,0x8C,0xE7,0x19, 0x31,0xD1,0x04,0x0C,0x01,0x39,0xC0,0x01,0x80,0x02,0xFD,0xDD,0x75,0xDA,0xEB,0x86, 0x4A,0x52,0x29,0x4A,0x40,0x88,0x9E,0x55,0x22,0x20,0x12,0x52,0x94,0xA5,0x4A,0x4A, 0x04,0x12,0x01,0x12,0x40,0x01,0x80,0x04,0xFD,0xDD,0x0D,0x50,0x77,0x81,0x4B,0xD2, 0x49,0x7A,0x40,0x88,0x90,0x55,0x3E,0x20,0x13,0xD0,0x94,0xA5,0x4A,0x4A,0x04,0x12, 0x01,0x12,0x40,0x01,0x80,0x09,0xFD,0xE3,0x7E,0xB7,0x77,0x89,0x4A,0x12,0x89,0x42, 0x40,0x88,0x90,0x55,0x22,0x20,0x12,0x12,0x94,0xA5,0x4A,0x4A,0x04,0x52,0x01,0x12, 0x40,0x01,0x80,0x13,0xFF,0xFF,0xFF,0xFF,0xFF,0x86,0x49,0xD2,0xE9,0x3A,0x40,0x87, 0x10,0x22,0x41,0x20,0x11,0xCC,0x94,0x99,0x31,0xC4,0x03,0x8C,0x49,0xF9,0xC8,0x01, 0x80,0x03,0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x44,0x00,0x00,0x08,0x00,0x00,0x01,0x80,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x01,0x88,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0xE0,0x00,0x3E,0x00,0x3E,0x01, 0xFC,0x00,0x00,0xC0,0x0F,0xC0,0x01,0xF8,0x00,0x03,0x01,0xFF,0xFE,0x00,0x00,0x00, 0x00,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0xE0,0x00,0x3E,0x00,0x3E,0x07,0xFF,0x00, 0x01,0xC0,0x3F,0xF0,0x07,0xFE,0x00,0x07,0x01,0xFF,0xFE,0x00,0x00,0x00,0x00,0x01, 0x80,0x00,0x00,0x00,0x00,0x00,0xE0,0x00,0x3F,0x00,0x7E,0x0F,0xFF,0x80,0x03,0xC0, 0x7F,0xF8,0x0F,0xFF,0x00,0x0F,0x01,0xFF,0xFE,0x00,0x00,0x00,0x00,0x01,0x80,0x00, 0x00,0x00,0x00,0x00,0xE0,0x00,0x3F,0x00,0x7E,0x0F,0x07,0x80,0x07,0xC0,0xF8,0x78, 0x1E,0x0F,0x00,0x1F,0x01,0xC0,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x00,0x00, 0x00,0x00,0xE0,0x00,0x3F,0x00,0x7E,0x1C,0x03,0xC0,0x07,0xC0,0xE0,0x1C,0x3C,0x07, 0x80,0x1F,0x01,0xC0,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x00,0x00, 0xE0,0x00,0x3B,0x80,0xEE,0x1C,0x01,0xC0,0x0F,0xC0,0xE0,0x1C,0x38,0x03,0x80,0x3F, 0x01,0xC0,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0xE0,0x00, 0x3B,0x80,0xEE,0x00,0x01,0xC0,0x1D,0xC1,0xC0,0x0E,0x38,0x00,0x00,0x77,0x01,0xC0, 0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0xE0,0x00,0x3B,0x80, 0xEE,0x00,0x01,0xC0,0x3D,0xC1,0xC0,0x0E,0x70,0x00,0x00,0xF7,0x01,0xC0,0x00,0x00, 0x00,0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0xE0,0x00,0x39,0x80,0xCE,0x00, 0x01,0xC0,0x39,0xC1,0xC0,0x0E,0x71,0xF8,0x00,0xE7,0x01,0xC0,0x00,0x00,0x00,0x00, 0x00,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0xE0,0x00,0x39,0xC1,0xCE,0x00,0x03,0x80, 0x71,0xC1,0xC0,0x0E,0x77,0xFC,0x01,0xC7,0x01,0xC0,0x00,0x00,0x00,0x00,0x00,0x01, 0x80,0x00,0x00,0x00,0x00,0x00,0xE0,0x00,0x39,0xC1,0xCE,0x00,0x03,0x80,0xE1,0xC1, 0xC0,0x0E,0x7F,0xFE,0x03,0x87,0x01,0xFF,0xF8,0x00,0x00,0x00,0x00,0x01,0x80,0x00, 0x00,0x00,0x00,0x00,0xE0,0x00,0x39,0xC1,0xCE,0x00,0x07,0x00,0xE1,0xC1,0xC0,0x0E, 0x7E,0x0F,0x03,0x87,0x01,0xFF,0xF8,0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x00,0x00, 0x00,0x00,0xE0,0x00,0x38,0xE3,0x8E,0x00,0x0E,0x01,0xC1,0xC1,0xC0,0x0E,0x78,0x07, 0x87,0x07,0x01,0xFF,0xF8,0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x00,0x00, 0xE0,0x00,0x38,0xE3,0x8E,0x00,0x1C,0x03,0x81,0xC1,0xC0,0x0E,0x70,0x03,0x8E,0x07, 0x01,0xC0,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0xE0,0x00, 0x38,0xE3,0x8E,0x00,0x38,0x07,0x01,0xC1,0xC0,0x0E,0x70,0x03,0x9C,0x07,0x01,0xC0, 0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0xE0,0x00,0x38,0x63, 0x0E,0x00,0xF0,0x07,0xFF,0xF9,0xC0,0x0E,0x70,0x03,0x9F,0xFF,0xE1,0xC0,0x00,0x00, 0x00,0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0xE0,0x00,0x38,0x77,0x0E,0x01, 0xE0,0x07,0xFF,0xF9,0xC0,0x0E,0x70,0x03,0x9F,0xFF,0xE1,0xC0,0x00,0x00,0x00,0x00, 0x00,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0xE0,0x00,0x38,0x77,0x0E,0x03,0x80,0x07, 0xFF,0xF8,0xE0,0x1C,0x38,0x03,0x9F,0xFF,0xE1,0xC0,0x00,0x00,0x00,0x00,0x00,0x01, 0x80,0x00,0x00,0x00,0x00,0x00,0xE0,0x00,0x38,0x77,0x0E,0x07,0x00,0x00,0x01,0xC0, 0xE0,0x1C,0x38,0x07,0x00,0x07,0x01,0xC0,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x00, 0x00,0x00,0x00,0x00,0xE0,0x00,0x38,0x36,0x0E,0x0E,0x00,0x00,0x01,0xC0,0xF8,0x7C, 0x1E,0x0F,0x00,0x07,0x01,0xC0,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x00,0x00, 0x00,0x00,0xFF,0xFC,0x38,0x3E,0x0E,0x0F,0xFF,0xC0,0x01,0xC0,0x7F,0xF8,0x1F,0xFE, 0x00,0x07,0x01,0xC0,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x00,0x00, 0xFF,0xFC,0x38,0x3E,0x0E,0x1F,0xFF,0xC0,0x01,0xC0,0x3F,0xF0,0x07,0xFC,0x00,0x07, 0x01,0xC0,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0xFF,0xFC, 0x38,0x1C,0x0E,0x1F,0xFF,0xC0,0x01,0xC0,0x0F,0xC0,0x03,0xF0,0x00,0x07,0x01,0xC0, 0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x01,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, }; //----------------------------------- // Delay Routine //----------------------------------- void delayms(uint m) // 12MHz Xtal, close to ms value { uint j; uint i; for(i=0; i