来自Waveshare Wiki
跳转至: 导航搜索
 
(未显示5个用户的35个中间版本)
第1行: 第1行:
<div class="tabber">
+
{{#tweekihide:firstHeading|sidebar-left|sidebar-right}}__NOTOC__
<!--<div class="tabbertab" title="说明"></div>-->
 
 
 
{{外围模块|colorscheme=blue
 
|name=4.2inch e-Paper Module
 
|img=<div class="tabber"><div class="tabbertab" title="裸屏">[[File:4.2inch-e-Paper-1.jpg|360px|alt=4.2inch e-paper|link=http://{{SERVERNAME}}/shop/4.2inch-e-Paper.htm]]</div><div class="tabbertab" title="带驱动">[[File:4.2inch-e-Paper-Module-intro.jpg|360px|alt=4.2inch e-Paper Module|link=http://{{SERVERNAME}}/shop/4.2inch-e-Paper-Module.htm|4.2inch e-Paper Module]]</div></div>
 
|category1=e-Paper
 
|category2=e-Paper模块
 
|brand=Waveshare
 
|feature=4.2英寸墨水屏
 
|feature-name1= 分辨率
 
|feature-value1= 400x300
 
|feature-name2= 显示颜色
 
|feature-value2= 黑、白
 
|interface1=SPI
 
|Product1 = {{e-Paper-Module-HAT-Related}}
 
}}
 
<!--<div class="tabbertab" title="注意事项">
 
{{e-Paper-precautions}}
 
</div>-->
 
 
 
<div class="tabbertab" title="说明">
 
==特点==
 
*尺寸: 4.2inch
 
*外形尺寸(裸屏):90.1mm × 77.0mm × 1.18mm
 
*外形尺寸(驱动板):103.0mm x 78.5mm
 
*显示尺寸:84.8mm x 63.6mm
 
*工作电压:3.3V/5V
 
*通信接口:SPI
 
*点距:0.212 x 0.212
 
*分辨率:400 x 300
 
*显示颜色:黑、白
 
*灰度等级:2
 
*全局刷新 :4s
 
*刷新功耗 : 26.4mW(typ.)
 
*待机功耗 :<=0.017mW
 
【备注】:
 
刷新时间:刷新时间为实验测试数据,实际刷新时间会有误差,以实际效果为准。全局刷新过程中会有闪烁效果,这个是正常现象<br />
 
功耗:功耗数据为实验测试数据,实际功耗由于驱动板的存在和实际使用情况的不同,会有一定误差,以实际效果为准<br />
 
==SPI 通信时序==
 
[[File:e-paper-spi-timing.jpg|700px]]
 
 
 
由于墨水屏只需要显示,这里将从机发,主机收的数据线(MISO)隐藏。<br />
 
CS:从机片选,当CS为低电平的时候,芯片使能<br />
 
DC:数据/命令控制引脚,当DC=0时写入命令;DC=1时写入数据<br />
 
SCLK: SPI通信时钟<br />
 
SDIN:SPI通信主机发送,从机接收<br />
 
时序:CPHL=0, CPOL=0 (SPI0)<br />
 
【备注】具体关于SPI通信的相关信息,可以自行网上搜索资料了解
 
 
 
==墨水屏刷新原理==
 
===像素与字节的关系===
 
对于黑白图片,我们可以规定,如果如果是黑色我们定义成0,如果是白色就定义成1,那么有了表示颜色的方式:<br />
 
白色:□,对应1<br />
 
黑色:■:对应0<br />
 
*一个点在图形上一般称之为像素点(pixel),而颜色不是1就是0,也就是1个位就可以标识颜色:1Pixel = 1bit,那么一个字节里面就包含了8个像素点。<br />
 
*以16个像素点为例,我们假设前8个像素点为黑,后8个像素点为白色,那么可以这么认为,像素点1-16,对应这0位到15位,0表示黑色,1表示白色:<br />
 
[[file:e-paper_hardware_work_1.png]]<br />
 
对于计算机而言,它的数据存储方式是高位在前,低位在后,且一个字节只有8个位,因此会有一点改变:<br />
 
[[file:e-paper_hardware_work_2.png]]<br />
 
这样只需要2个字节即可表示16个像素点了。<br />
 
 
 
*4.2inch e-paper的4灰阶显示(黑白2阶显示和上面的仍然是一样的)<br />
 
首先我们需要了解4灰阶图片,它说明将最亮与最暗之间的亮度变化,区分为4份,从白色到黑色,中间多出了2中颜色,我们可以把它定义浅灰、深灰。<br />
 
黑色:00b<br />
 
深灰:01b<br />
 
浅灰:10b<br />
 
白色:11b<br />
 
一般计算机为了节省存储空间,四灰色一般占用2个字节,还是上面的例子,以8个像素点为例,2个像素点黑,2个像素深灰、2个像素浅灰、2个像素白色:<br />
 
[[file:e-paper_hardware_work_5.png]]<br />
 
同样一张4灰度的图片可以看成2张图片叠加的,不同图片的同一个像素点叠加而成一个像素点,这个点有4种组合,也就是4灰度:<br />
 
{|border=1; style="width:700px;"
 
|-style="background:#0000ff; color:white;" align="center"
 
|寄存器||白||浅灰||深灰||黑
 
|-align="center"
 
|0x10||0x01||0x01||0x00||0x00
 
|-align="center"
 
|0x13||0x01||0x00||0x01||0x00
 
|}
 
上面已经知道了4灰阶与内存的关系,并且知道不同的组合对墨水屏的颜色不一致,因此需要把上述的数据进行转换:<br />
 
[[file:e-paper_hardware_work_9.png]]<br />
 
  
 +
<div style="background-color: #343434;text-align: center;color: white;padding: 20px;margin: 8px;">
 +
=4.2inch e-Paper Module文档教程=
 
</div>
 
</div>
 +
<p></p>
 +
{{ContentGrid|grid-gap=25px
 +
|content =
  
<div class="tabbertab" title="RPI使用教程">
+
{{StudyCard
{{e-paper_for_rpiuse}}
+
|img=[[文件:E-Paper Introduction 4.jpg|110px|link=https://www.waveshare.net/wiki/4.2inch_e-Paper_Module_Manual#.E8.AF.B4.E6.98.8E]]
</div>
+
|heading = '''产品说明'''
 +
|content = 参数、原理和注意事项
 +
}}
  
<div class="tabbertab" title="JetsonNano使用教程">
+
{{StudyCard
{{e-paper_for_jetsonnano_use}}
+
|img=[[文件:E-Paper RPi 2.jpg|110px|link=https://www.waveshare.net/wiki/4.2inch_e-Paper_Module_Manual#Raspberry_Pi]]
</div>
+
|heading = '''从Raspberry Pi开始'''
 +
|content = 使用C语言、Python开发的例程及其使用说明
 +
}}
  
<div class="tabbertab" title="STM32使用教程">
+
{{StudyCard
{{e-paper_for_stm32_use}}
+
|img=[[文件:E-Paper Arduino 2.jpg|110px|link=https://www.waveshare.net/wiki/4.2inch_e-Paper_Module_Manual#Arduino]]
</div>
+
|heading = '''从Arduino开始'''
 +
|content = 基于Arduino UNO R3开发的例程及其使用说明
 +
}}
  
<div class="tabbertab" title="Arduino使用教程">
+
{{StudyCard
{{e-paper_for_arduino_use}}
+
|img=[[文件:E-Paper NVDIA 2.jpg|110px|link=https://www.waveshare.net/wiki/4.2inch_e-Paper_Module_Manual#Jetson_Nano]]
</div>
+
|heading = '''从Jetson Nano开始'''
 +
|content = 使用C语言、Python开发的例程及其使用说明
 +
}}
  
<!--<div class="tabbertab" title="硬件连接和软件设置">
+
{{StudyCard
{{e-Paper-connecting-settings}}
+
|img=[[文件:E-Paper X3Pi 1.jpg|110px|link=https://www.waveshare.net/wiki/4.2inch_e-Paper_Module_Manual#X3]]
</div>-->
+
|heading = '''从旭日X3派开始'''
 +
|content = 使用Python开发的例程及其使用说明
 +
}}
  
<!--<div class="tabbertab" title="程序说明">
+
{{StudyCard
{{e-Paper-codes-description}}
+
|img=[[文件:E-Paper STM32 2.jpg|110px|link=https://www.waveshare.net/wiki/4.2inch_e-Paper_Module_Manual#STM32]]
</div>-->
+
|heading = '''从STM32开始'''
 +
|content = 使用STM32CubeMX开发的例程及其使用说明
 +
}}
  
 +
{{StudyCard
 +
|img=[[文件:E-Paper ESP32.jpg|110px|link=https://www.waveshare.net/wiki/4.2inch_e-Paper_Module_Manual#ESP32.2F8266]]
 +
|heading = '''从ESP32/8266开始'''
 +
|content = ESP32/8266的使用手册
 +
}}
  
<div class="tabbertab" title="资料">
+
{{StudyCard
===文档===
+
|img=[[文件:E-Paper Resources 4.jpg|110px|link=https://www.waveshare.net/wiki/4.2inch_e-Paper_Module_Manual#.E8.B5.84.E6.96.99]]
*[http://{{SERVERNAME}}/w/upload/9/97/4.2inch_e-Paper_Schematic.pdf 原理图]<br>
+
|heading = '''资料'''
 +
|content = 文档、程序和数据手册等
 +
}}
  
===程序===
+
{{StudyCard
{{E-paper code}}
+
|img=[[文件:E-Paper FAQ 4.jpg|110px|link=https://www.waveshare.net/wiki/4.2inch_e-Paper_Module_Manual#FAQ]]
 +
|heading = '''FAQ'''
 +
|content = 电子纸常见问题与解答
 +
}}
  
旧版本示例程序
+
{{StudyCard
*[http://www.waveshare.net/w/upload/8/80/4.2inch_e-paper_code.7z 旧版本示例程序]
+
|img=[[文件:E-Paper Support 4.jpg|110px|link=https://www.waveshare.net/wiki/4.2inch_e-Paper_Module_Manual#.E6.8A.80.E6.9C.AF.E6.94.AF.E6.8C.81]]
 +
|heading = '''售后服务'''
 +
|content = 技术支持
 +
}}
  
===数据手册===
+
}}
* [http://{{SERVERNAME}}/w/upload/6/6a/4.2inch-e-paper-specification.pdf 4.2inch e-Paper Datasheet]
 
 
 
===开发资料===
 
*[http://{{SERVERNAME}}/w/upload/3/36/Image2Lcd.7z Image2Lcd图片取模软件]
 
*[http://{{SERVERNAME}}/w/upload/c/c6/Zimo221.7z 字摸提取软件]
 
===认证资料===
 
*[http://www.waveshare.net/w/upload/b/bc/4.2inch_e-paper_Certification.zip CE RoHS]
 
===相关链接===
 
{{Raspberry Pi Study}}
 
[http://{{SERVERNAME}}/study/portal.php?mod=list&catid=40 STM32cubeMX系列教程]
 
<br /><big>批量下载教程——请戳<big><big><big>☛</big></big></big></big>[[File:download-icon.png|link=批量下载教程]]
 
 
 
 
 
</div>
 
<div class="tabbertab" title="FAQ"><br />
 
{{Two-color e-paper FAQ}}
 
{{E-Paper FAQ}}
 
</div>
 
<div class="tabbertab" title="售后"><br />{{Service13}}</div>
 

2023年3月22日 (三) 15:51的最新版本


4.2inch e-Paper Module文档教程

E-Paper Introduction 4.jpg

产品说明

参数、原理和注意事项
E-Paper RPi 2.jpg

从Raspberry Pi开始

使用C语言、Python开发的例程及其使用说明
E-Paper Arduino 2.jpg

从Arduino开始

基于Arduino UNO R3开发的例程及其使用说明
E-Paper NVDIA 2.jpg

从Jetson Nano开始

使用C语言、Python开发的例程及其使用说明
E-Paper X3Pi 1.jpg

从旭日X3派开始

使用Python开发的例程及其使用说明
E-Paper STM32 2.jpg

从STM32开始

使用STM32CubeMX开发的例程及其使用说明
E-Paper ESP32.jpg

从ESP32/8266开始

ESP32/8266的使用手册
E-Paper Resources 4.jpg

资料

文档、程序和数据手册等
E-Paper FAQ 4.jpg

FAQ

电子纸常见问题与解答
E-Paper Support 4.jpg

售后服务

技术支持