Template: 6inch e-Paper user manual

From Waveshare Wiki
Jump to: navigation, search

Working with Raspberry Pi (SPI)

  • Hardware connection:
You should add the IT8951 Driver HAT on Raspberry Pi, communicating via the SPI interface.
6inch-e-Paper-HAT-user-Manual-06.jpg
You can also connect by wires:
Connect to Raspberry Pi via SPI
IT8951 Driver HAT Raspberry Pi (BCM) Description'
5V 5V 5V power input
GND GND Ground
MISO P9 MISO Pin of SPI
MOSI P10 MOSI Pin of SPI
SCK P11 SCK Pin of SPI
CS P8 Chip selection of SPI (Low active)
RST P17 Reset pin (Low active)
HRDY P24 Busy stats pin (Low when busy)
  • Set the DIP switch to SPI mode.
9.7inch-e-Paper-HAT-Manual-14.jpg
  • Open the terminal of Raspberry Pi, and install bcm2835 libraries.
wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.60.tar.gz
tar zxvf bcm2835-1.60.tar.gz 
cd bcm2835-1.60/
sudo ./configure
sudo make
sudo make check
sudo make install
# For more you can refer to the official website: http://www.airspayce.com/mikem/bcm2835/
  • Enable SPI interface
sudo raspi-config

Choose Interfacing Options -> SPI -> Yes.

  • Download demo codes and compile them.
    • Method 1: Download from our website. (Recommended)
sudo apt-get install p7zip-full
sudo wget  https://files.waveshare.com/upload/8/80/IT8951_20200319_Release.7z
7z x IT8951_20200319_Release.7z -O./IT8951
cd IT8951/
sudo make clean
sudo make -j4
    • Method 2: Download from GitHub:
git clone https://github.com/waveshare/IT8951-ePaper.git
cd IT8951-ePaper/Raspberry
sudo make clean
sudo make -j4
  • Check the VCOM value on the FPC.
6inch-HD-e-Paper-HAT-Manual-06.png

Add the VCOM value as a parameter and test the e-Paper, and this model is mode 0.

sudo ./epd -1.78 0
  • Demo execution phenomenon:

1) First, the r-paper will refresh the 16 gray bars partially in sequence.

2) Then demonstrate the demo of drawing lines, circles, rectangles, characters, and numbers.

3) Then respectively demonstrate the demo of displaying BMP pictures in 1bp, 2bp, and 4bp modes.

4) Next, demonstrate the effect of fast refresh in A2 mode.

5) Then display a gif animation.

6) Then demonstrate a Demo that counts the frame rate.

7) Finally, the e-paper is whitened in Init mode for long-term storage.