Template: Pico e-Paper 2.7 Spec
Overview
2.7inch EPD (Electronic Paper Display) Module For Raspberry Pi Pico, 264×176 Pixels, Black / White, SPI Interface
Features
- No backlight keeps displaying last content for a long time even when power down
- Ultra-low power consumption, basically power is only required for refreshing
- SPI interface requires minimal IO pins
- 3x user buttons for easy interacting
Specification
- Operating voltage: 3.3V/5V
- Interface:3-wire SPI, 4-wire SPI
- Outline dimensions (Driver board): 73.5 × 47.0mm
- Display size: 57.288 × 38.192mm
- Dot pitch: 0.217 × 0.217mm
- Resolution: 264×176 pixels
- Display color: Black, white
- Greyscale: 2
- Partial refresh time: N/A
- full refresh time: 6s
- Refresh power: 26.4mW(typ.)
- Standby current: <0.01uA(almost 0)
- Viewing Angle: >170°
SPI Timing
Note: Different from the traditional SPI protocol, the data line from the slave to the master is hidden since the device only has a display requirement.
- CS is slave chip select, when CS is low, the chip is enabled.
- DC is data/command control pin, when DC = 0, write command, when DC = 1, write data.
- SCLK is the SPI communication clock.
- SDIN is the data line from the master to the slave in SPI communication.
SPI communication has data transfer timing, which is combined by CPHA and CPOL.
- CPOL determines the level of the serial synchronous clock at an idle state. When CPOL = 0, the level is Low. However, CPOL has little effect on transmission.
- CPHA determines whether data is collected at the first clock edge or at the second clock edge of the serial synchronous clock; when CPHL = 0, data is collected at the first clock edge.
- There are 4 SPI communication modes. SPI0 is commonly used, in which CPHL = 0, CPOL = 0.
As you can see from the figure above, data transmission starts at the first falling edge of SCLK, and 8 bits of data are transferred in one clock cycle. Here, SPI0 is in used, and data is transferred by bits, MSB first.
Working protocoal
Pixel & Byte
We define the pixels in a monochrome picture, 0 is black and 1 is white.
White:□,Bit 1
Black:■:Bit 0
- The dot in the figure is called a pixel. As we know, 1 and 0 are used to define the color, therefore we can use one bit to define the color of one pixel, and 1 byte = 8pixels
- For example, If we set first 8 pixels to black and the last 8 pixels to white, we show it by codes, they will be 16 bit as below:
For computer, the data is saved in MSB format:
So we can use two bytes for 16 pixels.
- In addition to bicolor displaying, the 3.7inch e-Paper also supports four grayscale.
- To display grey pixels, we need to define data for gray
- Black: 00b
- Dark Grey: 01b
- Light Grey: 10b
- White: 11b
Pixel | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | ||||||||
Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Data | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 1 | 0 | 1 | 1 | 1 | 1 |
Color | Black | Black | Dark Grey | Dark Grey | Light Grey | Light Grey | White | White | ||||||||
Byte | 0x05 | 0xAF |
The display divides a four-grayscale picture into two pictures. The pixels in the same position of pictures are combined into one pixel.
Register | White | Light Grey | Dark Grey | Black |
0x10 | 0x01 | 0x01 | 0x00 | 0x00 |
0x13 | 0x01 | 0x00 | 0x01 | 0x00 |
With the tables above, you can define the data which can be used to display grayscale pixels in the 3.7inch e-Paper
Pixel | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | ||||||||
Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Data | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 1 | 0 | 1 | 1 | 1 | 1 |
Color | Black | Black | Dark Grey | Dark Grey | Light Grey | Light Grey | White | White | ||||||||
Byte | 0x05 | 0xAF | ||||||||||||||
Bit in 0x10 register | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 |
Bit in 0x13 register | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 |
Data sent to 0x10 register | 0x00 | 0x55 | ||||||||||||||
Data sent to 0x13 register | 0x05 | 0x05 |