//------------------------------------------------- // Shenzhen TOPWAY Technology Co.,Ltd. // LCD Module: LM3033 // Display Size: 128x64 (256x32) // Driver/Controller: ST7920 // Interface: 6800 mode // by: Kenny // Date: 2006-11-14 // 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 (256x32) //----------------------------------- uchar code GraphicLogo[]={ /*-- TOPWAY LOGO 256x32 --*/ 0xC0,0x00,0x00,0x00,0x00,0x05,0x55,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x80,0x00,0x00,0x00,0x02,0xAA,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,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,0x00,0x00,0x00, 0x00,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,0x00,0x00,0x00, 0x00,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,0x00,0x00,0x00, 0x00,0x00,0x2A,0xAA,0xAA,0x3F,0xFF,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,0x55,0x55,0x55,0x50,0xFF,0xFF,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, 0x0A,0xAA,0xAA,0xAA,0xA3,0xFF,0xFF,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,0x15,0x55,0x4F,0xFF,0xFF,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x01,0x04,0x4E,0x38,0xE3,0x80,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x02,0xAA,0x1F,0xFF,0xFF,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x01,0x06,0xD1,0x45,0x14,0x40,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x05,0x54,0x7F,0xFF,0xFF,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x01,0x05,0x41,0x44,0x10,0x40,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x0A,0xA9,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x01,0x04,0x42,0x44,0x20,0x80,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x05,0x53,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x01,0x04,0x41,0x44,0x10,0x40,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x0A,0xA7,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x01,0x04,0x51,0x45,0x14,0x40,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x15,0x4F,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x01,0xF4,0x4E,0x38,0xE3,0x80,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x2A,0x9F,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,0x00,0x00,0x00, 0x00,0x00,0x15,0x3F,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,0x00,0x00,0x00, 0x00,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,0x00,0x00,0x00, 0x00,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,0x00,0x00,0x00, 0x00,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,0x00,0x00,0x00, 0x00,0x00,0x53,0xFF,0xFF,0xFF,0xFF,0x84,0x00,0x12,0x08,0x80,0x02,0x10,0x24,0x40, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0xA7,0xFF,0xFF,0xFF,0xFF,0x82,0xFF,0x12,0x48,0x9F,0xC1,0x20,0x55,0x40, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x01,0x4F,0xFF,0xFF,0xFF,0xFF,0x80,0x81,0x12,0x48,0x84,0x0F,0xFE,0x95,0x40, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x02,0x9F,0xFF,0xFF,0xFF,0xFF,0x88,0x24,0x12,0x4B,0xE4,0x09,0x24,0x1F,0x70, 0x10,0xE3,0x82,0x7C,0xE7,0xCE,0x38,0xE1,0x0E,0x38,0x27,0xCE,0x7C,0xE3,0x8E,0x10, 0x00,0x01,0x3F,0xFF,0xFF,0xFF,0xFF,0x84,0x52,0x7E,0x48,0x88,0x05,0x28,0x20,0xA0, 0x31,0x14,0x46,0x41,0x10,0x51,0x45,0x13,0x11,0x44,0x64,0x11,0x05,0x14,0x51,0x30, 0x00,0x02,0x3F,0xFF,0xFF,0xFF,0xFF,0x80,0x10,0x12,0x48,0xA8,0x1F,0xFE,0x5F,0xA0, 0x10,0x10,0x4A,0x79,0x00,0x91,0x45,0x11,0x01,0x04,0xA7,0x90,0x09,0x14,0x51,0x10, 0x00,0x04,0x70,0x63,0x0D,0xDD,0xDD,0x82,0xFF,0x12,0x48,0xDF,0x80,0x00,0xC0,0xA0, 0x10,0x20,0x92,0x05,0xE1,0x0E,0x3D,0x11,0x02,0x09,0x20,0x5E,0x10,0xE3,0xD1,0x10, 0x00,0x02,0xFD,0xDD,0x75,0xDA,0xEB,0x84,0x10,0x12,0x4B,0xA8,0x83,0xF8,0x4E,0xA0, 0x10,0x40,0x5F,0x05,0x11,0x11,0x05,0x11,0x04,0x05,0xF0,0x51,0x11,0x10,0x51,0x10, 0x00,0x04,0xFD,0xDD,0x0D,0x50,0x77,0x8C,0x38,0x1E,0x48,0x88,0x82,0x08,0x4A,0x40, 0x10,0x84,0x42,0x45,0x11,0x11,0x45,0x11,0x08,0x44,0x24,0x51,0x11,0x14,0x51,0x10, 0x00,0x09,0xFD,0xE3,0x7E,0xB7,0x77,0x84,0x54,0x72,0x48,0x88,0x83,0xF8,0x4B,0x40, 0x39,0xF3,0x82,0x38,0xE1,0x0E,0x38,0xE3,0x9F,0x38,0x23,0x8E,0x10,0xE3,0x8E,0x38, 0x00,0x13,0xFF,0xFF,0xFF,0xFF,0xFF,0x85,0x93,0x24,0x08,0x8F,0x82,0x08,0x52,0xA0, 0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01, 0x00,0x03,0xFF,0xFF,0xFF,0xFF,0xFF,0x84,0x10,0x08,0x09,0x88,0x83,0xF8,0x61,0x10, 0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03}; uchar code TextLogo[]={ /*-- Text 256x32 --*/ "-TOPWAY LM3033-""128x64 ??ε???" "???ü???(GB)???""???????? "}; //----------------------------------- // Delay Routine //----------------------------------- void delayms(uint m) // 12MHz Xtal, close to ms value { uint j; uint i; for(i=0; i