<acronym id="xonnx"></acronym>
      <td id="xonnx"></td>
    1. <pre id="xonnx"></pre>

      1. 專注電子技術學習與研究
        當前位置:單片機教程網 >> MCU設計實例 >> 瀏覽文章

        基于51單片機的240128液晶繪圖

        作者:浪子   來源:浪子   點擊數:  更新時間:2014年06月10日   【字體:

         #include<AT89X52.H>

        #include<math.h>
        #define uchar unsigned char
        #define uint  unsigned int
        #define L240DAT P1
        sbit L240CD=P2^0;
        sbit L240RD=P2^1;
        sbit L240WR=P2^2;
        sbit L240BC=P1^0;
        sbit L240BD=P1^1;
        sbit RST=P3^5;
        bit flag;
        uchar t,h,l,dat,s;
        uchar code a[3840] = {
         0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,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,0x0F,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,0x7F,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,0xFF,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1E,0x07,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0xC0,0x00,0x07,0xFF,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x7E,0x33,0x8E,0xE3,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xFF,0xFC,0x00,0x0F,0xFF,0x80,0x00,0x01,0xFF,0xC0,0x00,0x00,0xE7,0xC0,0xF8,0x3E,0x38,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x17,0xFF,0xC0,0x3F,0xFF,0x00,0x00,0x07,0xFF,0xFC,0x00,0x03,0x00,0x80,0x60,0x18,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x07,0xFF,0xF0,0x7F,0xFF,0x00,0x00,0x0C,0x00,0x0F,0x80,0x02,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x7F,0x80,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0xFF,0xFD,0xFF,0xFF,0x00,0x00,0x18,0x00,0x19,0xE0,0x06,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x1F,0xFF,0xF8,0x00,
        0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x1F,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x0F,0x80,0x30,0x79,0xFC,0x00,0x00,0x00,0x00,0x03,0xF8,0x00,0xFC,0x00,0x5E,0x00,
        0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x7F,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x03,0xE0,0x20,0x0F,0x0C,0x00,0x00,0x00,0x00,0x03,0x0C,0x07,0xC0,0x00,0x43,0x80,
        0x00,0x00,0x00,0x00,0x00,0x04,0x01,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x38,0x40,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x1E,0x00,0x00,0x41,0x80,
        0x00,0x00,0x00,0x00,0x00,0x04,0x03,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x0E,0x40,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x3A,0x7B,0x00,0x00,0x7F,0x80,
        0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0xFF,0xFF,0xFF,0xFF,0xFE,0x00,0x00,0x00,0x03,0x80,0x3C,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0xE1,0x80,0x01,0xFC,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0xFF,0xFF,0xFF,0xFF,0xFE,0x00,0x00,0x00,0x01,0xC1,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x80,0xC0,0x07,0x80,0x00,
        0x00,0x00,0x00,0x00,0x00,0x0B,0x5F,0xFF,0xFF,0xFF,0xFB,0xFE,0x00,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x60,0x1C,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x0F,0xDF,0xFF,0xFF,0xFF,0xFB,0xF0,0x00,0x00,0x00,0x00,0x36,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x30,0x70,0x00,0x00,
        0x00,0x00,0x3F,0xFF,0x80,0x0F,0xFF,0xFF,0xFF,0xFF,0xF3,0xE0,0x00,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x10,0xE0,0x00,0x00,
        0x00,0x00,0x3F,0xFF,0xFF,0x0F,0xFF,0xFF,0xFF,0xFF,0xC7,0xE0,0x00,0x00,0x00,0x00,0x0C,0x00,0x00,0xC0,0x00,0x00,0x00,0x00,0x01,0x80,0x19,0x80,0x00,0x00,
        0x00,0x00,0x1F,0xFF,0xFF,0xCF,0xFF,0xFF,0xFF,0xFF,0x87,0xE0,0x00,0x00,0x00,0x00,0x08,0x00,0x03,0x80,0x00,0x00,0x00,0x00,0x01,0xE0,0x0F,0x00,0x00,0x00,
        0x00,0x00,0x1F,0xFF,0xFF,0xFB,0xFF,0xFF,0xE0,0x00,0x7F,0xF8,0x00,0x00,0x00,0x00,0x08,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x0E,0x00,0x00,0x00,
        0x00,0x00,0x0F,0xFF,0xFF,0xFF,0xFF,0xC0,0x00,0x03,0xFF,0xFC,0x00,0x00,0x00,0x00,0x38,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x3E,0x0C,0x00,0x00,0x00,
        0x00,0x00,0x07,0xFF,0xFF,0xFC,0x00,0x00,0x0F,0xFF,0xFF,0xFC,0x00,0x00,0x00,0x00,0xF0,0x00,0x0C,0x00,0x01,0x00,0x00,0x00,0x00,0x3F,0x18,0x00,0x00,0x00,
        0x00,0x00,0x07,0xFF,0xFF,0xFE,0x00,0x03,0xFF,0xFF,0xFF,0xFC,0x00,0x00,0x00,0x01,0x80,0x00,0x0C,0x00,0x01,0x00,0x00,0x00,0x00,0x01,0xB8,0x00,0x00,0x00,
        0x00,0x00,0x03,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xF8,0x00,0x00,0x00,0x03,0x00,0x00,0x08,0x00,0x01,0x00,0x00,0x00,0x00,0x01,0xEC,0x00,0x00,0x00,
        0x00,0x00,0x03,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xF8,0x00,0x00,0x00,0x03,0x00,0x00,0x08,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,
        0x00,0x00,0x01,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFC,0x00,0x00,0x00,0x02,0x00,0x00,0x08,0x00,0x01,0x18,0x00,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,
        0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFC,0x00,0x00,0x00,0x02,0x00,0x00,0x08,0x00,0x01,0xF8,0x38,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,
        0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x06,0x00,0x00,0x1C,0x00,0x00,0xFF,0xF8,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,
        0x00,0x00,0x00,0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xF0,0x00,0x00,0x0C,0x00,0x00,0x74,0x00,0x00,0x0F,0x0C,0x00,0x00,0x00,0xE6,0x00,0x00,0x00,
        0x00,0x00,0x00,0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFC,0x00,0x00,0x18,0x00,0x0B,0xC6,0x00,0x00,0x08,0x06,0x00,0x00,0x03,0xFF,0x00,0x00,0x00,
        0x00,0x00,0x00,0x3F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x10,0x00,0x1F,0x03,0x00,0x00,0x18,0x03,0x80,0x00,0x06,0x07,0x00,0x00,0x00,
        0x00,0x00,0x00,0x1F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x30,0x00,0x10,0x00,0xC0,0x00,0x30,0x01,0xF0,0x00,0x04,0x03,0x80,0x00,0x00,
        0x00,0x00,0x00,0x1F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xC0,0x00,0x70,0x00,0x31,0xFC,0x60,0x00,0xE7,0xF0,0x38,0x00,0x0C,0x01,0x80,0x00,0x00,
        0x00,0x00,0x00,0x0F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xF0,0x00,0x70,0x00,0x6F,0xFF,0x3E,0x07,0x9F,0xFE,0x08,0x00,0x0C,0x00,0x80,0x00,0x00,
        0x00,0x00,0x00,0x0F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xF8,0x00,0xF0,0x01,0xDF,0xFF,0xC7,0xFE,0x7F,0xFF,0x0C,0x00,0x0C,0x00,0xC0,0x00,0x00,
        0x00,0x00,0x00,0x03,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xF6,0x01,0xFF,0xFE,0x01,0x90,0x03,0x80,0x00,0x40,0x00,0x40,0x00,0x0C,0x00,0x0C,0x00,0x60,0x00,0x00,
        0x00,0x00,0x00,0x03,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xC7,0x00,0xFF,0xFE,0x03,0x10,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x04,0x00,0x30,0x00,0x00,
        0x00,0x00,0x00,0x01,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x7F,0xFE,0x06,0x10,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x06,0x00,0x18,0x00,0x00,
        0x00,0x00,0x00,0x01,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x7F,0xFC,0x0C,0x30,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x03,0x80,0x18,0x00,0x00,
        0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0x00,0x01,0xFF,0xF0,0x06,0x20,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x00,0xE0,0x70,0x00,0x00,
        0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFC,0x00,0x3F,0xFF,0xF0,0x03,0xE0,0x00,0x80,0xFC,0x00,0x00,0x03,0xF0,0x00,0xC0,0x00,0x3F,0xE0,0x00,0x00,
        0x00,0x00,0x00,0x00,0x7F,0xFF,0xFF,0xFF,0xFF,0xFC,0x03,0xFF,0xFF,0xF0,0x00,0xE0,0x00,0x83,0xEF,0x00,0x00,0x0F,0xFC,0x00,0xC0,0x00,0x00,0x80,0x00,0x00,
        0x00,0x00,0x00,0x01,0xFF,0xFF,0xFF,0xFF,0xFF,0xFC,0x3F,0xFF,0xFF,0xF0,0x00,0x60,0x01,0x86,0x01,0x80,0x00,0x18,0x06,0x00,0xC0,0x00,0x00,0x80,0x00,0x00,
        0x00,0x00,0x00,0x01,0xFF,0xFF,0xFF,0xFF,0xFF,0xFC,0xFF,0xFF,0xFF,0xFC,0x00,0x20,0x01,0x0C,0x04,0xC0,0x00,0x30,0x03,0x00,0x40,0x00,0x01,0x80,0x00,0x00,
        0x00,0x00,0x00,0x03,0xFF,0xFF,0xFF,0xC1,0xFF,0xFF,0xFF,0xFF,0xFF,0xF8,0x00,0x20,0x03,0x18,0x1F,0x60,0x00,0x20,0x79,0x80,0x60,0x00,0x01,0x80,0x00,0x00,
        0x00,0x00,0x00,0x03,0xFF,0xFF,0xFE,0xC0,0x7F,0xFF,0xFF,0xFF,0xFF,0xF0,0x00,0x30,0x01,0x18,0x2F,0xE0,0x00,0x60,0xFC,0x80,0x20,0x00,0x01,0x00,0x00,0x00,
        0x00,0x00,0x00,0x07,0xFF,0xFF,0xF0,0xC0,0x1F,0xFF,0xFF,0xFF,0xFF,0xE0,0x00,0x30,0x01,0x90,0x7F,0xE0,0x00,0x61,0xBE,0x80,0x10,0x00,0x01,0x80,0x00,0x00,
        0x00,0x00,0x00,0x0F,0xFF,0xFF,0xE0,0x00,0x1F,0xFF,0xFF,0xFF,0xFF,0xE0,0x00,0x20,0x00,0x90,0x7F,0xE0,0x00,0x61,0xFE,0x80,0x10,0x00,0x00,0x80,0x00,0x00,
        0x00,0x00,0x00,0x0F,0xFF,0xFF,0xC0,0x00,0x1F,0xFF,0xFF,0xFF,0xFF,0xC0,0x00,0x60,0x00,0xD8,0x3F,0xA0,0x00,0x61,0xFE,0x80,0x30,0x00,0x00,0xC0,0x00,0x00,
        0x00,0x00,0x00,0x1F,0xFF,0xFF,0x80,0x07,0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x60,0x00,0xD8,0x3F,0xE0,0x00,0x60,0xFE,0x80,0x60,0x00,0x00,0xC0,0x00,0x00,
        0x00,0x00,0x00,0x1F,0xFF,0xFF,0x80,0x1F,0xFF,0xFF,0xF1,0xFF,0xFF,0x80,0x00,0x60,0x00,0xC8,0x0E,0x60,0x00,0x20,0xFD,0x80,0x60,0x00,0x00,0xC0,0x00,0x00,
        0x00,0x00,0x00,0x1F,0xFF,0xFF,0x01,0xFF,0xFF,0xFF,0xF1,0xFF,0xFF,0x00,0x00,0x20,0x00,0x8C,0x00,0xC0,0x00,0x30,0x33,0x00,0x40,0x00,0x00,0xC0,0x00,0x00,
        0x00,0x00,0x00,0x3F,0xFF,0xFF,0x03,0xFF,0xFF,0xFF,0xF1,0xFF,0xFF,0x00,0x00,0x30,0x01,0x87,0x03,0x80,0x00,0x1C,0x06,0x00,0x40,0x00,0x01,0x80,0x00,0x00,
        0x00,0x00,0x00,0x3F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x10,0x01,0x01,0xFF,0x00,0x00,0x07,0xFC,0x00,0x40,0x00,0x01,0x00,0x00,0x00,
        0x00,0x00,0x00,0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xDF,0x80,0x00,0x18,0x03,0x80,0x78,0x00,0x00,0x03,0xF0,0x00,0x40,0x00,0x03,0x00,0x00,0x00,
        0x00,0x00,0x00,0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x1F,0x80,0x00,0x08,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x00,0x06,0x00,0x00,0x00,
        0x00,0x00,0x00,0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFC,0x1F,0x00,0x00,0x18,0x00,0x80,0x00,0x3F,0x00,0x00,0x00,0x03,0xC0,0x40,0xE6,0x00,0x00,0x00,
        0x00,0x00,0x00,0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xE0,0x7F,0x00,0x00,0x18,0x00,0xC0,0x00,0xFF,0xC0,0x00,0x00,0x06,0x00,0xE1,0xB6,0x00,0x00,0x00,
        0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x03,0xFF,0x00,0x00,0x18,0x00,0xC0,0x01,0xBF,0xC0,0x00,0x00,0x04,0x00,0xB3,0x26,0x00,0x00,0x00,
        0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0x07,0xFF,0x00,0x00,0x18,0x00,0x80,0x01,0xFF,0xE0,0x00,0x00,0x04,0x00,0xD6,0x44,0x00,0x00,0x00,
        0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xC0,0x3F,0xFF,0x80,0x00,0x0C,0x00,0xC0,0x01,0xFF,0xC0,0x00,0x00,0x04,0x00,0xDC,0xCC,0x00,0x00,0x00,
        0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0xFF,0xFE,0xF0,0x00,0x07,0x00,0xE0,0x00,0xFF,0xC0,0x00,0x00,0x04,0x00,0xC9,0xBC,0x00,0x00,0x00,
        0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xC0,0x0F,0xFF,0xFE,0x00,0x00,0x01,0x00,0x20,0x00,0x7F,0x00,0x00,0x00,0x1C,0x00,0x89,0xE6,0x00,0x00,0x00,
        0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x3F,0xFF,0xFC,0x00,0x00,0x01,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x8C,0x1C,0x00,0x00,0x00,
        0x00,0x00,0x00,0x0F,0xFF,0xFF,0xFF,0xFE,0x00,0x07,0xFF,0xFF,0xFC,0x00,0x00,0x01,0x80,0x30,0x01,0x80,0x01,0xC0,0x00,0x30,0x01,0x88,0x70,0x00,0x00,0x00,
        0x00,0x00,0x00,0x03,0xFF,0xFF,0xE0,0xC0,0x03,0xFF,0xC7,0xFB,0xF8,0x00,0x00,0x00,0xE0,0x20,0x00,0xF0,0xFF,0x80,0x00,0x30,0x03,0x00,0x78,0x00,0x00,0x00,
        0x00,0x00,0x00,0x03,0xFF,0xFF,0xE1,0xC0,0x1F,0xFF,0x03,0xF9,0xFE,0x00,0x00,0x00,0x78,0x20,0x00,0x7F,0xF8,0x80,0x00,0x30,0x06,0x00,0x0C,0x00,0x00,0x00,
        0x00,0x00,0x00,0x07,0xFF,0xFF,0xFF,0xFF,0xFF,0xFC,0x03,0xFB,0xF0,0x00,0x00,0x00,0x0C,0x60,0x00,0x18,0x0F,0x80,0x00,0x18,0x0C,0x01,0xFC,0x00,0x00,0x00,
        0x00,0x00,0x00,0x07,0xFF,0xFF,0xFF,0xFF,0xE0,0xF8,0x03,0xF3,0xE0,0x00,0x00,0x00,0x07,0xF0,0x00,0x08,0x7C,0x80,0x00,0x18,0x10,0x07,0x80,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x03,0xFF,0xFF,0xFF,0x00,0x00,0x07,0xC7,0xC0,0x00,0x00,0x00,0x01,0x18,0x00,0x09,0xC0,0x80,0x00,0x10,0x60,0x0E,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFE,0x00,0x00,0x0F,0x8F,0xC0,0x00,0x00,0x00,0x00,0x0C,0x00,0x0F,0x00,0x80,0x00,0x11,0xC0,0x18,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x3F,0xFF,0xFC,0x00,0x00,0x7E,0x3F,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x0C,0x01,0x80,0x00,0x1F,0x00,0x60,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x1F,0xFF,0xFC,0x00,0x01,0xF8,0x3F,0x00,0x00,0x00,0x00,0x00,0x03,0x80,0x04,0x01,0x00,0x00,0x1C,0x00,0xC0,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x0F,0xFF,0xF3,0x00,0x7F,0x80,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x06,0x03,0x00,0x00,0x70,0x03,0x80,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x07,0xFF,0xC2,0xFF,0xE0,0x07,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x03,0x02,0x00,0x03,0xE0,0x06,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x03,0xFF,0xF0,0x00,0x00,0x0F,0xF8,0x00,0x00,0x00,0x00,0x00,0x01,0x9F,0x81,0x8C,0x00,0x3F,0x80,0x1C,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFE,0x00,0x00,0xFF,0xC4,0x00,0x00,0x00,0x00,0x00,0x03,0x3E,0xFE,0xF8,0x0F,0xFF,0x00,0x30,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x80,0x07,0xFF,0x84,0x00,0x00,0x00,0x00,0x00,0x06,0x27,0x87,0xFF,0xFF,0x1F,0x00,0xE0,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x67,0xE0,0x0F,0xE0,0xF1,0x07,0x80,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0xFF,0xFF,0xFF,0xF9,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x66,0x3C,0x18,0x3F,0x81,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,0xFF,0xFF,0xC1,0x80,0x00,0x00,0x00,0x00,0x00,0x30,0x4C,0x0F,0xF8,0x0C,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x7F,0xFF,0xFD,0xC3,0xC0,0x7E,0x00,0x00,0x00,0x00,0x20,0xCC,0x06,0xFC,0x8C,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xBF,0xFF,0xEF,0x43,0xC0,0xFF,0x00,0x00,0x00,0x00,0x40,0xCC,0x06,0xA1,0xCC,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x01,0xFF,0xC0,0x07,0xFC,0x07,0xC1,0xFF,0x00,0x00,0x00,0x00,0xC0,0xCC,0x05,0xA3,0xCC,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x03,0xFF,0xFE,0x07,0xF0,0x0F,0xE3,0xFF,0x80,0x00,0x00,0x00,0x81,0x8C,0x05,0xB1,0xCC,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x03,0xFF,0xFF,0x00,0x00,0x0F,0xFF,0xFF,0x80,0x00,0x00,0x01,0x81,0x8C,0x05,0xB0,0xD8,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x03,0xFF,0xFF,0x80,0x80,0x1F,0xFF,0xFF,0x00,0x00,0x00,0x01,0x01,0x08,0x04,0xBC,0xF0,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x07,0xFF,0xFF,0xC3,0x04,0x3F,0xFF,0xFF,0x00,0x00,0x00,0x01,0x03,0x08,0x04,0xB7,0xE0,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x07,0xFF,0xFF,0xE0,0xF0,0x7F,0xFF,0xFF,0x00,0x00,0x00,0x02,0x03,0x88,0x0C,0xF0,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x03,0xFF,0xFF,0xFC,0x01,0xFF,0xFF,0xFE,0x00,0x00,0x00,0x02,0x07,0x88,0x0E,0xF0,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x83,0xFF,0xF8,0x78,0x00,0x00,0x00,0x06,0x05,0x08,0x0F,0xF8,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,0xFF,0xEF,0xFF,0x80,0x70,0x00,0x00,0x00,0x0C,0x0D,0x08,0x0C,0x18,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x03,0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x00,0x00,0x18,0x09,0x9C,0xEC,0x18,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x07,0x7F,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x00,0x00,0x10,0x08,0x97,0xBE,0x10,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x30,0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x00,0x00,0x30,0x08,0xB1,0x37,0x10,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x61,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x20,0x08,0xB0,0x04,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x80,0x7F,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x78,0x08,0xB0,0x04,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x01,0x83,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x56,0x48,0xA0,0x0C,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x01,0x07,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x54,0x48,0xFC,0x48,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x01,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x34,0xE8,0x46,0xF8,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x3E,0xB0,0x63,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x02,0x00,0x1F,0xFF,0xFF,0xFF,0xFE,0x00,0x00,0x00,0x00,0x00,0x0F,0x80,0x30,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x02,0x01,0xFF,0xFF,0xFF,0xFF,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x02,0x07,0xFF,0xFF,0xFF,0xFF,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x02,0x0F,0xFF,0xFF,0xFF,0xFF,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x02,0x1B,0xFF,0xFF,0xFF,0xFF,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x02,0x3C,0x3F,0xFF,0xFF,0xFF,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x02,0x30,0x0F,0xFF,0xFF,0xFF,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0xE0,0x00,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x40,0x03,0xFF,0xFF,0xFF,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2F,0x30,0xFF,0xDC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0xC0,0x01,0xFF,0xFF,0xFC,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x1F,0x86,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x01,0x80,0x03,0xE0,0x7F,0x80,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x30,0x02,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x01,0x00,0x03,0xC0,0x00,0x00,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x30,0x03,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xC0,0x00,0x00,0x1E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3C,0x38,0x03,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xC0,0x00,0x00,0x1E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC6,0x28,0x01,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0xE0,0x00,0x00,0x3F,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x01,0xCC,0x07,0x0B,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xF0,0x00,0x00,0x7F,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x0C,0x0C,0xF9,0x80,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x01,0xFF,0xF8,0x00,0x00,0x7F,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x0C,0x18,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x03,0xFF,0xFC,0x00,0x01,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x0C,0x60,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x07,0xFF,0xFC,0x00,0x01,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x1C,0xE0,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x07,0xFF,0xFC,0x00,0x01,0xFF,0xFF,0x80,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x78,0x80,0x03,0x80,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x0F,0xFF,0xFC,0x00,0x01,0xFF,0xFF,0x80,0x00,0x00,0x00,0x00,0x00,0x18,0x03,0xF1,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x0F,0xFF,0xF8,0x00,0x00,0xFF,0xFF,0x80,0x00,0x00,0x00,0x00,0x00,0x1F,0xFF,0x83,0x00,0x1E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x07,0xFF,0xF0,0x00,0x00,0x7F,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0xFE,0x03,0x00,0x3C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x03,0xFF,0xC0,0x00,0x00,0x3F,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xE0,0x01,0x00,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x00,0x00,0x00,0x03,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xFF,0xE0,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,0xFF,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00  
        };
         void Delay(int x)
        {int k,m;
           { for(m=0;m<x;m++)
            for(k=0;k<25;k++);
           }
        }
        void LCD_NOP(void)
          {
            unsigned    char i;
           for(i=0;i<5;i++);
          }
         uchar l240rc(void)
        {
            uchar chk;
            L240DAT=0xff;
            L240RD=1;
            L240CD=1;
            L240RD=0;
            chk=L240DAT;
            L240RD=1;
            return chk;
        }
        void l240wcl(uchar dat1,uchar dat2,uchar com)
        {
            while((l240rc()&0x03)!=0x03);
            L240CD=0;
            L240DAT=dat1;
            L240WR=0;
         LCD_NOP();
            L240WR=1;
            while((l240rc()&0x03)!=0x03);
            L240CD=0;
            L240DAT=dat2;
            L240WR=0;
         LCD_NOP();
            L240WR=1;
            while((l240rc()&0x03)!=0x03);
            L240CD=1;
            L240DAT=com;
            L240WR=0;
         LCD_NOP();
            L240WR=1;
        }
        void l240wc(uchar dat)
        {
            while((l240rc()&0x03)!=0x03);
            L240CD=1;
            L240DAT=dat;
            L240WR=0;
         LCD_NOP();
            L240WR=1;
        }
        void l240wd(uchar dat)
        {
            while((l240rc()&0x03)!=0x03);
            L240CD=0;
            L240DAT=dat;
            L240WR=0;
         LCD_NOP();
            L240WR=1;
        }
        void l240wdz(uchar dat)       //進入自動讀寫模式時判忙函數
        {
            while((l240rc()&0x08)!=0x08);
            L240CD=0;
            L240DAT=dat;
            L240WR=0;
         LCD_NOP();
            L240WR=1;
        }
        void intl240(void)
        {
            L240CD=1;
            L240WR=1;
            L240RD=1;
            L240BC=1;
            L240BD=1;
            l240wcl(0x00,0x00,0x40);//初始化
            l240wcl(0x20,0x00,0x41);
            l240wcl(0x00,0x08,0x42);
            l240wcl(0x20,0x00,0x43);
            l240wc(0xa7);
            l240wc(0x81);
        }
        void writepoint(uchar x,uchar y,uchar show)
        {
          uchar x_pt,y_pt;
          uint address;
          x_pt=x;
          if(show==1)
           y_pt=y+128;
          address=(y_pt&0x7f)*32+x_pt/8+0x0800;  //計算顯示存儲器地址
          l240wcl((uchar)(address),(uchar)(address>>8),0x24);  //設置顯示存儲器地址
          x_pt=(~(x_pt%8))&0x07;
          y_pt=((y_pt&0x80)>>4)|0xf0;
          l240wc(x_pt|y_pt);  //寫入數據
        }
         //設置地址
        void glcd_set_address(unsigned int addr){
         l240wd((unsigned char)(addr));
         l240wd(addr>>8);
         l240wc(0x24);  //0x24為設定地址命令
        }
        void clear_graph(void)         // 圖形清屏
        {
         int i;
         glcd_set_address(0x800);     // 設置地址為圖形區基地址
         for (i=0;i<3840*2;i++)     // 必須為3840
         {
          l240wd(0);   // 寫入數據0x00 則不顯示
          l240wc(0xc0);    // 0xc0為數據寫入、增加指針 命令
             }
          }
         
        void clear_c(void)          //清文本
           { int m;
            l240wcl(0x00,0x00,0x24);
            l240wc(0xb0);
            for(m=0;m<0x0800;m++)
            {
                l240wdz(0x00);
            }
            l240wc(0xb2);
           } 
         void draw()
         { uchar b[8];
          for(h=0;h<128;h++)
            { for(l=0;l<30;l++)
             { dat=a[30*h+l];
            b[0]=dat/128;
             b[1]=dat/64%2;
             b[2]=dat/32%2;
               b[3]=dat/16%2;
               b[4]=dat/8%2;
               b[5]=dat/4%2;
               b[6]=dat/2%2;
               b[7]=dat/2;
              for(s=0;s<8;s++)
              if(b[s]==flag)
              writepoint(l*8+s,h,1);   
           }
          }       
           }
         void timer0(void) interrupt 1
          {
          TH0=0x3c;
          TL0=0xb0;
          t+=1;
          if(t==240)
          { t=0;
            clear_graph(); 
             flag=!flag;
             h=0;
             l=0;
             s=0;
          if(flag==1)
             dat=0;  
          else
          dat=0xff;
            }
         l240wc(0x98);   
          }   
        main()
        { TMOD=0x01;
          TH0=0x3c;
          TL0=0xb0; 
          EA=1;
          ET0=1;
          TR0=1;        
          RST=0;
           Delay(10);
           RST=1;  
             intl240();  ///初始化必有
                clear_c();
                clear_graph();
                l240wc(0x98);
         while(1)
         {draw();
          }       
        }
        關閉窗口

        相關文章

        欧美性色欧美精品视频,99热这里只有精品mp4,日韩高清亚洲日韩精品一区二区,2020国自产拍精品高潮