From Waveshare Wiki
Jump to: navigation, search
 
(13 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<div class="tabber">
+
{{#tweekihide:firstHeading|sidebar-left|sidebar-right}}__NOTOC__
<div class="tabbertab" title="Instruction">
 
{{Infobox item
 
|name=3.7inch e-Paper
 
|name2=3.7inch e-paper HAT
 
|img=[[File:3.7inch-e-Paper-1.jpg|300px|{{Amazon_nolink|default={{#ifeq: {{#urlget:amazon|0}}|{{#urlget:Amazon|0}}| default|}}|url=link=https://www.waveshare.com/3.7inch-e-paper.htm}}]]
 
|img2=[[File:3.7inch-e-Paper-HAT-1.jpg|300px|{{Amazon_nolink|default={{#ifeq: {{#urlget:amazon|0}}|{{#urlget:Amazon|0}}| default|}}|url=link=http://www.waveshare.com/3.7inch-e-paper-hat.htm}}]]
 
|caption=480x280, 3.7inch EPD panel without driver board
 
|caption2=480x280, 3.7inch EPD HAT for Raspberry Pi, SPI interface
 
|category=[[:Category:OLEDs / LCDs|OLEDs / LCDs]], [[:Category:LCD|LCD]] [[:Category:Display|e-Paper]]
 
|brand=Waveshare
 
|{{#ifeq: {{#urlget:amazon|0}}|{{#urlget:Amazon|0}}| default|}}=display
 
|website_cn=[http://www.waveshare.net/shop/3.7inch-e-paper-hat.htm 官方中文站点]
 
|website_en=[http://www.waveshare.com/3.7inch-e-paper-hat.htm Waveshare website]
 
|interface1=SPI
 
|related=
 
{{Product List|OLEDs / LCDs/e-Paper}}
 
}}
 
  
=Introduction=
+
<div style="background-color: #343434;text-align: center;color: white;padding: 20px;margin: 8px;">
 +
=3.7inch e-Paper HAT Manual=
 +
</div>
 +
<p></p>
 +
{{ContentGrid|grid-gap=25px
 +
|content =  
  
==<font color="#FF0000">'''important reminder'''==
+
{{StudyCard
'''The FPC line of this ink screen is very fragile and easily broken after repeated bending. Please pay attention to it when using it'''</font>
+
|img=[[File:Start-test1.png|121px|link=https://www.waveshare.com/wiki/3.7inch_e-Paper_HAT_Manual#Introduction]]
==Features==
+
|heading = Introduction
*Dimension: 3.7inch
+
|content = Parameters, principles, and precautions
*Outline Dimension (Raw panel): 54.9mm(H) x 93.3mm(V) x  0.78mm(D)
+
}}
*Outline Dimension (Driver board): 58.0mm(H) x 96.5mm(V)
 
*Display Size: 48.55mm x 23.71mm
 
*Operating Voltage: 3.3V/5V
 
*Interface: SPI
 
*Dot Pitch: 58.0mm(H) x 96.5mm(V)
 
*Resolution: 58.0mm(H) × 96.5mm(V
 
*Display Color: Black, White
 
*Partial Refresh: 0.3s
 
*Full Refresh Time: 3s
 
*Refresh Power: 50mW(Typ.)
 
*Standby Current: <0.01uA (almost none)
 
*Note:
 
1.Refresh time: The refresh time is the experimental results, the actual refresh time will have errors, and the actual effect shall prevail. There will be a flickering effect during the global refresh process, this is a normal phenomenon
 
  
2. Power consumption: The power consumption data is the experimental results. The actual power consumption will have a certain error due to the existence of the driver board and the actual use situation. The actual effect shall prevail.
+
{{StudyCard
 +
|img=[[File:Remote-access-test1.png|121px|link=https://www.waveshare.com/wiki/3.7inch_e-Paper_HAT_Manual#Users_Guides_of_Raspberry_Pi]]
 +
|heading = Start with Raspberry Pi
 +
|content = Using BCM2835, WiringPi, file IO, RPI (Python) library development routines and instructions
 +
}}
  
'''Display mode: This module can switch between 2 grayscale and 4 grayscale by sending different commands, and there are corresponding operation functions and examples in all sample codes''
+
{{StudyCard
 +
|img=[[File:Linux-test1.png|121px|link=https://www.waveshare.com/wiki/3.7inch_e-Paper_HAT_Manual#User_Guides_of_Jetson_Nano]]
 +
|heading = Start with the Jetson Nano
 +
|content = Use C language, Python developed routines and instructions
 +
}}
  
==SPI Communication Timing==
+
{{StudyCard
[[File:1.54inch-e-paper-manual-1.png|400px]]
+
|img=[[File:Config-test1.png|121px|link=https://www.waveshare.com/wiki/3.7inch_e-Paper_HAT_Manual#User_Guides_of_STM32]]
 +
|heading = Starting from the STM32
 +
|content = Use STM32CubeMX to develop routines based on STM32F103ZET6 and their usage instructions
 +
}}
  
Since the ink screen only needs to be displayed, the data cable (MISO) sent from the machine and received by the host is hidden here.
+
{{StudyCard
*CS: Slave chip select, when CS is low, the chip is enabled
+
|img=[[File:Tinker Board 2硬件-test1.png|121px|link=https://www.waveshare.com/wiki/3.7inch_e-Paper_HAT_Manual#User_Guides_of_Arduino]]
*DC: data/command control pin, write command when DC=0; write data when DC=1
+
|heading = Starting from the Arduino
*SCLK: SPI communication clock
+
|content = Routines developed based on Arduino UNO R3 and their usage instructions
*SDIN: SPI communication master sends, slave receives
+
}}
*Timing: CPHL=0, CPOL=0 (SPI0)
 
[Remarks] For specific information about SPI, you can search for information online.<big>
 
  
==Working protocoal==
+
{{StudyCard
===Pixel & Byte===
+
|img=[[File:Linux-test1.png|121px|link=https://www.waveshare.com/wiki/3.7inch_e-Paper_HAT_Manual#Resources]]
We define the pixels in a monochrome picture, 0 is black and 1 is white.<br />
+
|heading = Resources
White:□,Bit 1<br />
+
|content = Documentation, procedures and data sheets, etc
Black:■:Bit 0<br />
+
}}
*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<br />
 
*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:<br />
 
[[file:e-paper_hardware_work_1.png]]<br />
 
For computer, the data is saved in MSB format:<br />
 
[[file:e-paper_hardware_work_2.png]]<br />
 
So we can use two bytes for 16 pixels.<br />
 
*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: 10b
 
:* Light Grey: 01b
 
:* White: 11b
 
{|class="wikitable" style="text-align:center; width:700px"
 
|-
 
|'''Pixel'''
 
|colspan=2|1
 
|colspan=2|2
 
|colspan=2|3
 
|colspan=2|4
 
|colspan=2|5
 
|colspan=2|6
 
|colspan=2|7
 
|colspan=2|8
 
|-
 
|'''Bit'''
 
|7
 
|6
 
|5
 
|4
 
|3
 
|2
 
|1
 
|0
 
|7
 
|6
 
|5
 
|4
 
|3
 
|2
 
|1
 
|0
 
|-
 
|'''Data'''
 
|0
 
|0
 
|0
 
|0
 
|1
 
|0
 
|1
 
|0
 
|0
 
|1
 
|0
 
|1
 
|1
 
|1
 
|1
 
|1
 
|-
 
|'''Color'''
 
|colspan=2|Black
 
|colspan=2|Black
 
|colspan=2|Dark Grey
 
|colspan=2|Dark Grey
 
|colspan=2|Light Grey
 
|colspan=2|Light Grey
 
|colspan=2|White
 
|colspan=2|White
 
|-
 
|'''Byte'''
 
|colspan=8|0x0A
 
|colspan=8|0x5F
 
|}
 
The display divides a four-grayscale picture into two pictures. The pixels in the same position of pictures are combined into one pixel.
 
{|class="wikitable" style="text-align:center;"
 
|-
 
|'''Register'''
 
|'''White'''
 
|'''Light Grey'''
 
|'''Dark Grey'''
 
|'''Black'''
 
|-
 
|0x24
 
|0x01
 
|0x00
 
|0x01
 
|0x00
 
|-
 
|0x26
 
|0x01
 
|0x01
 
|0x00
 
|0x00
 
|}
 
With the tables above, you can define the data which can be used to display grayscale pixels in the 3.7inch e-Paper
 
{|class="wikitable" style="text-align:center; "
 
|-
 
|'''Pixel'''
 
|colspan=2|1
 
|colspan=2|2
 
|colspan=2|3
 
|colspan=2|4
 
|colspan=2|5
 
|colspan=2|6
 
|colspan=2|7
 
|colspan=2|8
 
|-
 
|'''Bit'''
 
|7
 
|6
 
|5
 
|4
 
|3
 
|2
 
|1
 
|0
 
|7
 
|6
 
|5
 
|4
 
|3
 
|2
 
|1
 
|0
 
|-
 
|'''Data'''
 
|0
 
|0
 
|0
 
|0
 
|1
 
|0
 
|1
 
|0
 
|0
 
|1
 
|0
 
|1
 
|1
 
|1
 
|1
 
|1
 
|-
 
|'''Color'''
 
|colspan=2|Black
 
|colspan=2|Black
 
|colspan=2|Dark Grey
 
|colspan=2|Dark Grey
 
|colspan=2|Light Grey
 
|colspan=2|Light Grey
 
|colspan=2|White
 
|colspan=2|White
 
|-
 
|'''Byte'''
 
|colspan=8|0x0A
 
|colspan=8|0x5F
 
|-
 
|'''Bit in 0x24 register'''
 
|colspan=2|0
 
|colspan=2|0
 
|colspan=2|1
 
|colspan=2|1
 
|colspan=2|0
 
|colspan=2|0
 
|colspan=2|1
 
|colspan=2|1
 
|-
 
|'''Bit in 0x26 register'''
 
|colspan=2|0
 
|colspan=2|0
 
|colspan=2|0
 
|colspan=2|0
 
|colspan=2|1
 
|colspan=2|1
 
|colspan=2|1
 
|colspan=2|1
 
|-
 
|'''Data sent to 0x24 register'''
 
|colspan=16|0x33
 
|-
 
|'''Data sent to 0x26 register'''
 
|colspan=16|0x0F
 
|}
 
==Precautions==
 
#For the screen that supports partial update, please note that you cannot refresh the screen with the partial mode all the time. After several partial updating, you need to fully refresh the screen once. Otherwise, the screen display effect will be abnormal, which cannot be repaired!<br/>
 
#Because of the different batches, some of them have aberrations. Store the e-Paper right side up will reduce it. And if the e-Paper didn't be refreshed for a long time, it will become more and more reddish/yellowish. Please use the demo code to refresh the e-paper several times in this case.<br/>
 
#Note that the screen cannot be powered on for a long time. When the screen is not refreshed, please set the screen to sleep mode, or power off the e-Paper. Otherwise, the screen will remain in a high voltage state for a long time, which will damage the e-Paper and cannot be repaired!<br/>
 
#When using the e-Paper, it is recommended that the refresh interval be at least 180s, and refresh at least once every 24 hours. If the e-Paper is not used for a long time, the ink screen should be brushed and stored. (Refer to the datasheet for specific storage environment requirements)<br/>
 
#After the screen enters sleep mode, the sent image data will be ignored, and it can be refreshed normally only after initializing again.<br/>
 
#Control the 0x3C or 0x50 (refer to the datasheet for details) register to adjust the border color. In the routine, you can adjust the Border Waveform Control register or VCOM AND DATA INTERVAL SETTING to set the border.<br/>
 
#If you find that the created image data is displayed incorrectly on the screen, it is recommended to check whether the image size setting is correct, change the width and height settings of the image and try again.<br/>
 
#The working voltage of the e-Paper is 3.3V. If you buy the raw panel and you need to add a level convert circuit for compatibility with 5V voltage. The new version of the driver board (V2.1 and subsequent versions) has added a level processing circuit, which can support both 3.3V and 5V working environments. The old version can only support a 3.3V working environment. You can confirm the version before using it. (The one with the 20-pin chip on the PCB is generally the new version)<br/>
 
#The FPC cable of the screen is relatively fragile, pay attention to bending the cable along the horizontal direction of the screen when using it, and do not bend the cable along the vertical direction of the screen<br/>
 
#The screen of e-Paper is relatively fragile, please try to avoid dropping, bumping, and pressing hard.<br/>
 
#We recommend that customers use the sample program provided by us to test with the corresponding development board after they get the screen.<br/>
 
<div class="tabbertab" title="User Guides of Pi">
 
  
We provide several examples for testing, you can 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.
+
{{StudyCard
{{Raspberry Pi Guides for SPI e-Paper}}
+
|img=[[File:显示屏-test1.png|121px|link=https://www.waveshare.com/wiki/3.7inch_e-Paper_HAT_Manual#FAQ]]
</div>
+
|heading = FAQ
<div class="tabbertab" title="User Guides of Jetson Nano">
+
|content = e-Paper frequently asked questions
{{Jetson Nano Guides for SPI e-Paper}}
+
}}
</div>
 
<div class="tabbertab" title="User Guides of STM32">
 
{{STM32 Guides for SPI e-Paper}}
 
</div>
 
<div class="tabbertab" title="User Guides of Arduino">
 
{{Arduino Guides for SPI e-Paper}}
 
</div>
 
<div class="tabbertab" title="User Guides of ESP32">
 
{{ESP32 Guides for SPI e-Paper}}
 
</div>
 
<div class="tabbertab" title="User Guides of ESP8266">
 
{{ESP8266 Guides for SPI e-Paper}}
 
</div>
 
<div class="tabbertab" title="Resources">
 
  
=Resources=
+
{{StudyCard
=== Documentation ===
+
|img=[[File:数据表-test1.png|121px|link=https://www.waveshare.com/wiki/3.7inch_e-Paper_HAT_Manual#Support]]
{{Commom Instruction of SPI e-paper}}
+
|heading = Support
 +
|content = Technical support
 +
}}
  
*[https://www.waveshare.com/w/upload/8/8e/3.7inch_e-Paper_Schematic.pdf 3.7inch e-Paper HAT Schematic]
+
}}
*[https://www.waveshare.com/w/upload/7/71/3.7inch_e-Paper_Specification.pdf 3.7inch e-Paper Specification]
 
*[https://www.waveshare.com/w/upload/2/2a/SSD1677_1.0.pdf SSD1677_1.0 Datasheet]
 
 
 
===Demo code===
 
*[https://github.com/waveshare/e-Paper Github]
 
 
 
===Related Resources===
 
This is a post in Arduino Form about our SPI e-Paper thanks to ZinggJM, maybe you want to refer to it.
 
*[https://forum.arduino.cc/index.php?topic=487007.0 Waveshare e-Paper display with SPI]
 
</div>
 
<div class="tabbertab" title="FAQ">
 
 
 
=FAQ=
 
<!--{{e-Paper FAQ}}-->
 
{{e-Paper FAQ}}
 
</div>
 
<div class="tabbertab" title="Support">
 
 
 
==Support==
 
{{Service00}}
 
</div>
 
</div>
 

Latest revision as of 10:03, 21 July 2022


3.7inch e-Paper HAT Manual

Start-test1.png

Introduction

Parameters, principles, and precautions
Remote-access-test1.png

Start with Raspberry Pi

Using BCM2835, WiringPi, file IO, RPI (Python) library development routines and instructions
Linux-test1.png

Start with the Jetson Nano

Use C language, Python developed routines and instructions
Config-test1.png

Starting from the STM32

Use STM32CubeMX to develop routines based on STM32F103ZET6 and their usage instructions
Tinker Board 2硬件-test1.png

Starting from the Arduino

Routines developed based on Arduino UNO R3 and their usage instructions
Linux-test1.png

Resources

Documentation, procedures and data sheets, etc
显示屏-test1.png

FAQ

e-Paper frequently asked questions
数据表-test1.png

Support

Technical support