我最近用STM32f103VCT6驱动12864,然后现在基本的显示汉字,字符可以实现 但是当调用打点函数的时候确出现了花屏现象,如下图所示: 还有一点比较奇怪的是,我打点函数写的是在0,0出打点,上图中左上角出现的却是一条短线,不知道是为什么 贴上我的打点函数: void Set_12864_point(u8 x,u8 y) { u8 x_byte,x_bit,y_byte,y_bit; u8 data1,data2;//??????? x&=0x7F;//??????????? y&=0x3F; x_byte=x/16;//??????? x_bit=x&0x0f; //?????? y_byte=y/32; y_bit=y&0x3f; Write_12864_Com(0x34); Write_12864_Com(0x80+y_bit); Write_12864_Com(0x80+x_byte+8*y_byte); Read_12864_Data();//???????????? data1=Read_12864_Data(); data2=Read_12864_Data(); Write_12864_Com(0x34); Write_12864_Com(0x80+y_bit); Write_12864_Com(0x80+x_byte+8*y_byte); if(x_bit<8) { Write_12864_Data(data1|(0x01<<(7-x_bit))); Write_12864_Data(data2); } else { Write_12864_Data(data1); Write_12864_Data(data2|(0x01<<(15-x_bit))); } Write_12864_Com(0x36); Write_12864_Com(0x30); } |
看看打点函数有问题吗,12864显示点阵图好像是一次全显示吧 |
帮顶 |