jz2440_LCD硬件分析

2024-01-24 01:30
文章标签 分析 硬件 lcd jz2440

本文主要是介绍jz2440_LCD硬件分析,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

LCD硬件分析

  • 1. jz2440v3 LCD 插座原理图
  • 2. A043-24-TT-11 液晶屏
    • 2.1 引脚功能
      • 2.2.1 TFT LCD Panel Driving Section
      • 2.1.2 Touch Screen Panel Section
  • 3. s3c2440 LCD控制器
    • 3.1 概述
    • 3.2 FEATURES(特性)
      • 3.2.1 特殊特性
      • 3.2.2 COMMON FEATURES(通用特性)
    • 3.3 **BLOCK DIAGRAM**
    • 3.4 TFT LCD CONTROLLER OPERATION
      • 3.5 VIDEO OPERATION
      • 3.6 VIRTUAL DISPLAY (TFT/STN)

1. jz2440v3 LCD 插座原理图

在这里插入图片描述
从原理图看到,我们的 LCD 插座只接了 16 根数据线(其中红色 R1 ~ R5,绿色 G0 ~ G5,蓝色 B1~ B5)。也就是说我们使用的是 S3C2440A 芯片的 LCD 控制器中的 16bpp 的显示方式。并无法完全发挥 TFT LCD 屏幕的最高色域 32 位真彩色的能力。

2. A043-24-TT-11 液晶屏

2.1 引脚功能

2.2.1 TFT LCD Panel Driving Section

显示部分的引脚功能如下:

在这里插入图片描述
在这里插入图片描述

2.1.2 Touch Screen Panel Section

触摸屏的功能如下:

在这里插入图片描述

3. s3c2440 LCD控制器

3.1 概述

The LCD controller in the S3C2440A consists of the logic for transferring LCD image data from a video buffer located in system memory to an external LCD driver.

The LCD controller supports monochrome(黑白色), 2-bit per pixel (4-level gray scale) or 4-bit per pixel (16-level gray scale) mode on a monochrome LCD, using a time-based dithering algorithm(基于时间的混色算法) and Frame Rate Control (FRC) method

and it can be interfaced with a color LCD panel at 8-bit per pixel (256-level color) and 12-bit per pixel (4096-level color) for interfacing with STN LCD. It can support 1-bit per pixel, 2-bit per pixel, 4-bit per pixel, and 8-bit per pixel for interfacing with the palletized TFT color LCD panel, and 16-bit per pixel and 24-bit per pixel for non-palletized true-color display.

LCD controller 支持 monochrome 和 color 两种色彩显示方式。

  • monochrome(黑白显示):支持2比特表示的4度灰,4比特表示的16度灰。

  • color(彩色显示):对于 STN LCD 支持8比特的256种色彩,12比特表示的4096种色彩;对于 TFT LCD 支持1比特、2比特、4比特、8比特每像素点的调色板显示和16比特、24比特的真彩色显示。

    palletized color 意思是通过调用调色板得到的实际颜色,实际上就是查找颜色表。一般是为了减少表示颜色的数据量。

    比如:RGB 三色表,每种颜色用 8bits 表示,可表示成 256色/灰度(2的8次方)。

    如果每个显示点数据用3字节表示,就没必要去查找调色板,直接用原始数据表示即可,这就是为什么上面会说:24-bit per pixel non-palletized true-color displays !

The LCD controller can be programmed to support different requirements on the screen related to the number of horizontal and vertical pixels, data line width for the data interface, interface timing, and refresh rate.

3.2 FEATURES(特性)

由于我们屏幕使用的是 TFT 屏幕,因此我们下面只关注 TFT 部分。

3.2.1 特殊特性

STN LCD Displays:

— Supports 3 types of LCD panels: 4-bit dual scan, 4-bit single scan, and 8-bit single scan display type

— Supports the monochrome, 4 gray levels, and 16 gray levels

— Supports 256 colors and 4096 colors for color STN LCD panel

— Supports multiple screen size

Typical actual screen size: 640 x 480, 320 x 240, 160 x 160, and others

Maximum virtual screen size is 4Mbytes.

Maximum virtual screen size in 256 color mode: 4096 x 1024, 2048 x 2048, 1024 x 4096, and others

TFT LCD Displays:

  • Supports 1, 2, 4 or 8-bpp (bit per pixel) palletized color displays for TFT

  • Supports 16, 24-bpp non-palletized true-color displays for color TFT

  • Supports maximum 16M color TFT at 24bit per pixel mode

  • Supports multiple screen size

    • Typical actual screen size: 640 x 480, 320 x 240, 160 x 160, and others

    • Maximum virtual screen size is 4Mbytes.

    • Maximum virtual screen size in 64K color mode: 2048 x 1024 and others

3.2.2 COMMON FEATURES(通用特性)

The LCD controller has a dedicated DMA that supports to fetch the image data from video buffer(专用的DMA) located in system memory. Its features also include:

  • Dedicated interrupt functions (INT_FrSyn and INT_FiCnt) (专用的外部中断)

  • The system memory is used as the display memory. (使用系统内存作为显存)

  • Supports Multiple Virtual Display Screen (Supports Hardware Horizontal/Vertical Scrolling) (多种显示方式)

  • Programmable timing control for different display panels (可编程的时间控制 用于不同的液晶面板)

  • Supports little and big-endian byte ordering, as well as WinCE data formats

  • Supports 2-type SEC TFT LCD panel

    • (SAMSUNG 3.5” Portrait / 256K Color /Reflective and Transflective a-Si TFT LCD)

    • LTS350Q1-PD1: TFT LCD panel with touch panel and front light unit (Reflective type)

    • LTS350Q1-PD2: TFT LCD panel only

    • LTS350Q1-PE1: TFT LCD panel with touch panel and front light unit (Transflective type)

    • LTS350Q1-PE2: TFT LCD panel only

NOTE

WinCE doesn’t support the 12-bit packed data format. Please check if WinCE can support the 12-bit color-mode.

3.3 BLOCK DIAGRAM

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-5LHBer0U-1659181304267)(images\LCD硬件分析\LCD Controller Block Diagram.png)]

The S3C2440A LCD controller is used to transfer the video data and to generate the necessary control signals, such as VFRAME, VLINE, VCLK, VM, and so on. In addition to the control signals, the S3C2440A has the data ports for video data, which are VD[23:0] as shown in Figure 15-1.

The LCD controller consists of a REGBANK, LCDCDMA, VIDPRCS, TIMEGEN, and LPC3600 (See the Figure 15-1 LCD Controller Block Diagram).

  • The REGBANK has 17 programmable register sets and 256x16 palette memory which are used to configure the LCD controller. (REGBANK 中有17个可编程的寄存器集合和256x16的调色内存
  • The LCDCDMA is a dedicated DMA, which can transfer the video data in frame memory to LCD driver automatically. By using this special DMA, the video data can be displayed on the screen without CPU intervention. (LCDCDMA 是专用于LCD使用的DMA
  • The VIDPRCS receives the video data from the LCDCDMA and sends the video data through the VD[23:0] data ports to the LCD driver after changing them into a suitable data format, for example 4/8-bit single scan or 4-bit dual scan display mode. (VIDPRCS 通过数据总线 VD[23:0] 将 LCDCDMA 的数据发送给 LCD 液晶屏
  • The TIMEGEN consists of programmable logic to support the variable requirements of interface timing and rates commonly found in different LCD drivers. The TIMEGEN block generates VFRAME, VLINE, VCLK, VM, and so on. (TIMEGEN 用于时序的控制

The description of data flow is as follows: FIFO memory is present in the LCDCDMA. When FIFO is empty or partially empty, the LCDCDMA requests data fetching from the frame memory based on the burst memory transfer mode (consecutive memory fetching of 4 words (16 bytes) per one burst request without allowing the bus mastership to another bus master during the bus transfer). When the transfer request is accepted by bus arbitrator in the memory controller, there will be four successive word data transfers from system memory to internal FIFO. The total size of FIFO is 28 words, which consists of 12 words FIFOL and 16 words FIFOH, respectively. The S3C2440A has two FIFOs to support the dual scan display mode. In case of single scan mode, one of the FIFOs (FIFOH) can only be used.

3.4 TFT LCD CONTROLLER OPERATION

The TIMEGEN generates the control signals for LCD driver, such as VSYNC, HSYNC, VCLK, VDEN, and LEND signal. These control signals are highly related with the configurations on the LCDCON1/2/3/4/5 registers in the REGBANK. Base on these programmable configurations on the LCD control registers in the REGBANK, the TIMEGEN can generate the programmable control signals suitable for the support of many different types of LCD drivers.

TIMEGEN 寄存器产生控制信号,例如:VSYNC、HSYNC、VCLK、VDEN 和 LEND 信号;这些控制信号通过配置 REGBANK 中的 LCDCON1/2/3/4/5 控制寄存器来产生。

The VSYNC signal is asserted to cause the LCD’s line pointer to start over at the top of the display.

VSYNC 信号使得 LCD’s line pointer 跳转显示开头。

The VSYNC and HSYNC pulse generation depends on the configurations of both the HOZVAL field and the LINEVAL field in the LCDCON2/3 registers. The HOZVAL and LINEVAL can be determined by the size of the LCD panel according to the following equations:

— $HOZVAL = (Horizontal display size) -1 $

— $LINEVAL = (Vertical display size) -1 $

VSYNC 和 HSYNC 信号的产生依赖于 HOZVAL 和 LINEVAL。由寄存器 LCDCON2/3 来配置 HOZVAL 和 LINEVAL。

The rate of VCLK signal depends on the CLKVAL field in the LCDCON1 register. Table 15-3 defines the relationship of VCLK and CLKVAL. The minimum value of CLKVAL is 0.

VCLK 信号的产生依赖于 CLKVAL 。由寄存器 LCDCON1 来配置 CLKVAL 的值。

$VCLK(Hz) = HCLK/[(CLKVAL+1)x2] $

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-k0g9LZya-1659181304268)(images\LCD硬件分析\Relation between VCLK and CLKVAL.png)]

The frame rate is VSYNC signal frequency. The frame rate is related with the field of VSYNC, VBPD, VFPD, LINEVAL, HSYNC, HBPD, HFPD, HOZVAL, and CLKVAL in LCDCON1 and LCDCON2/3/4 registers. Most LCD drivers need their own adequate frame rate. The frame rate is calculated as follows:

帧同步信号 VSYNC 由 VSYNC、VBPD、VFPD、LINEVAL、HSYNC、HBPD、HFPD、HOZVAL、CLKVAL 这些信号共同决定,具体公式如下:

Frame Rate = 1/ [ { (VSPW+1) + (VBPD+1) + (LIINEVAL + 1) + (VFPD+1) } x {(HSPW+1) + (HBPD +1) + (HFPD+1) + (HOZVAL + 1) } x { 2 x ( CLKVAL+1 ) / ( HCLK ) } ]

3.5 VIDEO OPERATION

The TFT LCD controller within the S3C2440A supports 1, 2, 4 or 8 bpp (bit per pixel) palettized color displays and 16 or 24 bpp non-palettized true-color displays.

S3C2440A 支持 1、2、4 或 8 bpp 的调色显示方式 或者是 16或24 bpp 的真彩显示方式。

由于我们的 jz2440 使用的是 16 bpp 的真彩色,因此我们只看 16bpp 的真彩色。

在这里插入图片描述
16bpp 显示一个单元为 16 比特。内存中每个字(32比特)存放两个像素的信息。通过设置 HWSWP 的值,可以设置像素按照 “大端” 还是“小端”的方式进行存储。

16BPP 可以设置为 (5:5:5:1)的存放,即 RGB 每个色彩占 16字节中的 5 位,余下 1 位空闲不用。或者是(5:6:5)的存储方式,红、绿、蓝分别占5、6、6个比特。

3.6 VIRTUAL DISPLAY (TFT/STN)

虚拟显示

The S3C2440A supports hardware horizontal or vertical scrolling. If the screen is scrolled, the fields of LCDBASEU and LCDBASEL in LCDSADDR1/2 registers need to be changed (see Figure 15-8), except the values of PAGEWIDTH and OFFSIZE.

S3C2440A 支持硬件水平或者竖直滚动操作。由寄存器 LCDSADDR1/2 中的 LCDBASEU 和 LCDBASEL 来配置。

在这里插入图片描述
The video buffer in which the image is stored should be larger than the LCD panel screen in size.

由上面这句话,大概可以猜测出来,如果我们想要显示一张大于屏幕分辨率的图片。那么我们就可以分配一个远大于 LCD 显示所需要的显存空间,在 LCD 只显示出图片的一部分,然后通过滑动的方式实现显示的变化。

这篇关于jz2440_LCD硬件分析的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/638142

相关文章

Android 缓存日志Logcat导出与分析最佳实践

《Android缓存日志Logcat导出与分析最佳实践》本文全面介绍AndroidLogcat缓存日志的导出与分析方法,涵盖按进程、缓冲区类型及日志级别过滤,自动化工具使用,常见问题解决方案和最佳实... 目录android 缓存日志(Logcat)导出与分析全攻略为什么要导出缓存日志?按需过滤导出1. 按

Linux中的HTTPS协议原理分析

《Linux中的HTTPS协议原理分析》文章解释了HTTPS的必要性:HTTP明文传输易被篡改和劫持,HTTPS通过非对称加密协商对称密钥、CA证书认证和混合加密机制,有效防范中间人攻击,保障通信安全... 目录一、什么是加密和解密?二、为什么需要加密?三、常见的加密方式3.1 对称加密3.2非对称加密四、

MySQL中读写分离方案对比分析与选型建议

《MySQL中读写分离方案对比分析与选型建议》MySQL读写分离是提升数据库可用性和性能的常见手段,本文将围绕现实生产环境中常见的几种读写分离模式进行系统对比,希望对大家有所帮助... 目录一、问题背景介绍二、多种解决方案对比2.1 原生mysql主从复制2.2 Proxy层中间件:ProxySQL2.3

python使用Akshare与Streamlit实现股票估值分析教程(图文代码)

《python使用Akshare与Streamlit实现股票估值分析教程(图文代码)》入职测试中的一道题,要求:从Akshare下载某一个股票近十年的财务报表包括,资产负债表,利润表,现金流量表,保存... 目录一、前言二、核心知识点梳理1、Akshare数据获取2、Pandas数据处理3、Matplotl

python panda库从基础到高级操作分析

《pythonpanda库从基础到高级操作分析》本文介绍了Pandas库的核心功能,包括处理结构化数据的Series和DataFrame数据结构,数据读取、清洗、分组聚合、合并、时间序列分析及大数据... 目录1. Pandas 概述2. 基本操作:数据读取与查看3. 索引操作:精准定位数据4. Group

MySQL中EXISTS与IN用法使用与对比分析

《MySQL中EXISTS与IN用法使用与对比分析》在MySQL中,EXISTS和IN都用于子查询中根据另一个查询的结果来过滤主查询的记录,本文将基于工作原理、效率和应用场景进行全面对比... 目录一、基本用法详解1. IN 运算符2. EXISTS 运算符二、EXISTS 与 IN 的选择策略三、性能对比

MySQL 内存使用率常用分析语句

《MySQL内存使用率常用分析语句》用户整理了MySQL内存占用过高的分析方法,涵盖操作系统层确认及数据库层bufferpool、内存模块差值、线程状态、performance_schema性能数据... 目录一、 OS层二、 DB层1. 全局情况2. 内存占js用详情最近连续遇到mysql内存占用过高导致

深度解析Nginx日志分析与499状态码问题解决

《深度解析Nginx日志分析与499状态码问题解决》在Web服务器运维和性能优化过程中,Nginx日志是排查问题的重要依据,本文将围绕Nginx日志分析、499状态码的成因、排查方法及解决方案展开讨论... 目录前言1. Nginx日志基础1.1 Nginx日志存放位置1.2 Nginx日志格式2. 499

Olingo分析和实践之EDM 辅助序列化器详解(最佳实践)

《Olingo分析和实践之EDM辅助序列化器详解(最佳实践)》EDM辅助序列化器是ApacheOlingoOData框架中无需完整EDM模型的智能序列化工具,通过运行时类型推断实现灵活数据转换,适用... 目录概念与定义什么是 EDM 辅助序列化器?核心概念设计目标核心特点1. EDM 信息可选2. 智能类

Olingo分析和实践之OData框架核心组件初始化(关键步骤)

《Olingo分析和实践之OData框架核心组件初始化(关键步骤)》ODataSpringBootService通过初始化OData实例和服务元数据,构建框架核心能力与数据模型结构,实现序列化、URI... 目录概述第一步:OData实例创建1.1 OData.newInstance() 详细分析1.1.1