//------------------------------------------------- // Shenzhen TOPWAY Technology Co.,Ltd. // LCD Module: LM3037 // Display Size: 144x32 // Driver/Controller: ST7920 // Interface: 6800 mode // by: Kenny // Date: 2005-08-06 // 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 (144x32) //----------------------------------- uchar code GraphicLogo[]={ /*-- TOPWAY LOGO 144x32 --*/ 0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x03,0x80,0x00,0x00,0x00,0x00,0x40,0x01,0x08,0x12,0x20,0x21,0x04,0x10,0x00, 0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x4F,0xE0,0x90,0x2A,0xA1,0xC1,0x04, 0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x42,0x07,0xFF,0x4A,0xA0, 0x49,0x04,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xF2,0x04,0x92, 0x0F,0xB8,0x45,0x1E,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x44, 0x02,0x94,0x10,0x53,0xF1,0x04,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x54,0x0F,0xFF,0x2F,0xD0,0x49,0x06,0x7C,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x6F,0xC0,0x00,0x60,0x50,0xE5,0x0C,0x44,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x01,0xD4,0x41,0xFC,0x27,0x51,0x51,0xD4,0x44,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x44,0x41,0x04,0x25,0x22,0x5F,0x04,0x28,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x44,0x41,0xFC,0x25,0xA0,0x41,0x04, 0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x47,0xC1,0x04,0x29,0x50, 0x41,0x04,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC4,0x41,0xFC, 0x30,0x88,0x41,0x0D,0xC6,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,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,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x7C,0xE7,0x91,0x11,0x10,0x20,0x89,0xC7,0x1C,0xF8,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x11,0x14,0x51,0x29,0x10,0x20,0xDA,0x28,0xA2,0x08, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x11,0x14,0x51,0x44,0xA0,0x20,0xA8,0x28, 0x82,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x11,0x17,0x95,0x7C,0x40,0x20, 0xA8,0xC8,0x8C,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x11,0x14,0x15,0x44, 0x40,0x20,0x88,0x28,0x82,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x11,0x14, 0x15,0x44,0x40,0x20,0x8A,0x28,0xA2,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x10,0xE4,0x0A,0x44,0x40,0x3E,0x89,0xC7,0x1C,0x20,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,0x10,0x41,0x00,0x71,0xC0,0x00,0x20,0x00,0x18,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x30,0xC3,0x22,0x8A,0x20,0x00,0x00,0x00,0x08,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x11,0x45,0x14,0x08,0x20,0x3C,0x62,0x27, 0x08,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x12,0x49,0x08,0x30,0x40,0x22, 0x21,0x48,0x88,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x13,0xEF,0x88,0x08, 0x80,0x3C,0x20,0x8F,0x88,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x41, 0x14,0x89,0x00,0x20,0x21,0x48,0x08,0x08,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00, 0x38,0x41,0x22,0x73,0xE0,0x20,0x72,0x27,0x1C,0xF0,0x00,0x00,0x00,0x01,0xC0,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03}; uchar code TextLogo[]={ /*-- TOPWAY LOGO 144x32 --*/ "??????: " "?????????(LCDM)"}; //----------------------------------- // Delay Routine //----------------------------------- void delayms(uint m) // 12MHz Xtal, close to ms value { uint j; uint i; for(i=0; i