EPD Update Procedure¶

The update procedure includes 8 steps as shown on the right side.
- Power on screen
- Reset the CoG driver
- Read the OTP data
- Initialize the COG driver
- Send the image
- Update the COG
- Stop DC/DC
- Power off screen
Power on screen¶
The initial state before start has VCC/VDD, /RESET, D/C, /CS, SDA, SCL kept at 0V.
In order to the inrush current will cause other issue. It is recommended to add start DC/DC when VCC/VDD is turned on.
Perform in the following order.
Step | Pin/Register | Data/Value | Name/Unit | Comment |
---|---|---|---|---|
GPIO | POWER | HIGH | External MOSFET power driver | |
GPIO | D/C | HIGH | Data if HIGH, command if LOW | |
GPIO | /RESET | HIGH | Panel reset, active LOW | |
GPIO | Panel /CS | HIGH | SPI chip select, active LOW | |
GPIO | !BUSY | INPUT | Input, floating | |
SPI | CLK | SPI clock | ||
SPI | SDA | SPI data |
Reset the CoG driver¶
Note
Included in function COG_reset()
Step | Pin/Register | Data/Value | Name/Unit | Comment |
---|---|---|---|---|
GPIO | POWER | HIGH | Set POWER HIGH | |
Delay | 5 | ms | Make sure POWER is stable | |
GPIO | RESET | HIGH | Set RESET HIGH | |
Delay | 10 | ms | ||
GPIO | RESET | LOW | Set RESET LOW | |
Delay | 20 | ms | ||
GPIO | RESET | HIGH | Set RESET HIGH | |
Delay | 10 | ms | ||
GPIO | BUSY | HIGH? | Proceed to next step when HIGH Otherwise, continue waiting |
Proceed to next step “Read the OTP data”.
If the OTP data is already read and available, proceed to Initialise the COG driver.
Read the OTP data¶
Note
Included in function COG_getDataOTP()
This step is performed once, as long as the host retains the values. If the host loses the values, the host should perform this step again.
Info
The maximum clock speed of the display is 2.5MHz (Read).
The SPI sequence for reading the OTP follows:

Step | Pin/Register | Data/Value | Name/Unit | Comment |
---|---|---|---|---|
GPIO | /CS | LOW | Select | |
GPIO | D/C | LOW | Command mode | |
SPI3 | 0x70 | SPI3 = SCK, SDIO, CS plus D/C | ||
GPIO | D/C | HIGH | Data mode | |
SPI3 | Read 2 bytes | Read the chip ID (expected is 0x03, 0x02) | ||
SPI3 | 0xa4 | [0x15, 0x00, 0x01] | Sets the start address for OTP reading | |
GPIO | BUSY | HIGH? | Proceed to next step when HIGH Otherwise, continue waiting |
|
SPI3 | 0xa1 | Assigns the start address for OTP reading | ||
SPI3 | 1 byte | Reads 1 dummy byte | ||
SPI3 | 48 bytes | Reads 48 data bytes | ||
GPIO | RESET | LOW | Set RESET LOW | |
Delay | 40 | ms | ||
GPIO | RESET | HIGH | Set RESET HIGH | |
Delay | 10 | ms | ||
GPIO | BUSY | HIGH? | Proceed to next step when HIGH Otherwise, continue waiting |
|
GPIO | /CS | HIGH | Unselect |
Store the OTP data in memory to avoid reading it at each update.
Initialize the COG Driver¶
Note
Included in function COG_initial()
Step | Pin/Register | Data/Value | Name/Unit | Comment |
---|---|---|---|---|
SPI | 0x01 | OTP[16] | PWR | 1 byte, OTP address: 0x1510 |
SPI | 0x00 | OTP[17-18] | PSR | 2 bytes, OTP address: 0x1511 – 0x1512 |
SPI | 0x03 | OTP[30-32] | PFS | 3 bytes, OTP address: 0x151e – 0x1520 |
SPI | 0x06 | OTP[23-29] | BTST | 7 bytes, OTP address: 0x1517 – 0x151d |
SPI | 0x50 | OTP[39] | CDI | 1 byte, OTP address: 0x1527 |
SPI | 0x60 | OTP[40-41] | TCON | 2 bytes, OTP address: 0x1528 – 0x1529 |
SPI | 0x61 | OTP[19-22] | TRES | 4 bytes, OTP address: 0x1513 – 0x1516 |
SPI | 0xe7 | OTP[33] | 1 byte, OTP address: 0x1521 | |
SPI | 0xe3 | OTP[42] | PWS | 1 byte, OTP address: 0x152a |
SPI | 0x4d | OTP[43] | 1 byte, OTP address: 0x152b | |
SPI | 0xb4 | OTP[44] | 1 byte, OTP address: 0x152c | |
SPI | 0xb5 | OTP[45] | 1 byte, OTP address: 0x152d | |
SPI | 0xe9 | 0x01 | 1 byte | |
SPI | 0x30 | 0x08 | 1 byte |
Send the Image¶
Note
Included in function COG_sendImageDataNormal()
Step | Pin/Register | Data/Value | Name/Unit | Comment |
---|---|---|---|---|
SPI | 0x10 | Image data | The data is the NEW image data that you want displayed next moment |
The index of the image buffer is 0x10.
Sending the image data array to this register requires defining the size of the array. To do so, take note of the buffer size according to your EPD screen size, as seen below.
Size | 1.54” | 2.13” | 2.66” |
---|---|---|---|
Bytes | 5776 | 5512 | 11248 |
There are 2-bit data per pixel to define 4 colors.
Data | Colour |
---|---|
00 | Black |
01 | White |
10 | Yellow |
11 | Red |
Example
The first byte represents the 1st…4th pixels of the first line.
The second byte represents the 5th…8th pixels of the first line, and so on.

Update the COG¶
Note
Included in function COG_update()
Send the Update Command¶
Step | Pin/Register | Data/Value | Name/Unit | Comment |
---|---|---|---|---|
SPI | 0x04 | Power on DC/DC | ||
GPIO | !BUSY | HIGH? | Wait for !BUSY = HIGH | |
SPI | 0x12 | Display refresh | ||
GPIO | !BUSY | HIGH? | Wait for !BUSY = HIGH |
Stop DC/DC¶
Note
Included in function COG_stopDCDC()
Step | Pin/Register | Data/Value | Name/Unit | Comment |
---|---|---|---|---|
SPI | 0x02 | 0x00 | Turn off DC/DC | |
GPIO | !BUSY | HIGH? | Wait for !BUSY = HIGH |
Power the screen off¶
Step | Pin/Register | Name/Unit | Name/Unit | Comment |
---|---|---|---|---|
GPIO | D/C | LOW | Data if HIGH, command if LOW | |
GPIO | /RESET | LOW | Panel reset, active low | |
GPIO | Panel /CS | LOW | SPI chip select, active low | |
GPIO | !BUSY | Input, floating | ||
GPIO | POWER | LOW | External MOSFET power driver | |
SPI | CLK | SPI clock | ||
SPI | SDA | SPI data |
The EPD update procedure is completed.