Difference between revisions of "5.65inch e-Paper Module (F)"
Line 141: | Line 141: | ||
*[[ESP8266 guides for SPI e-Paper|For working with ESP8266]] | *[[ESP8266 guides for SPI e-Paper|For working with ESP8266]] | ||
--> | --> | ||
+ | |||
+ | </div> | ||
+ | <div class="tabbertab" title="User Guides of Jetson Nano"> | ||
+ | </div> | ||
+ | <div class="tabbertab" title="User Guides of STM32"> | ||
+ | </div> | ||
+ | <div class="tabbertab" title="User Guides of Arduino"> | ||
+ | </div> | ||
+ | <div class="tabbertab" title="User Guides of ESP32"> | ||
+ | </div> | ||
+ | <div class="tabbertab" title="User Guides of ESP8266"> | ||
</div> | </div> | ||
<div class="tabbertab" title="Resources"> | <div class="tabbertab" title="Resources"> |
Revision as of 08:19, 22 July 2020
| ||
Introduction
This is an 5.65inch colorful e-Paper display module, 600x448 resolution, supports ACeP (Advanced Color Paper) sveen-color.
More |
Interfaces
VCC | 3.3V |
GND | GND |
DIN | SPI MOSI |
CLK | SPI SCK |
CS | SPI chip select (Low active) |
DC | Data/Command control pin (High for data, and low for command) |
RST | External reset pin (Low for reset) |
BUSY | Busy state output pin (Low for busy) |
SPI timing
This product is an E-paper device adopting the image display technology of Microencapsulated Electrophoretic Display, MED. The initial approach is to create tiny spheres, in which the charged color pigments are suspending in the transparent oil and would move depending on the electronic charge. The E-paper screen display patterns by reflecting the ambient light, so it has no background light requirement. Under sunshine, the E-paper screen still has high visibility with a wide viewing angle of 180 degrees. It is the ideal choice for E-reading.
- Communication protocol
Note: Different from the traditional SPI protocol, the data line from the slave to the master is hidden since the device only has display requirement.
- CS is the 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 with CPHA and CPOL.
- CPOL determines the level of the serial synchronous clock at idle state. When CPOL = 0, the level is Low. However, CPOL has little effect to the transmission.
- CPHA determines 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. In here, SPI0 is in used, and data is transferred by bits, MSB first.
Color of e-Paper
An image is made of pixels. The sizes of every pixel defined who may color are supported by the e-Paper. Monochrome image use one bit for one pixel (0 and 1, black and white), in this case, if we want to display more colors, we should use more bits for every pixel.
You can refer to the Make BMP file for e-Paper" guide and make the image yourself for this module.
We need at least 3bits to display severe color. For easy programming, we and an 0 bit in front of it. In this case, we use 4 bits for every pixel.
Color | BIN | HEX | The color (reference) |
Black | 0b0000 | 0x0 | |
White | 0b0001 | 0x1 | |
Green | 0b0010 | 0x2 | |
Blue | 0b0011 | 0x3 | |
Red | 0b0100 | 0x4 | |
Yellow | 0b0101 | 0x5 | |
Orange | 0b0110 | 0x6 |
For example, if you want to display four colors, green, yellow, red and orange, it should be like as below:
Pixel | 1 | 2 | 3 | 4 | ||||||||||||
Bit | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
Data | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 |
Color |
Data is saved in MSB formate and 1byte is equal to 8 bits.
Pixel | 1 | 2 | 3 | 4 | ||||||||||||
Bit | 7 | 6 | 5 | 4 | 3 | 3 | 1 | 0 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Data | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 |
Color | ||||||||||||||||
Byte | 0x25 | 0x46 |
We provide several examples for testing, you first test the e-Paper by following the guides. If your developing board is different, you need to write your codes yourself by following the resources.
Working With Raspberry Pi
Provide BCM2835, WiringPi, file IO, RPI (Python) library demos.
Hardware connection
When connecting the Raspberry Pi, if the driver board has a 40pin header, you can directly plug it into the 40PIN header of the Raspberry Pi, and pay attention to the pins. If you choose to connect with an 8PIN cable, please refer to the pin correspondence table below
For the 1.02inch e-paper Module, the pin header is used, and the wiring needs to be connected according to the following table
e-Paper | Raspberry Pi | |
BCM2835 encoding | Board physical pin number | |
VCC | 3.3V | 3.3V |
GND | GND | GND |
DIN | MOSI | 19 |
CLK | SCLK | 23 |
CS | CE0 | 24 |
DC | 25 | 22 |
RST | 17 | 11 |
BUSY | 24 | 18 |
Take the 7.5inch HD e-Paper (B) connected to the e-paper Driver HAT as an example, just plug it directly into the Raspberry Pi:
Enable SPI Interface
- Open the Raspberry Pi terminal and enter the following command in the config interface:
sudo raspi-config Choose Interfacing Options -> SPI -> Yes Enable SPI interface
Then reboot your Raspberry Pi:
sudo reboot
- Check /boot/config.txt, and you can see 'dtparam=spi=on' was written in.
- To make sure SPI is not occupied, it is recommended to close other drivers' coverage. You can use ls /dev/spi* to check whether SPI is occupied. If the terminal outputs /dev/spidev0.1 and /dev/spidev0.1, SPI is not occupied.
Install Library
Install BCM2835
#Open the Raspberry Pi terminal and run the following command wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.71.tar.gz tar zxvf bcm2835-1.71.tar.gz cd bcm2835-1.71/ sudo ./configure && sudo make && sudo make check && sudo make install # For more information, please refer to the official website: http://www.airspayce.com/mikem/bcm2835/
- Install WiringPi
#Open the Raspberry Pi terminal and run the following command: sudo apt-get install wiringpi #For Raspberry Pi systems after May 2019 (Earlier than the previous can not be implemented), an upgrade may be required to: wget https://project-downloads.drogon.net/wiringpi-latest.deb sudo dpkg -i wiringpi-latest.deb gpio -v #Running gpio -v will bring up version 2.52, if it doesn't, it means there was an installation error. #The Bullseye branch system uses the following command: git clone https://github.com/WiringPi/WiringPi cd WiringPi ./build gpio -v # Run gpio -v and version 2.60 will appear, if it does not appear, it means there is an installation error
- Download program (already downloaded can be skipped):
sudo apt-get install p7zip-full wget https://files.waveshare.com/upload/3/39/E-Paper_code.7z 7z x E-Paper_code.7z -O./e-Paper cd e-Paper/RaspberryPi_JetsonNano/
- Downloading the program via GitHub (alternate method, you can skip it if you've already downloaded it).
Access to GitHub is not very smooth at the moment, so we recommend downloading from our website using the method above.
git clone https://github.com/waveshare/e-Paper.git cd e-Paper/RaspberryPi_JetsonNano/
Compile the program (Note: -j4 is compiled using 4 threads, the number can be modified; EPD=epd1in02d is to specify a macro definition, epd1in02d corresponds to the test program in the main function).
# At this point in the e-Paper/RaspberryPi_JetsonNano cd c sudo make clean sudo make -j4 EPD=epd1in02d
- Run the demo:
sudo ./epd
Run Python Library
- Install Python Library:
sudo apt-get update sudo apt-get install python3-pip sudo apt-get install python3-pil sudo apt-get install python3-numpy sudo pip3 install RPi.GPIO sudo pip3 install spidev
- Install the function library (Python2)
sudo apt-get update sudo apt-get install python-pip sudo apt-get install python-pil sudo apt-get install python-numpy sudo pip install RPi.GPIO sudo pip install spidev
- Download the program: (already downloaded can be skipped):
sudo apt-get install p7zip-full wget https://files.waveshare.com/upload/3/39/E-Paper_code.7z 7z x E-Paper_code.7z -O./e-Paper cd e-Paper/RaspberryPi_JetsonNano/
- Downloading the program via GitHub (alternate method, you can skip it if you've already downloaded it).
Access to GitHub is not very smooth at the moment, so we recommend downloading from our website using the method above.
git clone https://github.com/waveshare/e-Paper.git cd e-Paper/RaspberryPi_JetsonNano/
- Run the program:
# Make sure in the e-Paper/RaspberryPi_JetsonNano/ cd python/examples/ python3 epd_1in02_test.py
Resources
Documentation
- Instruction about make new font
- Make BMP file for e-Paper
- 5.65inch e-Paper Module (F) Schematic
- 5.65inch e-Paper Module (F) Specification
Demo code
FAQ
Support
If you require technical support, please go to the Support page and open a ticket.