From 140edd4e048ddaa7c0f391853643d3b43c23911e Mon Sep 17 00:00:00 2001 From: "rick.chan" Date: Wed, 16 Sep 2020 15:58:06 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85=E5=86=85=E5=AE=B9:=20?= =?UTF-8?q?=E8=A1=A5=E5=85=85=E5=AF=B9=20Sync=20Offset=20=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E7=9A=84=E8=A7=A3=E9=87=8A;=20=E8=A1=A5=E5=85=85=20DP?= =?UTF-8?q?I=20=E7=9A=84=E8=AE=A1=E7=AE=97=E6=96=B9=E6=B3=95.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: rick.chan --- .../Peripherals/Display/Display_Parameters.md | 42 ++++++++++++------ .../Display/img/Display_Parameters/002.png | Bin 0 -> 8735 bytes 2 files changed, 29 insertions(+), 13 deletions(-) create mode 100644 Hardware/Peripherals/Display/img/Display_Parameters/002.png diff --git a/Hardware/Peripherals/Display/Display_Parameters.md b/Hardware/Peripherals/Display/Display_Parameters.md index 8734353..a16cf29 100644 --- a/Hardware/Peripherals/Display/Display_Parameters.md +++ b/Hardware/Peripherals/Display/Display_Parameters.md @@ -41,34 +41,38 @@ pixclock = 1e12/dotclock ## 2.术语解析 -* left margin:行切换,从同步到绘图之间的延迟,表示从水平同步信号开始到一行的有效数据开始之间的 VCLK 的个数,等同于 HBP(horizontal back porch); -* right margin:行切换,从绘图到同步之间的延迟,表示一行的有效数据结束到下一个水平同步信号开始之间的 VCLK 的个数,等同于 HFP(horizontal front porth); -* upper margin:帧切换,从同步到绘图之间的延迟,表示在一帧图像开始时,垂直同步信号以后的无效的行数,等同于 VBP(vertical back porch); -* lower margin:帧切换,从绘图到同步之间的延迟,表示在一帧图像结束后,垂直同步信号以前的无效的行数,等同于 VFB(vertical front porch); -* hsync len:水平同步的长度,表示水平同步信号的宽度,用 VCLK 计算,等同于 HSPW(horizontal sync pulse width); -* vsync len:垂直同步的长度,表示垂直同步脉冲的宽度,用行数计算,等同于 VSPW(vertical sync pulse width)。 +* Left Margin:行切换,从同步到绘图之间的延迟,表示从水平同步信号开始到一行的有效数据开始之间的 VCLK 的个数,等同于 HBP(Horizontal Back Porch); +* Right Margin:行切换,从绘图到同步之间的延迟,表示一行的有效数据结束到下一个水平同步信号开始之间的 VCLK 的个数,等同于 HFP(Horizontal Front Porch, Horizontal Sync Offset); +* Upper Margin:帧切换,从同步到绘图之间的延迟,表示在一帧图像开始时,垂直同步信号以后的无效的行数,等同于 VBP(Vertical Back Porch); +* Lower Margin:帧切换,从绘图到同步之间的延迟,表示在一帧图像结束后,垂直同步信号以前的无效的行数,等同于 VFB(Vertical Front Porch, Vertical Sync Offset); +* HSYNC Len:水平同步的长度,表示水平同步信号的宽度,用 VCLK 计算,等同于 HSPW(Horizontal Sync Pulse Width, Horizontal Sync Pulse, XPULSE); +* VSYNC Len:垂直同步的长度,表示垂直同步脉冲的宽度,用行数计算,等同于 VSPW(Vertical Sync Pulse Width, Vertical Sync Pulse, YPULSE); +* HSYNC POL:水平脉冲极性; +* VSYNC POL:垂直脉冲极性。 -可以用以下两张图来表示: +可以用以下三张图来表示: ![TFT 屏工作时序](./img/Display_Parameters/001.png) +![Active Front Sync Back](./img/Display_Parameters/002.png) + ```blk +----------+---------------------------------------------+----------+-------+ | | ↑ | | | -| | |upper_margin | | | +| | |Upper Margin | | | | | ↓ | | | +----------###############################################----------+-------+ | # ↑ # | | | # | # | | | # | # | | | # | # | | -| left # | # right | hsync | -| margin # | xres # margin | len | +| Left # | # Right | HSYNC | +| Margin # | X-Res # Margin | Len | |<-------->#<---------------+--------------------------->#<-------->|<----->| | # | # | | | # | # | | | # | # | | -| # |yres # | | +| # |Y-Res # | | | # | # | | | # | # | | | # | # | | @@ -80,11 +84,11 @@ pixclock = 1e12/dotclock | # ↓ # | | +----------###############################################----------+-------+ | | ↑ | | | -| | |lower_margin | | | +| | |Lower Margin | | | | | ↓ | | | +----------+---------------------------------------------+----------+-------+ | | ↑ | | | -| | |vsync_len | | | +| | |VSYNC Len | | | | | ↓ | | | +----------+---------------------------------------------+----------+-------+ ``` @@ -107,3 +111,15 @@ LCD提供的外部接口信号: * LCD_LPCOE:SEC TFT OE 信号; * LCD_LPCREV:SEC TFT REV 信号; * LCD_LPCREVB:SEC TFT REVB 信号。 + +## 3.DPI 的计算 + +```bash +sqrt(水平分分辨率^2+垂直分辨率^2)/屏幕尺寸 +``` + +例如,5 英寸,分辨率为 1920x1080 的屏幕,其 DPI 为: + +```bash +DPI=sqrt(1920^2+1080^2)/5 +``` diff --git a/Hardware/Peripherals/Display/img/Display_Parameters/002.png b/Hardware/Peripherals/Display/img/Display_Parameters/002.png new file mode 100644 index 0000000000000000000000000000000000000000..03659196d8b223b9d76b898f2425c640c3e8ce86 GIT binary patch literal 8735 zcmd6NXE>bg+U}^M_Yxs7Ly*yX4Pms=8C?b;MDHznCkTdUQG*eNh-itZAwl%$y+?^& zqqE2RuJx|Br8iXEFtv?`yn*;A=yI? zH@%lY#^(pqNlH?h134YW;0a#dF0~fnNkNdZ_x9=s2dH5gh1x#e+_#S$D z9i9bO_q;c&xDhw5vg)#|-MVbC>Plvd8>2!cv#HV5vccHY(zxxbk@Z1Wem|##Zc+W^ zTqxJSal}r9@LTxQ|Aea{RnxeQN76v4+{RTUPPRyU(M0nm`v=9#&J$VGGWi)Zb8nWH zpBL`i7ciwe?#iATQNXS%h+Sv>r{@KT;`jPy_3g7Nne}8;!ZR+tcS9|<2+aX`nNJqz? zt*yo;Fc;Tm{&+uLi?`FprJ&0$nP}r9)a87~(#*`x_B2j!eN$!VqR{ZLoHN5v$5vKZ znY4dY=tzG*Py5UaV*5h@^em4Fn8_0=CAMn^S-+dKq13#jt8 zo_BJ-r&``xj|o^^r5o)(wH-Igdc{|#3MHz?p|7{B9x!)VF)o|^$_1S~l zMBKH^OWIrVNP!razR^nky9F`%9ptxT{hId3kBm$}N;y^HTwq+BM;Nxn102?`+{K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