Arduino LiquidCrystal Character LCD Driver Library BUG Report #174181

by Conmajia


Effected Devices

Hitachi HD44780 series LCD drivers

SEIKO EPSON SED1278

SAMSUNG KS0066

NER Japan Radio NJU6408

Issue

LiquidCrystal.createChar function can only create custom characters ONCE. Further call of this function will not effect the CGRAM content. Thus dynamic custom character animation is unable to achieve.

Sample Code

// binary custom characters, contents are omitted
byte heart[8] = {...}  // a heart icon ♥
byte smiley[8] = {...} // a smiley icon ☺

// initialize an LCD, parameters are omitted
LiquidCrystal lcd(...);
lcd.begin(16, 2);
// create a new character
lcd.createChar(0, heart);
// print custom character #1
lcd.write(byte(0));
// create/modify another character
lcd.createChar(0, smiley);
// print modified character #1 (BUG)
lcd.write(byte(0));

Expected output is:

♥☺

Actual output is:

♥♥

Character #1 was not modified.

Possible Reason

[To be confirmed]

Timing issue suspected. The LiquidCrystal library does not considered the BUSY status of LCDs. It is not able to read anything from the LCD controllers but to write into them. Write operation was unstable with HD44780 series drivers by only some delays. Fig.1 shows the timing diagram of write operations.


Fig.1 Timing Diagram of Write Operation

Timing parameters in Table 1 should be carefully considered.

Table 1 Timing Parameters

Item Symbol Min Max Unit
Enable cycle $t_\mathrm{cycE}$ $1000$ $-$ $\mathrm{ns}$
Enable pulse width $P_\mathrm{weh}$ $450$ $-$ $\mathrm{ns}$
Enable rise, fall time $t_\mathrm{er}$, $T_\mathrm{ef} $-$ $25$ $\mathrm{ns}$
Address setup time $t_\mathrm{as}$ $140$ $-$ $\mathrm{ns}$
Address hold time $t_\mathrm{ah}$ $10$ $-$ $\mathrm{ns}$
Data setup time $t_\mathrm{dsw}$ $195$ $-$ $\mathrm{ns}$
Data hold time $t_\mathrm{h}$ $10$ $-$ $\mathrm{ns}$

Fix

  1. Manually fix the LiquidCrystal.h and LiquidCrystal.cpp source files. (N/A)
  2. Use an alternative driver library like lcdfx or so.

*I'll publish my lcdfx library later.

The End

Back to top

Arduino LiquidCrystal Library Bug Report #174181的更多相关文章

  1. 给MySQL官方提交的bug report备忘

    1.  Bug #72215 When LOCK_plugin conflicts very much, one uninstall-audit-plugin operation crash  htt ...

  2. 做一名开源社区的扫地僧——从Bug report到Google Summer of Code(GSoC):从200个bug到5000美金

    今年的软件自由日(SFD),我在广州Linux用户组的线下活动上做了一个分享,主题叫做<做一名开源社区的扫地僧(上)>.我把演讲的内容重新整理扩充, 写出了文字版, 希望可以跟更多朋友分享 ...

  3. Arduino PID Library

    Arduino PID Library by Brett Beauregard,contact: br3ttb@gmail.com What Is PID?   PID是什么 From  Wikipe ...

  4. Approach for Unsupervised Bug Report Summarization 无监督bug报告汇总方法

    AUSUM: approach for unsupervised bug report summarization 1. Abstract 解决的bug被归类以便未来参考 缺点是还是需要手动的去细读很 ...

  5. CVE-2014-0160 Heartbleed Vul Analysis && OpenSSL Cryptographic Software Library Bug

    目录 . Heartbleed漏洞简介 . 漏洞造成的风险和影响 . 漏洞的测试.POC . OpenSSL漏洞源代码分析 . 防御.修复方案 . 从漏洞中得到的攻防思考 1. Heartbleed漏 ...

  6. 使用Arduino Wire Library读取温湿度传感器AM2321

    AM2321是采用I2C总线或单总线通讯的国产温湿度传感器.在AM2321手册中,当采用I2C通讯时,手册指定了多处需要主机等待的时间间隔,包括: (1)唤醒传感器时,从机不回复ACK,但主机主要等待 ...

  7. Arduino LiquidCrystal库函数中文对照

    我之所以会试试看LCD+Shield,一是因为我本来就有这块板,但一直不会用,第二个原因则是Arduino+Cookbook这本书.O’Reilly的这本手册对你在Arduino实践中的各种问题(几乎 ...

  8. 第三周作业3——Bug Report

    作业要求来自:https://edu.cnblogs.com/campus/nenu/SWE2017FALL/homework/957 要求1: 准备工作:利用老师提供的git 命令,批量pull所有 ...

  9. bug report

    ubuntu 11.10添加eth0:1后重启网卡不显示 eth0:1 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=324306

随机推荐

  1. iOS 推送全解析,你不可不知的所有 Tips!

    本文旨在对 iOS 推送进行一个完整的剖析,如果你之前对推送一无所知,那么在你认真地阅读了全文后必将变成一个推送老手,你将会对其中的各种细节和原理有充分的理解.以下是 pikacode 使用 iOS ...

  2. 使用GDI绘制文本

    /// <summary>        /// 定义一个绘制文本        /// </summary>        public void Texts()       ...

  3. Vue学习之路---No.1(分享心得,欢迎批评指正)

    首先为了打消大家对Vue.js存在的顾虑,先通过大家所熟知的JQ作为对比. 都知道JQ的语法相对简单.清楚.使用方便.功能齐全: 那么Vue.js呢,同样的,Vue.js与JQ在很多地方都是相同之处, ...

  4. 事件日志:无法加载站点/服务的所有 ISAPI 筛选器。因此启动中止。

    事件日志:无法加载站点/服务的所有 ISAPI 筛选器.因此启动中止. Service Unavailable解决 故障状态:Internet 信息服务(IIS)管理器 里 应用程序池出现错误 “应用 ...

  5. 经典网络还是VPC,开发者作何选择?

    近两天,关于公有云经典网络(基础网络)与私有网络(VPC)的讨论引发技术圈极大关注,事件起因于有开发者将数据库限制在内网访问,但由于安全组设置的原因,阿里云邻居用户被黑后,牵连到了自己的业务.为此,开 ...

  6. ceph-deploy install时,远端节点在执行apt-get update命令时失败

    环境 OS:Ubuntu 16.04 背景 使用ceph-deploy部署Ceph集群,调用ceph-deploy install命令在远端节点安装ceph环境,执行apt-get update命令时 ...

  7. 走进 Redis 的世界

    NoSQL(Not Only SQL) 在现今已经应用非常普遍了,尤其是 Redis 和 MongoDB.我们现在来说说 Redis. 前世 Redis 是一个意大利人 Salvatore Sanfi ...

  8. 基于requirejs+bluebird,50行代码实现轻巧实用的前端CMD加载器

    首先是github地址,可以用git克隆命令也可以直接在git页面下载 https://github.com/kazetotori/js-requireAsync 下载下来后目录结构是这样的 -pac ...

  9. HTML <form> 标签的 method 属性(20161028)

    HTML <form> 标签的 method 属性 HTML <form> 标签 实例 在下面的例子中,表单数据将通过 method 属性附加到 URL 上: <form ...

  10. 消息队列-ActiveMQ

    1 业务需求描述 举例描述: 再警情通报的业务时通过发送消息界面可以选择 警情联络,和船情通报两种消息 发送方式可分为 一对一发送:部门对部门.个人对个人 一对多发送:部门对多部门.个人对多人 2 功 ...