LCD显示屏和数据线

发布于 2024-07-10 11:50:03 字数 63 浏览 7 评论 0原文

LCD 有 4 条数据线。 但 LCD 上显示的数据是以 ASCII 形式给出的,即 7 位。 这怎么可能?

LCDs have 4 data lines. But the data to be displayed in the LCD is given in the ASCII form which is 7 bits. How is that possible?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

渔村楼浪 2024-07-17 11:50:03

我不久前回答了另一个用户的问题(此处 )引用了以下文档:www.cloverlcd.com/pdf/S6A0069.pdf 。 您可以从该链接了解它如何工作(至少对于该示例)。

许多这些嵌入式设备通常采用两周期方法将数据传送到芯片。 我见过一个例子,您连续输出两个 f-nybbles 进行同步(因为 ff 是无效的 7 位),然后开始输出 nybbles 的过程。 只要除了同步之外没有办法生成两个连续的f-nybbles,就很容易实现。

通常还有从总线连接到设备的其他线路,允许设备检测新的数据写入。 这意味着它将检测两个相同的写入作为不同的值。 换句话说,它使用其他信号来控制数据的接收。 大多数较简单的设备也有严格的时序要求(例如,每次写入后必须延迟至少 N 微秒)。

此外,您倾向于发送的是命令,而不仅仅是 ASCII 代码。 在 LCD 上偏移 3 处显示 Hello 的 nybble 输出可能是:

f f           ; sync
0             ; clear display (cmd = 0).
1 0 3         ; set cursor (cmd = 1) to offset 3.
2 H e l l o 0 ; output text (cmd = 2) teminated by NULL.

由于只有数据线 d3 到 d0 连接到设备,因此上面的 nybble 是不相关的。

I answered a question from another user a while ago (here) that referenced the following doc: www.cloverlcd.com/pdf/S6A0069.pdf. You can get an idea as to how it may work from that link (at least for that example).

Many of these embedded devices typically have a two-cycle approach to delivering data to the chips. I've seen one example where you output two f-nybbles in a row to synchronize (since ff is invalid 7-bit) then you start the process of outputting the nybbles. As long as there's no way to generate two consecutive f-nybbles except for synchronization, it's easy to achieve.

There's also typically other lines attached to the device from the bus that allow the device to detect a new write of data. This means it will detect two identical writes as different values. In other words, it uses other signals to control the receipt of the data. Most of the simpler devices also have strict timing requirements (e.g., you must delay at least N microseconds after each write).

In addition, what you tend to send are commands, not just the ASCII codes. The nybble output for display Hello at offset 3 on an LCD may be:

f f           ; sync
0             ; clear display (cmd = 0).
1 0 3         ; set cursor (cmd = 1) to offset 3.
2 H e l l o 0 ; output text (cmd = 2) teminated by NULL.

Since only data lines d3 through d0 are attached to the device, ther upper nybble is irrelevant.

笑咖 2024-07-17 11:50:03

通常,器件以 8 位模式加电,但将其置于 4 位模式所需的命令会忽略 4 个 LSB。

在 4 位模式下,每个字符需要两个 xfer。

请参阅此说明

Typically the device powers up in 8-bit mode, but the commands required to put it in 4-bit mode ignore the 4 LSBs.

In 4-bit mode two xfers are required per character.

See this description

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文