//------------------------------------------------- // Shenzhen TOPWAY Technology Co.,Ltd. // LCD Module: LM16032D // Display Size: 160x32 // Driver/Controller: ST7920 // Interface: 6800 mode // by: Kenny // Date: 2007-04-09 // System; AT89S52 (12MHz) //------------------------------------------------- #include #include #include #define uchar unsigned char // 0~255 #define uint unsigned int // 0~65535 #define LCDBUS P1 sbit PSB = P3^4; sbit _RES = P3^5; sbit RS = P3^1; sbit RW = P3^7; sbit E = P3^6; //----------------------------------- // dispaly data (160x32) //----------------------------------- uchar code GraphicLogo[]={ /*-- TOPWAY LOGO 160x32 --*/ 0xC0,0x00,0x00,0x00,0x00,0x00,0xAA,0xA0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x03,0x80,0x00,0x00,0x00,0x00,0x55,0x50,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x0A,0xAA,0x83,0xF0, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01, 0x55,0x54,0x3F,0xF0,0x00,0x0F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xE0,0x00,0x00,0x00, 0x00,0x00,0x00,0x2A,0xAA,0xA0,0xFF,0xF0,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00, 0x20,0x00,0x00,0x00,0x00,0x00,0x05,0x55,0x55,0x47,0xFF,0xF0,0x00,0x08,0x82,0x22, 0x1C,0x71,0xC7,0x38,0x20,0x00,0x00,0x00,0x00,0x0A,0xAA,0xAA,0xAA,0x1F,0xFF,0xF0, 0x00,0x08,0x83,0x66,0x20,0x8A,0x28,0xA4,0x20,0x00,0x00,0x00,0x05,0x55,0x55,0x55, 0x54,0x7F,0xFF,0xF0,0x00,0x08,0x82,0xA2,0x20,0x98,0x20,0xA2,0x20,0x00,0x00,0x00, 0x00,0x00,0x02,0xAA,0xA9,0xFF,0xFF,0xF0,0x00,0x08,0x82,0xA2,0x3C,0xA8,0xC1,0x22, 0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x55,0x43,0xFF,0xFF,0xF0,0x00,0x08,0x82,0x22, 0x22,0xC8,0x22,0x22,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0xAA,0x8F,0xFF,0xFF,0xF0, 0x00,0x08,0x82,0x22,0x22,0x8A,0x24,0x24,0x20,0x00,0x00,0x00,0x00,0x00,0x01,0x55, 0x3F,0xFF,0xFF,0xF0,0x00,0x08,0xFA,0x27,0x1C,0x71,0xCF,0xB8,0x20,0x00,0x00,0x00, 0x00,0x00,0x00,0xAA,0x7F,0xFF,0xFF,0xF0,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00, 0x20,0x00,0x00,0x00,0x00,0x00,0x01,0x54,0xFF,0xFF,0xFF,0xF0,0x00,0x0F,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF,0xE0,0x00,0x00,0x00,0x00,0x00,0x02,0xA9,0xFF,0xFF,0xFF,0xF0, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x53, 0xFF,0xFF,0xFF,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x02,0xA7,0xFF,0xFF,0xFF,0xF0,0x00,0x07,0x3E,0x88,0x10,0x39,0xC0,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x4F,0xFF,0xFF,0xFF,0xF0,0x00,0x08,0x88,0x88, 0x10,0x45,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0A,0x9F,0xFF,0xFF,0xFF,0xF0, 0x00,0x08,0x08,0xC8,0x10,0x41,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x15,0x3F, 0xFF,0xFF,0xFF,0xF0,0x00,0x07,0x08,0xA8,0x10,0x41,0x10,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x0A,0x7F,0xFF,0xFF,0xFF,0xF0,0x00,0x00,0x88,0x98,0x10,0x41,0x10,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x14,0xFF,0xFF,0xFF,0xFF,0xF0,0x00,0x08,0x88,0x88, 0x10,0x45,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x29,0xFF,0xFF,0xFF,0xFF,0xF0, 0x00,0x07,0x08,0x88,0x1F,0x39,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x53,0xFF, 0xFF,0xFF,0xFF,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x27,0xFF,0xFF,0xFF,0xFF,0xF0,0x00,0x02,0x1C,0x70,0x03,0x8E,0x01,0xE1, 0x00,0x00,0xC0,0x00,0x00,0x00,0x47,0xFF,0xFF,0xFF,0xFF,0xF0,0x00,0x06,0x20,0x88, 0x04,0x51,0x01,0x10,0x00,0x00,0x40,0x00,0x00,0x00,0x8E,0x0C,0x61,0xBB,0xBB,0xB0, 0x00,0x02,0x20,0x9A,0x20,0x41,0x01,0x13,0x11,0x38,0x43,0x80,0x00,0x00,0x5F,0xBB, 0xAE,0xBB,0x5D,0x70,0x00,0x02,0x3C,0xA9,0x41,0x82,0x01,0xE1,0x0A,0x44,0x44,0x00, 0x00,0x00,0x9F,0xBB,0xA1,0xAA,0x0E,0xF0,0x00,0x02,0x22,0xC8,0x80,0x44,0x01,0x01, 0x04,0x7C,0x43,0x80,0x00,0x01,0x3F,0xBC,0x6F,0xD6,0xEE,0xF0,0x00,0x02,0x22,0x89, 0x44,0x48,0x01,0x01,0x0A,0x40,0x40,0x40,0x80,0x02,0x7F,0xFF,0xFF,0xFF,0xFF,0xF0, 0x00,0x07,0x1C,0x72,0x23,0x9F,0x01,0x03,0x91,0x38,0xE7,0x81,0xC0,0x00,0x7F,0xFF, 0xFF,0xFF,0xFF,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03}; uchar code TextLogo[]={ /*-- TOPWAY LOGO 144x32 --*/ "TOPWAY?????? " "????????? (LCDM)"}; //----------------------------------- // Delay Routine //----------------------------------- void delayms(uint m) // 12MHz Xtal, close to ms value { uint j; uint i; for(i=0; i