您好,欢迎访问三七文档
当前位置:首页 > 临时分类 > sed1520显示程序(12232)
sed1520显示程序(12232)--admin添加样板程序sed1520(针对12232)其它点阵可以参考。#includestdio.h#includeabsacc.h#includereg51.hsbitA0=P3^0;sbitRW=P3^3;sbitE1=P3^1;sbitE2=P3^2;sbitBF=ACC^7;sbitlight=P3^6;sbitkey=P3^4;unsignedcharCMDCODE,DAT;unsignedcharCOLUMN,COLUMNBAK,PAGE1,ENCODE,HZCODE;unsignedcharcodetab[4*122]={/*--调入了一幅图像:C:\DocumentsandSettings\hex\MyDocuments\12232.bmp--*//*--宽度x高度=122x32--*/0x00,0x80,0x90,0x9C,0x8C,0x84,0xF4,0xF5,0xA7,0x86,0x84,0x84,0x84,0x94,0x9C,0x8C,0x84,0x00,0x00,0xF8,0xFC,0x8F,0x8B,0xF8,0xF8,0x70,0xBF,0x8F,0x08,0x08,0x08,0xF8,0xF8,0x00,0x00,0x00,0x20,0x24,0x24,0xE4,0xFC,0xFE,0x22,0x22,0x22,0xF8,0xF8,0x00,0x00,0xFF,0xFF,0x00,0x00,0x40,0x42,0x46,0x5C,0xDC,0xC8,0x7F,0x7F,0xC0,0xD0,0x5E,0x4E,0x64,0x60,0x40,0x00,0x00,0x00,0xF8,0xF8,0x48,0x48,0x48,0xFF,0xFF,0x48,0x48,0x48,0xF8,0xF8,0x00,0x00,0x00,0x10,0x12,0x92,0xF2,0xFE,0xFF,0xD1,0x91,0x22,0xEE,0xCC,0x00,0xFF,0xFF,0x00,0x00,0x00,0x08,0x08,0x88,0xFF,0xFF,0x68,0x28,0xC8,0xC8,0x48,0x7F,0x7F,0xC8,0xC8,0x48,0x08,0x00,0x00,0x00,0x00,0x80,0x80,0x80,0xC0,0x47,0x6F,0x28,0x38,0x38,0x2C,0x67,0xC3,0xC0,0x40,0x00,0x00,0x00,0x00,0x7F,0x7F,0x10,0x10,0x3F,0x3F,0x00,0x00,0x03,0x27,0x66,0x60,0x3F,0x1F,0x00,0x00,0x10,0x18,0x0C,0x07,0x03,0xFF,0xFF,0x0F,0x0E,0x04,0x0F,0x2F,0x60,0xC0,0xFF,0x7F,0x00,0x00,0x80,0xC0,0x60,0x38,0x1F,0x07,0x00,0x00,0x3F,0x7F,0x40,0x40,0x40,0x78,0x78,0x00,0x00,0x00,0x0F,0x0F,0x04,0x04,0x04,0x3F,0x7F,0x44,0x44,0x44,0x4F,0x4F,0x70,0x70,0x00,0x04,0x06,0x03,0x01,0xFF,0xFF,0x04,0x04,0x04,0x06,0x02,0x02,0xFF,0xFF,0x01,0x01,0x00,0x01,0x41,0xC1,0xFF,0x7F,0x40,0x40,0x60,0x33,0x1F,0x0C,0x1E,0x33,0x61,0x60,0x20,0x00,0x00,0x00,0x00,0x00,0x04,0x84,0xC4,0xE4,0xF4,0x3C,0x2F,0x27,0x24,0x24,0xE4,0xE4,0x04,0x04,0x04,0x00,0xFE,0xFE,0x32,0x7E,0xCE,0x82,0xFE,0xFE,0xCA,0xCA,0x4A,0x4A,0x7E,0x7E,0x00,0x00,0x00,0x00,0x00,0x80,0xC0,0x70,0x3E,0x8E,0x84,0x00,0x0E,0x1E,0x70,0xE0,0xC0,0x80,0x80,0x00,0x00,0x10,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x12,0x02,0xFE,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0xF8,0xF8,0xE0,0x00,0x00,0x00,0x08,0xF8,0xF8,0xF0,0xC0,0x08,0xF8,0xF8,0x08,0x08,0xF8,0xF8,0x08,0x08,0x18,0xF0,0xE0,0x00,0xE0,0xF0,0x18,0x08,0x08,0x18,0xF0,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x03,0x01,0x00,0xFF,0xFF,0x09,0x09,0x29,0x69,0xC9,0xFF,0x7F,0x00,0x00,0x00,0x00,0xFF,0xFF,0x02,0x06,0x07,0x03,0xFF,0xFF,0x60,0x23,0x0F,0x1E,0x33,0x61,0x60,0x20,0x00,0x00,0x01,0x21,0x70,0x78,0x2C,0x27,0x33,0x31,0x10,0x14,0x7C,0x78,0x31,0x01,0x00,0x00,0x00,0x00,0x1F,0x1F,0x04,0x04,0x04,0x04,0x04,0x0F,0x0F,0x20,0x60,0x7F,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x3C,0x3F,0x23,0x02,0x27,0x3F,0x38,0x20,0x20,0x3F,0x3F,0x20,0x07,0x1F,0x3F,0x3F,0x00,0x20,0x3F,0x3F,0x20,0x20,0x30,0x1F,0x0F,0x00,0x0F,0x1F,0x30,0x20,0x20,0x30,0x1F,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};voiddelay(unsignedintnnn){unsignedintmmm;while(nnn--0)for(mmm=0;mmm1;mmm++);}printmcmd(){A0=0;RW=0;delay(5);E1=1;P1=CMDCODE;delay(5);E1=0;E1=1;}printmdat(){A0=1;RW=0;delay(5);E1=1;P1=DAT;delay(5);E1=0;E1=1;}printscmd(){A0=0;RW=0;delay(5);E2=1;P1=CMDCODE;delay(5);E2=0;E2=1;}printsdat(){A0=1;RW=0;delay(5);E2=1;P1=DAT;delay(5);E2=0;E2=1;}init_1520(){CMDCODE=0XE2;printmcmd();printscmd();//RESET//CMDCODE=0XA4;printmcmd();printscmd();//NORMALDRIVECMDCODE=0XA9;printmcmd();printscmd();//DUTY=1/32//CMDCODE=0XA0;printmcmd();printscmd();//selectADCCMDCODE=0XD0;printmcmd();printscmd();//STARTLINECMDCODE=0XAF;printmcmd();printscmd();//DISPON}voiddelay1(intt){inti=0;intn;for(i=0;it;i++){for(n=0;n1000;n++){;}}}tu(){unsignedinti,j;for(i=0;i4;i++){CMDCODE=0xB8|i;printmcmd();printscmd();CMDCODE=0X00;printmcmd();printscmd();for(j=0;j122;j++){if(j61){CMDCODE=j;printmcmd();DAT=tab[i*122+j];printmdat();}else{CMDCODE=j-61;printscmd();DAT=tab[i*122+j];printsdat();}}}}h_line(){unsignedinti,j;for(i=0;i4;i++){CMDCODE=0xB8|i;printmcmd();printscmd();CMDCODE=0X00;printmcmd();printscmd();for(j=0;j122;j++){CMDCODE=j;printmcmd();printscmd();DAT=0x55;printmdat();printsdat();}}for(i=0;i4;i++){CMDCODE=0xB8|i;printmcmd();printscmd();CMDCODE=0X00;printmcmd();printscmd();for(j=0;j61;j=j+2){CMDCODE=j;printmcmd();printscmd();DAT=0xff;printmdat();printsdat();DAT=0x00;printmdat();printsdat();}}for(i=0;i4;i++){CMDCODE=0xB8|i;printmcmd();printscmd();CMDCODE=0X00;printmcmd();printscmd();for(j=0;j61;j=j+2){CMDCODE=j;printmcmd();printscmd();DAT=0x55;printmdat();printsdat();DAT=0xaa;printmdat();printsdat();}}}v_line(){unsignedinti,j;for(i=0;i4;i++){CMDCODE=0xB8|i;printmcmd();printscmd();CMDCODE=0X00;printmcmd();printscmd();CMDCODE=j;printmcmd();printscmd();for(j=0;j122;j++){DAT=0xaa;printmdat();printsdat();}}for(i=0;i4;i++){CMDCODE=0xB8|i;printmcmd();printscmd();CMDCODE=0X00;printmcmd();printscmd();CMDCODE=j;printmcmd();printscmd();for(j=0;j61;j=j+2){DAT=0x00;printmdat();printsdat();DAT=0xff;printmdat();printsdat();}}for(i=0;i4;i++){CMDCODE=0xB8|i;printmcmd();printscmd();CMDCODE=0X00;printmcmd();printscmd();CMDCODE=j;printmcmd();printscmd();for(j=0;j61;j=j+2){DAT=0xaa;prin
本文标题:sed1520显示程序(12232)
链接地址:https://www.777doc.com/doc-8072707 .html