//------------------------------------------------- // Shenzhen TOPWAY Technology Co.,Ltd. // LCD Module: LM6072 // Display Size: 192x64 // Driver/Controller: IST3020 // Interface: 6800 mode // by: Shi // Date: 2010-06-22 // by: Wangxikuan // Date: 2018-3-26 // note: ??????????????????? //------------------------------------------------- #include #include #include #define uchar unsigned char // 0~255 #define uint unsigned int // 0~65535 #define LCDBus P1 sbit E = P3^7; sbit R_W = P3^2; sbit RS = P3^6; sbit _CS = P3^4; sbit _RST = P3^5; uchar ContrastLevel; // for contrast setting level //----------------------------------- // dispaly data (128x64) //----------------------------------- uchar code Logo[]={ /*-- ????????????D:\??\6071C.bmp --*/ /*-- ????x???=192x64 --*/ 0xFF,0x01,0x01,0x01,0x01,0x01,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, 0x01,0x01,0x01,0x01,0x81,0x01,0x01,0x81,0x01,0x01,0x01,0x01,0x01,0x81,0x01,0x01, 0x01,0x01,0x01,0x01,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x81,0x01, 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x81,0x01,0x01,0x01, 0x01,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x81,0x01,0x01,0x81,0x01,0x01,0x01,0x81, 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x81,0x01,0x01,0x01,0x01,0x81,0x01,0x01,0x01, 0x01,0x01,0x81,0x01,0x01,0x01,0x01,0x01,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01, 0x01,0x01,0x01,0x01,0x01,0x01,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x81, 0x01,0x01,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x81,0x01,0x01,0x01, 0x01,0x01,0x01,0x01,0x01,0x81,0x81,0x81,0x01,0x81,0x81,0x81,0x81,0x81,0x81,0x01, 0x01,0x01,0x01,0x01,0x01,0x81,0x01,0x01,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01, 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0xFF, 0xFF,0x00,0x00,0x00,0x00,0x84,0xC8,0x21,0x00,0x23,0x29,0xA5,0xF9,0xA1,0x25,0x29, 0x23,0x00,0x08,0x08,0xFF,0x88,0x88,0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,0x00,0x02, 0x02,0xFA,0x0A,0x0A,0x0A,0xFF,0x0A,0x0A,0xFA,0x03,0x02,0x00,0x44,0x44,0xFF,0x24, 0x54,0x21,0xF9,0x27,0x21,0x21,0xE1,0x01,0x00,0x10,0x16,0x1A,0xD2,0x5F,0x52,0x52, 0x5F,0x52,0xDA,0x16,0x12,0x00,0x22,0xF1,0x08,0x17,0xD4,0x57,0xD4,0x17,0x78,0x87, 0x7C,0x04,0x00,0x88,0x49,0x29,0xFF,0x28,0xC8,0x92,0xA4,0x80,0xFF,0x40,0x40,0x00, 0x44,0x24,0xFF,0x14,0x00,0x04,0x74,0x94,0x1F,0x94,0x74,0x04,0x00,0x00,0x10,0x11, 0x11,0xFF,0x11,0x11,0x11,0xFF,0x11,0x11,0x10,0x00,0x00,0x06,0x05,0xC4,0x3C,0x57, 0x94,0x14,0x94,0x75,0x04,0x04,0x00,0x42,0x22,0x12,0xFA,0xAE,0xAB,0xAA,0xAA,0xAA, 0xFA,0x03,0x02,0x00,0x00,0xFF,0x88,0xF7,0x00,0xFF,0x14,0x74,0x94,0x54,0x3F,0x00, 0x00,0x20,0x10,0x08,0x06,0xC1,0x30,0x00,0x81,0x06,0x08,0x10,0x20,0x00,0x04,0x05, 0xF5,0x95,0x95,0x95,0xF5,0x05,0x05,0x01,0xFF,0x01,0x00,0x00,0x00,0x00,0x00,0xFF, 0xFF,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x02,0x02,0x01,0x00,0x07,0x00,0x01,0x02, 0x02,0x00,0x01,0x03,0x01,0x04,0x02,0x01,0x00,0x00,0x01,0x00,0x00,0x07,0x00,0x00, 0x00,0x03,0x00,0x00,0x00,0x07,0x00,0x02,0x03,0x00,0x00,0x00,0x00,0x04,0x07,0x00, 0x00,0x00,0x07,0x02,0x02,0x02,0x07,0x00,0x00,0x00,0x00,0x00,0x07,0x05,0x05,0x05, 0x05,0x05,0x07,0x00,0x00,0x00,0x00,0x07,0x04,0x02,0x01,0x00,0x03,0x05,0x02,0x01, 0x02,0x04,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00, 0x00,0x04,0x07,0x00,0x04,0x04,0x04,0x02,0x01,0x02,0x04,0x04,0x00,0x00,0x04,0x02, 0x01,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x00,0x04,0x02,0x01,0x04,0x04,0x02, 0x02,0x01,0x02,0x02,0x04,0x04,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x00,0x04, 0x07,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x07,0x04,0x02,0x00,0x01,0x02,0x04, 0x00,0x00,0x00,0x02,0x07,0x02,0x02,0x02,0x02,0x03,0x06,0x00,0x00,0x00,0x00,0x00, 0x01,0x00,0x00,0x00,0x01,0x00,0x02,0x04,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0xFF, 0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0xF0,0xF0,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0xF0,0xF0,0xF0,0xF0,0xF0,0xE0,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0xF0,0xF0,0xF0,0xF0,0xF0,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0xC0,0xC0,0xE0,0xE0,0x70,0x70,0x70,0x70,0x70,0xF0,0xE0, 0xE0,0xC0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xC0,0xE0,0xF0,0x70,0x70, 0x70,0x70,0x70,0xF0,0xE0,0xE0,0xC0,0x00,0x00,0x00,0x00,0x00,0x70,0x70,0x70,0x70, 0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0xF0,0xF0,0x70,0x00,0x00, 0x00,0x00,0x80,0xC0,0xE0,0xE0,0xF0,0x70,0x70,0x70,0x70,0x70,0x70,0xF0,0xE0,0xE0, 0xC0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xF0, 0xF0,0x70,0xF0,0xF0,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,0xFF, 0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x01,0x0F,0x7F,0xFF,0xF8,0xC0,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0xC0,0xF8,0xFF,0x7F,0x0F,0x01,0xFF,0xFF,0xFF,0x00,0x00, 0x00,0x00,0xE0,0xFE,0xFF,0x0F,0x83,0xC1,0xC0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xC0, 0xC3,0x87,0x07,0x06,0x00,0x00,0x00,0x00,0xF0,0xFF,0xFF,0x0F,0x01,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x01,0x0F,0xFF,0xFF,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0xC0,0xE0,0xF8,0x3C,0x0E,0x07,0x01,0x00,0x00,0x00,0x00, 0x00,0x06,0x07,0x07,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC3, 0xFF,0xFF,0x3E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0xF0,0xFE,0x7F,0x0F, 0x03,0x00,0x03,0x0F,0x7F,0xFE,0xF0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF, 0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x03,0x1F,0xFF,0xFE,0xF0, 0x80,0x00,0x00,0xF0,0xFE,0xFF,0x1F,0x03,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00, 0x00,0x00,0x7F,0xFF,0xFF,0x07,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01, 0x07,0xFF,0xFE,0xF8,0x00,0x00,0x00,0x00,0x7F,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x80,0xF0,0xFC,0x7F,0x0F,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xC0,0xC0,0xE0,0x70,0x78,0x3C,0x1E,0x0F,0x07, 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0xF8,0xFE,0x7F,0x7F,0x71,0x70,0x70, 0x70,0x70,0x70,0x70,0x70,0x71,0x7F,0x7F,0xFE,0xF8,0xC0,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF, 0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x7F,0x7F,0x7F,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70, 0x70,0x00,0x00,0x00,0x00,0x7F,0x7F,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x3F, 0x7F,0x78,0x7F,0x3F,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0x7F,0x7F,0x00,0x00, 0x00,0x00,0x00,0x03,0x0F,0x1F,0x3C,0x38,0x70,0x70,0x70,0x70,0x70,0x70,0x38,0x3C, 0x1E,0x0F,0x07,0x01,0x00,0x00,0x00,0x00,0x00,0x07,0x1F,0x3F,0x3C,0x78,0x70,0x70, 0x70,0x70,0x70,0x78,0x3C,0x1F,0x0F,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x78,0x7F,0x7F,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x60,0x78,0x7C,0x7E,0x77,0x77,0x73,0x71,0x70,0x70,0x70,0x70,0x70,0x70,0x70, 0x70,0x70,0x70,0x00,0x00,0x60,0x78,0x7F,0x3F,0x07,0x01,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x07,0x3F,0x7F,0x78,0x60,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF, 0xFF,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xFF, }; //----------------------------------- // Delay Routine //----------------------------------- void delayms(uint m) // 12MHz Xtal, close to ms value { uint j; uint i; for(i=0; i