找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 2607|回复: 3
打印 上一主题 下一主题
收起左侧

STC89C52驱动12864(不带字库),仿真可以,但是硬件不显示

[复制链接]
跳转到指定楼层
楼主
#include <reg52.h>
#include<string.h>
#include "zf.h"
#include "io.h"
#define  uchar  unsigned char                  
#define  uint   unsigned int
uchar ye=0,lie=0;
#define DB P0
/**********************字形码位置检索************************/  
  uint hz(uint v)
{         uchar k;uint c;          
          for(k=0;k<6;k++)
        {
         c=hzdate[k].index[0]<<8|hzdate[k].index[1];   
         if(v==c) return (k);
        }
}
/*********************ascii码位置检索**************************/
  uchar zf(uchar S)
{         uchar  n;          
          for(n=0;n<128;n++)
        {
        if(S==ascii[n].in[0]) return (n);
    }
}
/*****************************延时*************************/
void delay(uint i)
{
  while(--i);
}  
/****************12864液晶写数据命令地址函数*****************/
void writedacm(uchar dat,uchar log)        //写数据 RS=1数据,RS=0命令
{  
        delay(8);       
       
        RW = 0;
        if(log)         RS=1;
        else     RS=0;
        E = 1;
        DB = dat;   
        E = 0;
}
/************************页列设置*************************/
void set_YL( uchar y, uchar x)  //ye -> 0 : 7 页 lie -> 0 :63 列
{
   y= y&0x07|0xb8;
   writedacm(y,0);          
   x= x&0x3f|0x40;
   writedacm(x,0);          
}
/*************************12864液晶屏幕选择函数************/
void setPM(uchar PX) //选择屏幕( 0-左屏,1-右屏,2-全屏  )
{
   switch(PX){
    case 0 :        CS1 = 0;        CS2 = 1;   break;
    case 1 :        CS1 = 1;    CS2 = 0;   break;
    case 2 :    CS1 = 0;    CS2 = 0;
  }
}
/******************左右屏设置*************************/
void chear()  //清屏(0-清左屏1-清右屏,2-清全屏 ),
{    uchar i,j;
         setPM(2);
         for(i = 0;i <8;i++)
         { set_YL(i,0);   
           for(j = 0;j <64 ; j++)
           writedacm(0x00,1);
         }                                         
}
//****************************************
void SetOnOff(uchar onoff) //1-开显示 0-关
{
if(onoff == 1){ setPM(2); writedacm(0x3f,0);}  
if(onoff == 0){ setPM(2); writedacm(0x3e,0);}
}

/******************** 12864液晶复位函数******************/

void InitLcd()                  //LCD复位
{
  Reset = 0; delay(2);  
  Reset = 1; delay(2);       
  chear();           //清屏
  SetOnOff(1) ;
}
/*********************12864液晶显示一个汉字函数************/
void showHZ( uchar *p_hz)
{      uchar  g=0;        uint j;
           j= hz(*p_hz<<8|*(p_hz+1));        //调用内码获取字形码
           set_YL( ye, lie);                 
           for(g = 0;g < 16;g++)
        {
                if(lie==56&&g==8)
                        {setPM(1);set_YL( ye,0);}//骑左右屏缝显示完整汉字          
                writedacm( hzdate[j].msk[g],1);
        }
       set_YL( ye+1, lie);
           for(g = 16;g < 32;g++)
           {
               if(lie==56){                         //骑左右屏缝显示完整汉字
               if(g==16)
                   {setPM(0);set_YL(ye+1,56);}
               if(g==24)
                   {setPM(1);set_YL(ye+1, 0);}
               }
           writedacm( hzdate[j].msk[g],1);
           }
}
/**********************12864液晶显示一个ascii-1函数******/
void shoscii( uchar *asc)          
{
uchar i;uchar R;
R=zf(*asc);

set_YL( ye, lie);               
for(i = 0;i < 8;i++)   
writedacm(ascii[R].zxm[i],1);        // 写上半部分

set_YL( ye+1, lie) ;         
for(i = 8;i < 16;i++)   
writedacm(ascii[R].zxm[i],1);         // 写下半部分
}
/**********************区分和显示汉字和字符***************/
void write(uchar x, uchar num, uchar* p1,uchar *p2,uchar *p3)
{         
  uchar i=0,S=0,n=0,m=0; uchar *p;  
  ye=x;       
  for(x=0;x<3;x++)
   {  n=strlen(p);        
               if(x==0)   p=p1;
          else if(x==1)  {p=p2;num+=n;}
          else           {p=p3;num+=n;} //累加列偏移量
          
          m=1;n=1;
          for (i=0;*(p+i)!='\0';i++)
           { S=i+num;lie=S*8;
                if(S==15&&*(p+i)>128||S>15)break;     //丢弃不完整的字符
                if(S>7&&n)     {setPM(1);n=0;}                          
                else if(S<8&&m){setPM(0);m=0;}         //借用m,n消除重复调用         
                if( *(p+i)<128 ) shoscii(p+i);
                else  {showHZ(p+i);i++;}       
           }  
   }
}


/**********************主函数*****************************/
main()
{        //uchar pdat[4];          //pdat数组用来缓存和输出计算处理结果
        //uchar dat1=0x39;  
        InitLcd();
    while(1)
        {
        //        pdat[0]='A';
        //        pdat[1]=0x30;
        //        pdat[2]=dat1;
                write(1,2,"新乡安科电子","","");
                write(3,3,"0373-88888","","");
        }                //        第一个‘,’前的数是页值,第二个‘,’前的数是离开左端的字符数。
}                                                          
/***********************************************************/




sbit Reset = P2^5;   //P0^0;   //复位
sbit CS1 =P2^3;      // P0^5;  //左屏幕选择,低电平有效
sbit CS2 =P2^4;      // P0^4;  //右屏幕选择
sbit RS =P2^7;       // P0^3;  //指令数据选择
sbit RW =P2^6;       //P0^2;   //读写控制
sbit E = P2^5;       //P0^1;   //指令数据控制




#define  uchar  unsigned char                  
#define  uint   unsigned int

struct               // 常用ascii码
{
uchar in[1];            
uchar zxm[16];                     
}
code ascii[] =
{         // 数据表ASCII
'0',        0xF8,0xFC,0x04,0xC4,0x24,0xFC,0xF8,0x00,  // -0-
            0x07,0x0F,0x09,0x08,0x08,0x0F,0x07,0x00,

'1',        0x00,0x10,0x18,0xFC,0xFC,0x00,0x00,0x00,  // -1-
            0x00,0x08,0x08,0x0F,0x0F,0x08,0x08,0x00,

'2',        0x08,0x0C,0x84,0xC4,0x64,0x3C,0x18,0x00,  // -2-
            0x0E,0x0F,0x09,0x08,0x08,0x0C,0x0C,0x00,

'3',        0x08,0x0C,0x44,0x44,0x44,0xFC,0xB8,0x00,  // -3-
            0x04,0x0C,0x08,0x08,0x08,0x0F,0x07,0x00,

'4',        0xC0,0xE0,0xB0,0x98,0xFC,0xFC,0x80,0x00,  // -4-
            0x00,0x00,0x00,0x08,0x0F,0x0F,0x08,0x00,

'5',        0x7C,0x7C,0x44,0x44,0xC4,0xC4,0x84,0x00,  // -5-
            0x04,0x0C,0x08,0x08,0x08,0x0F,0x07,0x00,

'6',        0xF0,0xF8,0x4C,0x44,0x44,0xC0,0x80,0x00,  // -6-
            0x07,0x0F,0x08,0x08,0x08,0x0F,0x07,0x00,

'7',        0x0C,0x0C,0x04,0x84,0xC4,0x7C,0x3C,0x00,  // -7-
            0x00,0x00,0x0F,0x0F,0x00,0x00,0x00,0x00,

'8',        0xB8,0xFC,0x44,0x44,0x44,0xFC,0xB8,0x00,  // -8-
            0x07,0x0F,0x08,0x08,0x08,0x0F,0x07,0x00,

'9',        0x38,0x7C,0x44,0x44,0x44,0xFC,0xF8,0x00,  // -9-
            0x00,0x08,0x08,0x08,0x0C,0x07,0x03,0x00,

'A',        0xE0,0xF0,0x98,0x8C,0x98,0xF0,0xE0,0x00,  // -A- 10
            0x0F,0x0F,0x00,0x00,0x00,0x0F,0x0F,0x00,

'B',        0x04,0xFC,0xFC,0x44,0x44,0xFC,0xB8,0x00,  // -B- 11
            0x08,0x0F,0x0F,0x08,0x08,0x0F,0x07,0x00,

'C',        0xF0,0xF8,0x0C,0x04,0x04,0x0C,0x18,0x00,  // -C- 12
            0x03,0x07,0x0C,0x08,0x08,0x0C,0x06,0x00,

'D',        0x04,0xFC,0xFC,0x04,0x0C,0xF8,0xF0,0x00,  // -D- 13
            0x08,0x0F,0x0F,0x08,0x0C,0x07,0x03,0x00,

'E',        0x04,0xFC,0xFC,0x44,0xE4,0x0C,0x1C,0x00,  // -E- 14
            0x08,0x0F,0x0F,0x08,0x08,0x0C,0x0E,0x00,

'F',        0x04,0xFC,0xFC,0x44,0xE4,0x0C,0x1C,0x00,  // -F- 15
            0x08,0x0F,0x0F,0x08,0x00,0x00,0x00,0x00,

'G',        0xF0,0xF8,0x0C,0x84,0x84,0x8C,0x98,0x00,  // -G- F
            0x03,0x07,0x0C,0x08,0x08,0x07,0x0F,0x00,

'H',        0xFC,0xFC,0x40,0x40,0x40,0xFC,0xFC,0x00,  // -H-
            0x0F,0x0F,0x00,0x00,0x00,0x0F,0x0F,0x00,

'I',        0x00,0x00,0x04,0xFC,0xFC,0x04,0x00,0x00,  // -I-
            0x00,0x00,0x08,0x0F,0x0F,0x08,0x00,0x00,

'J',        0x00,0x00,0x00,0x04,0xFC,0xFC,0x04,0x00,  // -J-
            0x07,0x0F,0x08,0x08,0x0F,0x07,0x00,0x00,

'K',        0x04,0xFC,0xFC,0xC0,0xF0,0x3C,0x0C,0x00,  // -K-
            0x08,0x0F,0x0F,0x00,0x01,0x0F,0x0E,0x00,

'L',        0x04,0xFC,0xFC,0x04,0x00,0x00,0x00,0x00,  // -L-
            0x08,0x0F,0x0F,0x08,0x08,0x0C,0x0E,0x00,

'M',        0xFC,0xFC,0x38,0x70,0x38,0xFC,0xFC,0x00,  // -M-
            0x0F,0x0F,0x00,0x00,0x00,0x0F,0x0F,0x00,

'N',        0xFC,0xFC,0x38,0x70,0xE0,0xFC,0xFC,0x00,  // -N-
            0x0F,0x0F,0x00,0x00,0x00,0x0F,0x0F,0x00,

'O',        0xF0,0xF8,0x0C,0x04,0x0C,0xF8,0xF0,0x00,  // -O-
            0x03,0x07,0x0C,0x08,0x0C,0x07,0x03,0x00,

'P',        0x04,0xFC,0xFC,0x44,0x44,0x7C,0x38,0x00,  // -P-
            0x08,0x0F,0x0F,0x08,0x00,0x00,0x00,0x00,

'Q',        0xF8,0xFC,0x04,0x04,0x04,0xFC,0xF8,0x00,  // -Q-
            0x07,0x0F,0x08,0x0E,0x3C,0x3F,0x27,0x00,

'R',        0x04,0xFC,0xFC,0x44,0xC4,0xFC,0x38,0x00,  // -R-
            0x08,0x0F,0x0F,0x00,0x00,0x0F,0x0F,0x00,

'S',        0x18,0x3C,0x64,0x44,0xC4,0x9C,0x18,0x00,  // -S-
            0x06,0x0E,0x08,0x08,0x08,0x0F,0x07,0x00,

'T',        0x00,0x1C,0x0C,0xFC,0xFC,0x0C,0x1C,0x00,  // -T-
            0x00,0x00,0x08,0x0F,0x0F,0x08,0x00,0x00,

'U',        0xFC,0xFC,0x00,0x00,0x00,0xFC,0xFC,0x00,  // -U-
            0x07,0x0F,0x08,0x08,0x08,0x0F,0x07,0x00,

'V',        0xFC,0xFC,0x00,0x00,0x00,0xFC,0xFC,0x00,  // -V-
            0x01,0x03,0x06,0x0C,0x06,0x03,0x01,0x00,

'W',        0xFC,0xFC,0x00,0x80,0x00,0xFC,0xFC,0x00,  // -W-
            0x03,0x0F,0x0E,0x03,0x0E,0x0F,0x03,0x00,   

'X',        0x0C,0x3C,0xF0,0xC0,0xF0,0x3C,0x0C,0x00,  // -X-
            0x0C,0x0F,0x03,0x00,0x03,0x0F,0x0C,0x00,

'Y',        0x00,0x3C,0x7C,0xC0,0xC0,0x7C,0x3C,0x00,  // -Y-
            0x00,0x00,0x08,0x0F,0x0F,0x08,0x00,0x00,

'Z',        0x1C,0x0C,0x84,0xC4,0x64,0x3C,0x1C,0x00,  // -Z-
            0x0E,0x0F,0x09,0x08,0x08,0x0C,0x0E,0x00,

',',        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  // -,-
            0x00,0x00,0x10,0x1E,0x0E,0x00,0x00,0x00,

':',        0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00,  // -:-
            0x00,0x00,0x00,0x06,0x06,0x00,0x00,0x00,

'.',        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  // -.-
            0x00,0x00,0x00,0x0C,0x0C,0x00,0x00,0x00,

'!',        0x00,0x00,0x38,0xFC,0xFC,0x38,0x00,0x00,  // -!-
            0x00,0x00,0x00,0x0D,0x0D,0x00,0x00,0x00,

''',        0x00,0x10,0x1E,0x0E,0x00,0x00,0x00,0x00,  // -'-
            0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

'(',        0x00,0x00,0xF0,0xF8,0x0C,0x04,0x00,0x00,  // -(-
            0x00,0x00,0x03,0x07,0x0C,0x08,0x00,0x00,

')',        0x00,0x00,0x04,0x0C,0xF8,0xF0,0x00,0x00,  // -)-
            0x00,0x00,0x08,0x0C,0x07,0x03,0x00,0x00,

'*',        0x80,0xA0,0xE0,0xC0,0xC0,0xE0,0xA0,0x80,  // -*-
            0x00,0x02,0x03,0x01,0x01,0x03,0x02,0x00,

'+',        0x00,0x80,0x80,0xE0,0xE0,0x80,0x80,0x00,  // -+-
            0x00,0x00,0x00,0x03,0x03,0x00,0x00,0x00,

'-',        0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,  // ---
            0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

'/',        0x00,0x00,0x00,0x80,0xC0,0x60,0x30,0x00,  // -/-
            0x0C,0x06,0x03,0x01,0x00,0x00,0x00,0x00,               

';',        0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00,  // -;-
            0x00,0x00,0x08,0x0E,0x06,0x00,0x00,0x00,

'<',        0x00,0x80,0xC0,0x60,0x30,0x18,0x08,0x00,  // -<-
            0x00,0x00,0x01,0x03,0x06,0x0C,0x08,0x00,

'=',        0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x00,  // -=-
            0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00,

'>',        0x00,0x08,0x18,0x30,0x60,0xC0,0x80,0x00,  // ->-
            0x00,0x08,0x0C,0x06,0x03,0x01,0x00,0x00,

'?',        0x18,0x1C,0x04,0xC4,0xE4,0x3C,0x18,0x00,  // -?-
            0x00,0x00,0x00,0x0D,0x0D,0x00,0x00,0x00,

'_',        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  // -_-
            0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,

' ',        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  // - -
            0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,   

'a',        0x00,0xA0,0xA0,0xA0,0xE0,0xC0,0x00,0x00,  // -a-
            0x07,0x0F,0x08,0x08,0x07,0x0F,0x08,0x00,

'b',        0x04,0xFC,0xFC,0x20,0x60,0xC0,0x80,0x00,  // -b-
            0x08,0x0F,0x07,0x08,0x08,0x0F,0x07,0x00,

'c',        0xC0,0xE0,0x20,0x20,0x20,0x60,0x40,0x00,  // -c-
            0x07,0x0F,0x08,0x08,0x08,0x0C,0x04,0x00,

'd',        0x80,0xC0,0x60,0x24,0xFC,0xFC,0x00,0x00,  // -d-
            0x07,0x0F,0x08,0x08,0x07,0x0F,0x08,0x00,

'e',        0xC0,0xE0,0xA0,0xA0,0xA0,0xE0,0xC0,0x00,  // -e-
            0x07,0x0F,0x08,0x08,0x08,0x0C,0x04,0x00,

'f',        0x40,0xF8,0xFC,0x44,0x0C,0x18,0x00,0x00,  // -f-
            0x08,0x0F,0x0F,0x08,0x00,0x00,0x00,0x00,

'g',        0xC0,0xE0,0x20,0x20,0xC0,0xE0,0x20,0x00,  // -g-
            0x27,0x6F,0x48,0x48,0x7F,0x3F,0x00,0x00,

'h',        0x04,0xFC,0xFC,0x40,0x20,0xE0,0xC0,0x00,  // -h-
            0x08,0x0F,0x0F,0x00,0x00,0x0F,0x0F,0x00,

'i',        0x00,0x00,0x20,0xEC,0xEC,0x00,0x00,0x00,  // -i-
            0x00,0x00,0x08,0x0F,0x0F,0x08,0x00,0x00,

'j',        0x00,0x00,0x00,0x00,0x20,0xEC,0xEC,0x00,  // -j-
            0x00,0x30,0x70,0x40,0x40,0x7F,0x3F,0x00,

'k',        0x04,0xFC,0xFC,0x80,0xC0,0x60,0x20,0x00,  // -k-
            0x08,0x0F,0x0F,0x01,0x03,0x0E,0x0C,0x00,

'l',        0x00,0x00,0x04,0xFC,0xFC,0x00,0x00,0x00,  // -l-
            0x00,0x00,0x08,0x0F,0x0F,0x08,0x00,0x00,

'm',        0xE0,0xE0,0x60,0xC0,0x60,0xE0,0xC0,0x00,  // -m-
            0x0F,0x0F,0x00,0x0F,0x00,0x0F,0x0F,0x00,

'n',        0x20,0xE0,0xC0,0x20,0x20,0xE0,0xC0,0x00,  // -n-
            0x00,0x0F,0x0F,0x00,0x00,0x0F,0x0F,0x00,

'o',        0xC0,0xE0,0x20,0x20,0x20,0xE0,0xC0,0x00,  // -o-
            0x07,0x0F,0x08,0x08,0x08,0x0F,0x07,0x00,

'p',        0x20,0xE0,0xC0,0x20,0x20,0xE0,0xC0,0x00,  // -p-
            0x40,0x7F,0x7F,0x48,0x08,0x0F,0x07,0x00,

'q',        0xC0,0xE0,0x20,0x20,0xC0,0xE0,0x20,0x00,  // -q-
            0x07,0x0F,0x08,0x48,0x7F,0x7F,0x40,0x00,

'r',        0x20,0xE0,0xC0,0x60,0x20,0x60,0xC0,0x00,  // -r-
            0x08,0x0F,0x0F,0x08,0x00,0x00,0x00,0x00,

's',        0x40,0xE0,0xA0,0x20,0x20,0x60,0x40,0x00,  // -s-
            0x04,0x0C,0x09,0x09,0x0B,0x0E,0x04,0x00,

't',        0x20,0x20,0xF8,0xFC,0x20,0x20,0x00,0x00,  // -t-
            0x00,0x00,0x07,0x0F,0x08,0x0C,0x04,0x00,

'u',        0xE0,0xE0,0x00,0x00,0xE0,0xE0,0x00,0x00,  // -u-
            0x07,0x0F,0x08,0x08,0x07,0x0F,0x08,0x00,

'v',        0x00,0xE0,0xE0,0x00,0x00,0xE0,0xE0,0x00,  // -v-
              0x00,0x03,0x07,0x0C,0x0C,0x07,0x03,0x00,

'w',        0xE0,0xE0,0x00,0x00,0x00,0xE0,0xE0,0x00,  // -w-
            0x07,0x0F,0x0C,0x07,0x0C,0x0F,0x07,0x00,

'x',        0x20,0x60,0xC0,0x80,0xC0,0x60,0x20,0x00,  // -x-
            0x08,0x0C,0x07,0x03,0x07,0x0C,0x08,0x00,

'y',        0xE0,0xE0,0x00,0x00,0x00,0xE0,0xE0,0x00,  // -y-
            0x47,0x4F,0x48,0x48,0x68,0x3F,0x1F,0x00,

'z',        0x60,0x60,0x20,0xA0,0xE0,0x60,0x20,0x00,  // -z-
            0x0C,0x0E,0x0B,0x09,0x08,0x0C,0x0C,0x00,

'{',        0x00,0x40,0x40,0xF8,0xBC,0x04,0x04,0x00,  // -{-
            0x00,0x00,0x00,0x07,0x0F,0x08,0x08,0x00,

'}',        0x00,0x04,0x04,0xBC,0xF8,0x40,0x40,0x00,  // -}-
            0x00,0x08,0x08,0x0F,0x07,0x00,0x00,0x00,

'#',        0x20,0xF8,0xF8,0x20,0xF8,0xF8,0x20,0x00,  // -#-
            0x02,0x0F,0x0F,0x02,0x0F,0x0F,0x02,0x00,

'$',        0x38,0x7C,0x44,0x47,0x47,0xCC,0x98,0x00,  // -$-
            0x03,0x06,0x04,0x1C,0x1C,0x07,0x03,0x00,

'%',        0x30,0x30,0x00,0x80,0xC0,0x60,0x30,0x00,  // -%-
            0x0C,0x06,0x03,0x01,0x00,0x0C,0x0C,0x00,

'&',        0x80,0xD8,0x7C,0xE4,0xBC,0xD8,0x40,0x00,  // -&-
            0x07,0x0F,0x08,0x08,0x07,0x0F,0x08,0x00,

'@',        0xF0,0xF8,0x08,0xC8,0xC8,0xF8,0xF0,0x00,  // -@-
            0x07,0x0F,0x08,0x0B,0x0B,0x0B,0x01,0x00,

'[',        0x00,0x00,0xFC,0xFC,0x04,0x04,0x00,0x00,  // -[-
            0x00,0x00,0x0F,0x0F,0x08,0x08,0x00,0x00,

']',        0x00,0x00,0x04,0x04,0xFC,0xFC,0x00,0x00,  // -]-
            0x00,0x00,0x08,0x08,0x0F,0x0F,0x00,0x00,

'"',        0x00,0x0E,0x1E,0x00,0x00,0x1E,0x0E,0x00,  // -"-
            0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
};       

struct                         //汉字可以随便加
{
uchar index[2];            
uchar msk[32];                     
}
code hzdate[6] = {        
"新",
          0x20,0x24,0x2C,0x35,0xE6,0x34,0x2C,0x24,0x00,0xFC,0x24,0x24,0xE2,0x22,0x22,0x00,
      0x21,0x11,0x4D,0x81,0x7F,0x05,0x59,0x21,0x18,0x07,0x00,0x00,0xFF,0x00,0x00,0x00,

"乡", 0x00,0x00,0x00,0x20,0x30,0x28,0xAC,0xA7,0x62,0x20,0x30,0x1C,0xC8,0x80,0x00,0x00,
      0x00,0x40,0x40,0x42,0x47,0x23,0x22,0x22,0x12,0x11,0x09,0x07,0x01,0x00,0x00,0x00,

"安", 0x80,0x90,0x8C,0x84,0x84,0xF4,0xA5,0x86,0x84,0x84,0x84,0x84,0x94,0x8C,0x84,0x00,
      0x80,0x80,0x80,0x40,0x47,0x28,0x28,0x10,0x28,0x24,0x43,0xC0,0x40,0x00,0x00,0x00,

"科", 0x10,0x12,0x92,0x72,0xFE,0x51,0x91,0x00,0x22,0xCC,0x00,0x00,0xFF,0x00,0x00,0x00,
      0x04,0x02,0x01,0x00,0xFF,0x00,0x04,0x04,0x04,0x02,0x02,0x02,0xFF,0x01,0x01,0x00,

"电", 0x00,0x00,0xF8,0x48,0x48,0x48,0x48,0xFF,0x48,0x48,0x48,0x48,0xF8,0x00,0x00,0x00,
      0x00,0x00,0x0F,0x04,0x04,0x04,0x04,0x3F,0x44,0x44,0x44,0x44,0x4F,0x40,0x70,0x00,

"子", 0x00,0x00,0x02,0x02,0x02,0x02,0x02,0xE2,0x12,0x0A,0x06,0x02,0x00,0x80,0x00,0x00,
      0x01,0x01,0x01,0x01,0x01,0x41,0x81,0x7F,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00,  
};



分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享淘帖 顶 踩
回复

使用道具 举报

沙发
ID:379492 发表于 2018-9-5 13:50 | 只看该作者
本帖最后由 850787641@qq.co 于 2018-9-5 14:54 编辑

仿真和硬件连接是一致的,请大神看下,我错在哪里,搞了几天了,没搞明白

QQ图片20180905144943.png (20.64 KB, 下载次数: 89)

仿真图片

仿真图片

硬件连接.jpg (2.7 MB, 下载次数: 131)

硬件连接

硬件连接
回复

使用道具 举报

板凳
ID:379492 发表于 2018-9-5 17:11 | 只看该作者
已经调试OK了,显示屏没有初始化
回复

使用道具 举报

地板
ID:362076 发表于 2018-9-7 21:06 | 只看该作者
哈哈哈,楼主你这是和12864刚上了啊?看见你发的几个贴子大多跟12864有关系。
建议有时间玩一玩OLED12864,比LCD12864好看不知道多少倍。但是可别买贵了,淘宝现在有13块钱包邮的。

评分

参与人数 1黑币 +20 收起 理由
admin + 20 回帖助人的奖励!

查看全部评分

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|51黑电子论坛 |51黑电子论坛6群 QQ 管理员QQ:125739409;技术交流QQ群281945664

Powered by 单片机教程网

快速回复 返回顶部 返回列表