LCD显示屏和数据线
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不久前回答了另一个用户的问题(此处 )引用了以下文档:www.cloverlcd.com/pdf/S6A0069.pdf 。 您可以从该链接了解它如何工作(至少对于该示例)。
许多这些嵌入式设备通常采用两周期方法将数据传送到芯片。 我见过一个例子,您连续输出两个 f-nybbles 进行同步(因为 ff 是无效的 7 位),然后开始输出 nybbles 的过程。 只要除了同步之外没有办法生成两个连续的f-nybbles,就很容易实现。
通常还有从总线连接到设备的其他线路,允许设备检测新的数据写入。 这意味着它将检测两个相同的写入作为不同的值。 换句话说,它使用其他信号来控制数据的接收。 大多数较简单的设备也有严格的时序要求(例如,每次写入后必须延迟至少 N 微秒)。
此外,您倾向于发送的是命令,而不仅仅是 ASCII 代码。 在 LCD 上偏移 3 处显示 Hello 的 nybble 输出可能是:
由于只有数据线 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:
Since only data lines d3 through d0 are attached to the device, ther upper nybble is irrelevant.
通常,器件以 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