Get your hands on a E-paper display from scratch-Learn to play it-02-Full Refresh
- Categories:Technical Support
- Author:
- Origin:
- Time of issue:2022-11-30 20:54
- Views:
(Summary description)
Get your hands on a E-paper display from scratch-Learn to play it-02-Full Refresh
(Summary description)
- Categories:Technical Support
- Author:
- Origin:
- Time of issue:2022-11-30 20:54
- Views:
Get your hands on a E-paper display from scratch-Learn to play it-02-Full Refresh
//Hello you guys! Recently our newly-teamed up ShiningMan has been working on a teaching project to walk you through
the process of how to play E-paper display from scratch!(Dead-set Introduction paragraph~)//
Last time, we talked about hardware of E-paper display. (Now that we have also received feedback from our dear visitors,
we might answer those nice questions in following blog posts! )
So today, we wish to go deeper into the Update Mode of E-paper display.
As you may know that we can simply put them into three different modes:
1. Full refresh, that's also full screen update, in which the screen as a whole update image.
Note that this is the most basic and also very important function for E-paper display.
You will see like 3 times of flickering during update and please do not assume your screen is broken!
* Very necessary to elongate the lifespan of your E-paper to add some full screen update! (Use it to clear screen regularly)
2. Fast update, that's to say the full screen implements a quick image update with only one flickering within 1 to 1.5s.
3. Partial update, you might also know the partial window from the specification. Usually 0.3s to finish update
a new image, which is key to enabling E-pape display to more application possibilites!
Of course, today is only for full refresh, here's the code from Good Display:
void EPD_HW_Init(void)
{
EPD_W21_RST_0; // Module reset
delay_xms(10);//At least 10ms delay
EPD_W21_RST_1;
delay_xms(10); //At least 10ms delay
Epaper_READBUSY();
Epaper_Write_Command(0x12); //SWRESET
Epaper_READBUSY();
Epaper_Write_Command(0x01); //Driver output control
Epaper_Write_Data(0xF9);
Epaper_Write_Data(0x00);
Epaper_Write_Data(0x00);
Epaper_Write_Command(0x11); //data entry mode
Epaper_Write_Data(0x01);
Epaper_Write_Command(0x44); //set Ram-X address start/end position
Epaper_Write_Data(0x00);
Epaper_Write_Data(0x0F); //0x0F-->(15+1)*8=128
Epaper_Write_Command(0x45); //set Ram-Y address start/end position
Epaper_Write_Data(0xF9); //0xF9-->(249+1)=250
Epaper_Write_Data(0x00);
Epaper_Write_Data(0x00);
Epaper_Write_Data(0x00);
Epaper_Write_Command(0x3C); //BorderWavefrom
Epaper_Write_Data(0x05);
Epaper_Write_Command(0x21); // Display update control
Epaper_Write_Data(0x00);
Epaper_Write_Data(0x80);
Epaper_Write_Command(0x18); //Read built-in temperature sensor
Epaper_Write_Data(0x80);
Epaper_Write_Command(0x4E); // set RAM x address count to 0;
Epaper_Write_Data(0x00);
Epaper_Write_Command(0x4F); // set RAM y address count to 0X199;
Epaper_Write_Data(0xF9);
Epaper_Write_Data(0x00);
Epaper_READBUSY();
}
Actually we can have a simplified version for better understanding:
void EPD_HW_Init(void)
{
EPD_W21_RST_0; // Module reset
delay_xms(10);//At least 10ms delay
EPD_W21_RST_1;
delay_xms(10); //At least 10ms delay
Epaper_Write_Command(0x12); //SWRESET
Epaper_READBUSY();
Epaper_Write_Command(0x21); // Display Update Control
Epaper_Write_Data(0x00);
Epaper_Write_Data(0x00);
Epaper_Write_Command(0x20);
Epaper_READBUSY();
}
Ok! So you now are aware that the EPD must first implement initialization and then we need to use 0x12 command.
If it's in IDLE state, we will use Display Update Control command (0x21) and to write in those two registers each with 0x00 because
here we only use the normal setting. Finally, we also need 0x22 command to activate the display.
We won't make it too long here with specifics. You may go referring to IC data sheet or a specification of E-paper display for more information or you can also refer to this blog post below: (We have listed and introduced some commands in detail and they might help you to some extent)
Please let us know if you make your EPD work after using the simplified code?
Welcome you to message us either via SaleSmartly or email! We would love to hear from you so to offer better service.
More Info:
GITHUB Library-Good Display E-paper(STM32/Arduino/ESP32/ESP8266)
Encyclopedia of E-paper display!!! Your wonderful FAQ provider!
Contact us if you don't find the contents you need! And we will make sure they get published ASAP!!!
Prepare for your IMG easily via online tool ImageToArray!!!
Scan the QR code to read on your phone
Address:No.18, Zhonghua West Road, Dalian, China,116033
E-mail: info@eink-display.com
©2007-2021 Dalian Diamo Electronic Technology Co., Ltd. All Rights Reserved. 辽ICP备2021012387号-2 Website construction:www.300.cn dalian.300.cn
Dalian Diamo Electronic Technology Co., Ltd.
辽ICP备08000578号
Website construction:www.300.cn jinzhou.300.cn