E-ink Display interface with CYW20719
E-INK (electronic ink) is a paper-like display technology, characterized by high contrast, wide viewing angles, and minimal standby power. Unlike conventional backlit, flat panel displays that emit light, E-INK displays reflect light like paper. This makes E-INK displays more comfortable to read, and provides a wider viewing angle than most light-emitting displays. Therefore, E-INK displays are comfortable to read even in sunlight.
Currently we are using CY8CKIT-028-EPD E-INK Display Shield (EPD) interfaced with CYW20719 Eval board. The E-INK Shield has a 2.7-inch E-INK display with a resolution of 264×176 pixels.
The E-INK display contains a basic driver IC that interfaces with the CYW20719 using a custom SPI interface. The driver converts a serial data stream into individual pixel data and generates the voltages required for the E-INK display. Thus, CYW20719 has low level control to the display through the driver IC.
See the E-INK display driver document for more details.
2. HARDWARE SETUP
The CYW20719 controls the E-INK display’s reset, enable, discharge and border pins. The controller check the busy status of display via Busy pin of E-ink display. The table below shows the pin to pin connection between CY8CKIT-028-EPD E-INK Display Shield and CYW20719 Eval board.
Table 1: Pin connections
E-ink Display Shield Pins
Pin Configuration on 20719
Display Reset Pin
Display Busy Pin
Display Enable Pin
Border Control Pin
Display IO Enable Pin
Eink Select Pin
SPI CS pin
SPI MOSI Pin
SPI MISO Pin
3. E-INK DISPLAY SPI CONFIGURATION
The CYW20719 uses SPI communication with the driver IC of E-Ink display with a SPI speed maximum upto 24MHz. This E-ink display driver needs a software controlled chip select pin. Thus, make sure you have disabled the hardware SPI CS pin of CYW20719. For that, change the pin configuration of default CS (Chip select) pin (P07) to WICED_GPIO in the wiced_platform_pin_config.c file
The SPI format for display driver differs from the standard. Thus the E-ink driver code is written in such a way that follows the SPI command and timing described in the E-INK display driver document.
4. FIRMWARE FLOW OF DISPLAY
The E-Ink Display driver library provides the user low level APIs to use in their end application code. The various driver APIs are provided in the Appendix A. The driver API definitions are written as per the work flow defined in the E-INK display driver document. As an end user, you need not have to worry about the driver code, rather you must be familiarized with the end level driver APIs defined in Appendix A.
The display driver updates the display with respect to the current frame and previous frame written from the CYW20719 controller to the driver via SPI communication. One frame buffer contains 5808 ((246x176)/8) bytes. For converting the image into 5808 bytes’ frame buffer, you can use the GUI given by display vendor (Given in Appendix B). Check Appendix B for image and text formats supported by this E-ink display.
The procedure to update the display is:
The driver APIs are taken care of the above steps.
Attached a demo project designed for a sensor hub. The demo uses below custom functions which using low-level display driver APIs:
4.1 Display Initial Screen
Figure below shows the flow of code for displaying an initial screen on the E-ink display. First power on the E-ink by sending start commands, which is already taken care in the E-ink library API. Disp_Initialize function will initialize the display functions and create the frame buffer from the image buffer created by GUI given in Appendix B. After that clear the display with a white background by calling Cy_EINK_ShowFrame function. Cy_EINK_ShowFrame function will display the image corresponding to current frame buffer. You must call Cy_EINK_ImageToFrameBuffer() function by passing the pointer for image to displayed before calling Cy_EINK_ShowFrame function. Refer Appendix A for function descriptions.
4.2 Refresh Display
The display need to be updated by the sensor values collected. We have hard coded co-ordinates for displaying each sensor values. The RefreshDisplay function will take the sensor values, convert it to hex values and will update the main frame buffer at specific co-ordinates hard coded in the function. Cy_EINK_TextToFrameBuffer function will convert the sensor values to corresponding bytes which will be embedded into the main frame buffer. This main buffer will be passed to the Cy_EINK_ShowFrame function for displaying the screen with sensor values.
5. EH Kit Display Screen details:
Steps involved in the display configuration