12864液晶显示图片

发布者:SereneWhisper最新更新时间:2016-09-14 来源: eefocus关键字:12864液晶  显示图片 手机看文章 扫描二维码
随时随地手机看文章
用12864显示图片程序如下:

#include
#define LCD P0
unsigned char a,i,j,k;
int b;
sbit EN=P2^0;
sbit RW=P2^1;
sbit RS=P2^2;
sbit CS1=P2^3;
sbit CS2=P2^4;
sbit BUSY=P0^0;
char code zi0[8][64]={
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x80,0xC0,0xC0,0xE0,0xF0,
0xFC,0xFE,0xFC,0xFE,0xFF,0xFE,0xFE,0xFF,
0xFF,0xFC,0xFF,0xFF,0xFE,0xFC,0xFC,0xF8,
0xF0,0xF0,0xF0,0xE0,0xE0,0xC0,0xC0,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,0x00,0x00,0xE0,0xF8,
0xFC,0xFE,0xFF,0xFF,0xFF,0x7F,0x7F,0x7F,
0x7F,0x7F,0x7F,0x3F,0x3F,0x3F,0x3F,0x3F,
0x7F,0x3F,0x7F,0x3F,0x3F,0x3F,0x3F,0x3F,
0x3F,0x3F,0x3F,0x7F,0x7F,0x7F,0x7F,0xFF,
0xFF,0xFE,0xFC,0xF8,0xE0,0x80,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0xF8,0xFF,0xFF,0xCF,
0x63,0x60,0x60,0x60,0x60,0x60,0x60,0x60,
0x60,0x60,0x60,0x60,0xC0,0x80,0x00,0x00,
0x00,0x00,0x00,0x00,0x80,0xC0,0x60,0x60,
0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,
0x61,0x63,0xCF,0xFF,0xFF,0xFF,0xE0,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0xF0,0x0F,0xFF,0x1F,0x30,
0x20,0x40,0x40,0x40,0x40,0x40,0x40,0x40,
0x40,0x40,0x40,0x40,0x20,0x11,0x0F,0x02,
0x01,0x01,0x02,0x0F,0x11,0x20,0x40,0x40,
0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,
0x40,0x20,0x30,0x1F,0xFF,0x0F,0xF7,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x0F,0x10,0x3F,0xC0,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,
0x00,0x00,0x10,0x00,0x00,0x20,0x50,0x50,
0x50,0x50,0x90,0x08,0x08,0x08,0x08,0x08,
0x08,0x10,0x10,0x10,0x1F,0x10,0x2F,0x20,
0x20,0x40,0x80,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x0C,
0x30,0x40,0x80,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0E,
0x01,0x01,0x0E,0x00,0x00,0x02,0x05,0x05,
0x05,0x05,0x08,0x10,0x20,0x20,0x20,0xA0,
0x50,0x30,0x20,0xC0,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x01,0x06,0xF8,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x80,0x80,0x41,0xC2,0x44,0xC4,0x48,
0x48,0xC8,0x48,0x50,0x50,0x30,0x10,0x00,
0x00,0x00,0x00,0x10,0x10,0x30,0xD0,0x48,
0xC8,0x48,0xC8,0x64,0xA4,0x62,0xA1,0x10,
0x08,0x04,0x03,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0xC0,0x30,0x0F,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x80,0xF0,0xB0,0x58,0xA8,0x44,0xAA,0x45,
0xAB,0x44,0xAA,0x44,0xAA,0x44,0xAA,0x44,
0xAA,0x45,0xAA,0x44,0xA8,0x48,0xA8,0x48,
0xA8,0x48,0xA8,0x44,0xAA,0x45,0xAA,0x44,
0xAA,0x44,0xAA,0x44,0xAA,0x44,0xAA,0x45,
0xAA,0x44,0xA8,0x70,0xC0,0xC0,0x20,0x10,
0x08,0x06,0x01,0x00,0x00,0x00,0x00,0x00};
char code zi1[8][64]={

0x00,0x00,0x00,0x80,0xC0,0x40,0xA0,0x60,
0xA0,0x60,0xA0,0x40,0x80,0x40,0xA0,0x50,
0xA8,0x54,0x2C,0x16,0x2A,0x15,0x0B,0x15,
0x0B,0x15,0x2A,0x15,0x2A,0x55,0x2A,0x15,
0x2A,0x15,0x2A,0x15,0x0B,0x15,0x0B,0x16,
0x2A,0x54,0xA8,0x58,0xB0,0x60,0xB0,0x58,
0xA8,0x58,0xA8,0x58,0xA8,0x50,0xA0,0xC0,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0xF8,0xAE,0x55,0xAA,0x55,0xAA,0x55,
0xAA,0xD5,0xFA,0x57,0x2A,0x05,0x00,0x00,
0x20,0x20,0x10,0x10,0x10,0x20,0x20,0x40,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x20,0x10,0x10,0x08,0x08,0x08,
0x10,0x10,0x00,0x01,0x0A,0x15,0xAB,0x7D,
0xEA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,
0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x07,0x0A,0x15,0x2A,0x35,0x2A,0x35,
0xAA,0x7F,0xEA,0x15,0x00,0x00,0xC0,0x30,
0x08,0xC4,0xE4,0xF4,0xF4,0xE8,0xD8,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0xD8,0xE8,0xF4,0xF4,0xE4,
0xC4,0x08,0x30,0xC0,0x00,0x00,0x00,0xFD,
0x7F,0xF5,0x6A,0x55,0x2A,0x35,0x1A,0x0D,
0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x3F,0x40,0xFF,0x00,0x00,0x00,0x07,0x00,
0x00,0x0F,0x3F,0x7F,0x7F,0x3F,0x1F,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x1F,0x3F,0x7F,0x7F,0x3F,
0x0F,0x00,0x00,0x03,0x00,0x00,0x00,0xFF,
0x40,0x3F,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,0x03,0x0C,0x30,0x40,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,0x80,0xC0,0x70,0x1E,0x01,
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,
0x03,0x02,0x04,0x08,0x08,0x10,0x10,0x20,
0x20,0x21,0x41,0xC2,0x42,0x44,0x42,0xC2,
0x41,0x21,0x20,0x20,0x10,0x18,0x08,0x04,
0x04,0x02,0x03,0x01,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,0x80,0x70,0x08,0x04,0x02,0x02,0x01,
0x01,0x01,0x01,0x07,0x08,0x10,0x08,0x07,
0x01,0x01,0x01,0x01,0x02,0x02,0x04,0x08,
0x70,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,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x1F,0xE6,0x02,0x02,0x02,0x04,0x38,
0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0xC0,0x38,0x04,0x02,0x02,0x02,
0xE4,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
char code ch[8][128]={
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x80,0x80,0x00,0xC0,0x00,0x00,0x00,0x66,0x70,0x40,0x80,0xF0,0xF8,0xFC,0xFE,0xFE,
0xFF,0xFF,0xFF,0x7F,0x7F,0x7F,0x7E,0x7E,0x7C,0x70,0xE0,0xE0,0xEF,0xE7,0xC3,0xC2,
0xB3,0x07,0x01,0x01,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,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,
0x80,0x80,0xC3,0xE3,0x72,0x3B,0x1C,0x0E,0x07,0x07,0x0B,0x01,0x03,0x03,0x03,0x8B,
0xC9,0xC8,0xC0,0xE0,0xE0,0xE0,0xC0,0xC0,0x00,0x06,0x00,0x0C,0xB0,0xD0,0xD0,0xD1,
0x83,0x1F,0xFF,0xFF,0xFF,0xFE,0xFE,0x7C,0x00,0x00,0x30,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,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x8C,0xE7,0xF0,0xFC,0xFE,0xFE,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFD,0xF0,0xF0,0xE0,0xC0,0x00,0x00,0x00,0x00,0x00,0x0F,0x1F,0x9F,
0xDF,0x9F,0x1F,0x1F,0xCF,0xC7,0xC3,0xC1,0x80,0xE0,0xE8,0xC6,0x1F,0x7F,0xFF,0x7F,
0xBF,0xFF,0xFE,0xFF,0xCF,0xC3,0x81,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x80,0xE4,0xFA,0x7C,0x1F,0x0F,0x0F,0x3F,0x7F,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xDF,0xEF,0xE7,0xF3,0xFB,0xFF,0xFF,
0xFF,0xFF,0xFF,0xF6,0xFE,0xFF,0xDF,0xFF,0xFF,0xFF,0xFF,0xF9,0xF8,0xFC,0xFE,0xFE,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0x7C,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x80,0x80,0xC0,0xC6,0xC0,0xC0,0xC0,
0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0x70,0x70,0x70,0x74,0x74,0x70,0xE0,0xF0,0xF0,
0xF8,0xF8,0xFC,0xFC,0xFC,0xFC,0xFC,0xF8,0xF0,0xE6,0x86,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0xC2,0xFC,0xFF,0x7F,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x01,
0x13,0x07,0x07,0x0F,0x1F,0x1F,0x3F,0x3F,0x7F,0x7F,0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0x7F,0x7F,0x7F,0x3F,0x3F,0x1F,0x1F,0x1F,0x2F,0x9F,0x7F,0x7F,0xFF,
0xFF,0xD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xC0,0xC1,0x07,0x8F,0x8F,0x9F,0x3F,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,
0x7F,0x7C,0x7C,0x78,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
};
checkbusy()
{ EN=1;
  RW=1;
  RS=0;
  LCD=0XFF;
  if(BUSY);
}

writecode(unsigned char dat)  //写命令
{ checkbusy();
  EN=1;
  RW=0;
  RS=0;
  LCD=dat;
  EN=1;
  EN=0;
}
writedata(unsigned char dat)  //写数据
{ checkbusy();
  EN=1;
  RW=0;
  RS=1;
  LCD=dat;
  EN=1;
  EN=0;
}
//满屏显示图片函数
void LCDDisplay(unsigned char page,unsigned char lineaddress, unsigned char table[8][128])
{
 
  
   for(i=0;i<8;i++)
    { 
      if(lineaddress<0X80)
         { 
            CS1=0;
            CS2=0;
          }
       writecode(page+i);
       writecode(lineaddress);
     for(j=0;j<64;j++)
       {    
       writedata(table[i][j]);
     lineaddress+=1;
     }
  
         if(lineaddress>=0X80)
          {
          CS1=0;
            CS2=1;
            lineaddress=lineaddress-0X40;
           }
         writecode(page+i);
             writecode(lineaddress);
                  for(j=64;j<128;j++)
             {
              writedata(table[i][j]);
        lineaddress+=1;
           }
      if(lineaddress>=0X80)
          {
         lineaddress=lineaddress-0X40;
           }
    }
}
//半屏显示函数
void LCDDisplay12(unsigned char page,unsigned char lineaddress,unsigned char table[8][64])
{
  if(lineaddress<0X80)
         { 
            CS1=1;
            CS2=0;
          }
  
  if(lineaddress>=0X80)
    {
     CS1=0;
       CS2=1;
       lineaddress=lineaddress-0X40;
    }
    
        for(i=0;i<8;i++)
          {  writecode(page+i);
             writecode(lineaddress);
      for(j=0;j<64;j++)
           {
           writedata(table[i][j]);
       }
       }
  
 }


void lcdinti()
{     writecode(0X3F);
    writecode(0XC0);
    writecode(0XB8);
    writecode(0X40);
}
main()
{  lcdinti();
   //LCDDisplay12(0Xb8,0X40,&zi1);
 LCDDisplay(0Xb8,0X40,&ch);
 while(1);
}

半屏显示,protues仿真如图:

12864液晶显示图片

12864液晶显示图片

全屏显示,protues仿真如图

12864液晶显示图片

关键字:12864液晶  显示图片 引用地址:12864液晶显示图片

上一篇:KEILC51编译问题ERROR L104
下一篇:AT89S52单片机模拟I2C总线协议读写AT24C04

推荐阅读最新更新时间:2024-03-16 15:10

12864点阵液晶的基本原理与使用方法
在数字电路中,所有的数据都是以0和1保存的,对LCD控制器进行不同的数据操作,可以得到不同的结果。对于显示英文操作,由于英文字母种类很少,只需要8位(一字节)即可。而对于中文,常用却有6000以上,于是我们的DOS前辈想了一个办法,就是将ASCII表的高128个很少用到的数值以两个为一组来表示汉字,即汉字的内码。而剩下的低128位则留给英文字符使用,即英文的内码。 那么,得到了汉字的内码后,还仅是一组数字,那又如何在屏幕上去显示呢?这就涉及到文字的字模,字模虽然也是一组数字,但它的意义却与数字的意义有了根本的变化,它是用数字的各位信息来记载英文或汉字的形状,如英文的'A'在字模的记载方式如图1所示
[单片机]
<font color='red'>12864</font>点阵<font color='red'>液晶</font>的基本原理与使用方法
基于无字库12864液晶模块的日历钟设计制作
 本文我们要利用无字库12864液晶模块来自制一个小小日历钟,最图终效果图见图1。     这个小小日历钟有什么特点呢?   1、电路简单,使用元件少,容易制作,核心就是单片机ATMega8L和日历钟忡1302。   2、全部使用低压元件,3V电压就可以工作。   3,使用自编的小字模和图形界面使得显示具有特色:在文字界面可以清晰地读出当前的日期和时间,而且加入一个小动画使显示更加生动,在图形界面使用模拟刻度和指针动态指示当前时间,两个界面柙按键切换。   图2电路原理   4、电源制作在独立的小电路板上,调试程序时插入使用USB供电的3.3V稳压电源,完毕后可以取下,插上开关,使用电池供电。   5、不用背
[单片机]
液晶12864汉字显示程序及显示顺序正常的C语言程序
液晶12864显示汉字程序,经过调试发现,两个汉字行中间隔一行,为了达到不隔行的目的,我拆分开来,这样分4行分别显示,就达到了,代码虽然多,但简单,可以通过复制粘贴达到效果。 以下为行行正确显示汉字的C程序,想显示什么,改掉那些初始字就可以了。 #include stdio.h #include math.h #include reg52.h #include string.h sbit RS=P2^4; sbit WRD=P2^5; sbit E=P2^6; sbit PSB=P2^1; sbit RES=P2^3; void TransferData(char data1,bit DI); void delayms(un
[单片机]
12864汉字液晶显示--按键电子时钟程序
#include reg52.h #include intrins.h #define uchar unsigned char void lcd_ini(); void ascii_change(void); void delay(); void wri_add(uchar com); void wri_dat(uchar com1); void shan(void); void disp(); void tkey(void); sbit cs=P1^7; sbit sid=P1^6; sbit sclk=P1^5; bit flag=1; uchar dat,count,f=1;//f测试哪个单元为当前闪烁状态 ucha
[单片机]
液晶12864(st7920控制器)MSP430f149驱动
//mcumsp430f149// //晶振内部dco// //p43rs// //p42r/w// //p41e// //p40rst// //p30-p37db// //===========================================================================// #include /*************************/ #defineUcharunsignedchar #defineUintunsignedint #defineUlongunsignedlong Ucharbusy,hang,lie; /***********************
[单片机]
单片机LCD12864滚动和反白显示图片
本任务是用单片机实现液晶显示演示效果如图所示。通过编程,学会在单片机上实现液晶显示控制方法,以及不同数据显示的程序编写方法。 单片机源程序如下: #include LCD_12864.h #include stdio.h extern void cls(); extern uchar LCD_Initialise(); extern uchar LCD_Write_Command(uchar cmd); extern uchar LCD_Write_Command_P2(uchar cmd,uchar para1,uchar para2); extern uchar LCD_Write_Data(uchar dat);
[单片机]
单片机LCD<font color='red'>12864</font>滚动和反白<font color='red'>显示</font><font color='red'>图片</font>
msp430f5529——OLED屏显示文字与图片
前言 为了让学习msp430不枯燥,今天我分享一个有趣的小实验给大家,把因枯燥而丢失的兴趣抓回来。 一、效果展示 msp430f5529—接oled屏显示图片与文字 二、步骤 1.OLED.C文件 代码如下(示例):OLED屏显示的一些函数 #include oled.h #include oledfont.h #include type.h // the storage format is as follow // 0 1 2 3 ... 127 // 0 1 2 3 ... 127 // 0 1 2 3 ... 127 // 0 1 2 3 ... 127 // 0 1 2 3 ... 127 // 0
[单片机]
DS18B20温度传感器+12864液晶串口显示
程序的头文件 #include reg52.h #include intrins.h #include math.h sbit CS=P1^0; sbit SCK=P1^2; sbit SID=P1^1; sbit Key=P1^3; sbit DQ = P2 ^ 7; //定义端口DQ unsigned char code AC_TABLE ={ 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87, 0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97, 0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f, 0x98,0x99,0x9a,0x9b,
[单片机]
小广播
添点儿料...
无论热点新闻、行业分析、技术干货……
设计资源 培训 开发板 精华推荐

最新单片机文章
何立民专栏 单片机及嵌入式宝典

北京航空航天大学教授,20余年来致力于单片机与嵌入式系统推广工作。

换一换 更多 相关热搜器件
电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号 Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved