1、局部刷新不加延时的话刷不出来
2、加了延时后局部刷新时整个屏会闪一下(32的局部刷新只有被刷新的部分会变别的地方都不变)
3、430驱动时显示的颜 {MOD}和32驱动时显示的颜 {MOD}是相反的(这个屏是黑白双 {MOD}的,32和430显示的图像是黑白颠倒的)
4、整屏刷新留下的重影要比32严重(刷新的不够干净)
下面是主程序
(
局部刷新中间的延时是我自己加的如果小于这个延时就会刷不出来)
int main(void)
{
WDTCTL = WDTPW + WDTHOLD;
// 系统时钟设置
InitOSC();
//IO参数设置
//SPI_IO_Init();
Eink_Clk_IO_INIT;
Eink_MOSI_IO_INIT;
Eink_DC_IO_INIT;
Eink_CS_IO_INIT;
Eink_BUSY_Input;
Eink_RST_IO_INIT;
Eink_BS_IO_INIT;
Eink_Init();
EPD_W21_WriteCMD(0x01); //POWER SETTING
EPD_W21_WriteDATA (0x03);
EPD_W21_WriteDATA (0x00);
EPD_W21_WriteDATA (0x2b);
EPD_W21_WriteDATA (0x2b);
EPD_W21_WriteCMD(0x06); //boost设定
EPD_W21_WriteDATA (0x07); //A
EPD_W21_WriteDATA (0x07); //B
EPD_W21_WriteDATA (0x17); //C
EPD_W21_WriteCMD(0x16);
EPD_W21_WriteDATA(0x00);
EPD_W21_WriteCMD(0x04);
lcd_chkstatus();
EPD_W21_WriteCMD(0x00); //panel setting
EPD_W21_WriteDATA(0xbf); //KW-BF KWR-AF BWROTP 0f
EPD_W21_WriteCMD(0x30); //PLL setting
EPD_W21_WriteDATA (0x3a); //90 50HZ 3A 100HZ 29 150Hz 39 200HZ 31 171HZ
EPD_W21_WriteCMD(0x61); //resolution setting 建立分辨率
EPD_W21_WriteDATA (0x00);
EPD_W21_WriteDATA (0xb0); //176
EPD_W21_WriteDATA (0x01);
EPD_W21_WriteDATA (0x08); //264
EPD_W21_WriteCMD(0x82); //vcom_DC setting
EPD_W21_WriteDATA (0x28); //0x28:-2.0V,0x12:-0.9V
delay_ms(2);
/******full screen for level update******************************************/
EPD_W21_WriteCMD(0X50); //VCOM AND DATA INTERVAL SETTING
EPD_W21_WriteDATA(0x47);
lut();
pic_display();
EPD_W21_WriteCMD(0x12); //DISPLAY REFRESH 刷新
delay_ms(1500);
lcd_chkstatus();
/******full screen for vertical update***************************************/ //垂直更新全屏
EPD_W21_WriteCMD(0X50); //VCOM AND DATA INTERVAL SETTING 指令和数据间隔设定
EPD_W21_WriteDATA(0x47);
lut();
//display clear screen
pic_display_white();
EPD_W21_WriteCMD(0x12); //DISPLAY REFRESH
delay_ms(1000);
lcd_chkstatus();
//display pic2
pic_display1();
pic_display_white();
EPD_W21_WriteCMD(0x12); //DISPLAY REFRESH
delay_ms(1000);
lcd_chkstatus();
//////////////////////////partial for vertical////////////////////
EPD_W21_WriteCMD(0x30); //PLL setting
EPD_W21_WriteDATA (0x29); //90 50HZ 3A 100HZ 29 150Hz 39 200HZ 31 171HZ
EPD_W21_WriteCMD(0X50);
EPD_W21_WriteDATA(0x97);
lut1();
partial_display(0,0,176,264,partial_full00, partial_full01); //partial full display
delay_ms(3000);
partial_display(0,0,32,64, partial00, partial01); //partial display 0 1
delay_ms(1500);
partial_display(0,0,32,64, partial01, partial02); //partial display 1 2 //////////////(x,y) ----Y----
delay_ms(1500);
partial_display(0,0,32,64, partial02, partial03); //partial display 2 3 / / / X|
delay_ms(1500);
partial_display(0,0,32,64, partial03, partial04); //partial display 3 4 /W / / |
delay_ms(1500);
partial_display(0,0,32,64, partial04, partial05); //partial display 4 5 ///// L ////// |
delay_ms(1500);
partial_display(0,0,32,64, partial05, partial06); //partial display 5 6
delay_ms(1500);
partial_display(0,0,32,64, partial06, partial07); //partial display 6 7
delay_ms(1500);
partial_display(0,0,32,64, partial07, partial08); //partial display 7 8
delay_ms(1500);
partial_display(0,0,32,64, partial08, partial09); //partial display 8 9
/******************************************************************/
while(1);
}
如果有用过的话希望能帮我解答一下 不胜感激
此帖出自
小平头技术问答
一周热门 更多>