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. Firefox52非HTTPS页面登录页面提示连接不安全的解决办法

    背景: Firefox52版本开始,对于非HTTPS协议的登录页面,会提示链接不安全,如下图 解决办法很简单,上HTTPS协议(严重推荐,尤其是祖国这种特殊国情下,上HTTPS的协议好处多多,物超所值 ...

  2. Python中闭包、装饰器的概念

    1.闭包(Closure)的概念: 内部函数中对enclosing作用域的变量进行引用 1 passline = 60 2 def func(val): 3 print('%x' % id(val)) ...

  3. 【微信公众平台SDK(链式调用)】经过半个月的迭代,今天抽空写了个Demo

    这个项目是在实际开发中逐渐完善的,开发过程基于ASP.Net Core 1.1,实际生成会兼容Net4.5. 写有完善的代码提示,怎么用就不多做解释了,引用好实例中的命名空间基本上就可以通过智能提示了 ...

  4. 更加 "深入" 理解多态

    1.1 public abstract class Birds{ //什么样的方法是抽象方法 public abstract void Fly(); } public class YZ:Birds{ ...

  5. 解决error104 connection reset by peer;socket error问题

    这个问题原因有两个: 1.因为你访问网站太多次,所以被网站管理员给禁止访问了. 解决方法: 1.延长time.sleep时间 2.设置代理 2.根本没有这个网站.(打开链接检查一下!!!)

  6. JsonCpp(C++程序使用)

    C++ json解析库 github C++: Makefile目录cmd:make 得到build 得到.a静态库 Eclipse引入头文件  (include目录) 引入.a静态库 编译设置: O ...

  7. FDG内存分配器笔记

    FDG: 大规模并行系统中的动态内存分配器由于需要全局同步(记账) ,导致性能急剧下降. 代码解析 1.superblock 类中包含两个变量,两个函数.默认superblock大小为2048 ite ...

  8. (转)经验分享:CSS浮动(float,clear)通俗讲解

    很早以前就接触过CSS,但对于浮动始终非常迷惑,可能是自身理解能力差,也可能是没能遇到一篇通俗的教程. 前些天小菜终于搞懂了浮动的基本原理,迫不及待的分享给大家. 写在前面的话: 由于CSS内容比较多 ...

  9. PRINCE2的国际形势?光环国际项目管理培训

    PRINCE2的使用和应用非常广泛.在过去的12个月里,超过60,000人参加了PRINCE2基础资格(Foundation)或从业资格(Practitioner)考试.现在每周参加考试的人数超过了2 ...

  10. PRINCE2认证

    PRINCE是PRoject IN Controlled Environment(受控环境下的项目管理)的简称. PRINCE2描述了如何以一种逻辑性的.有组织的方法,按照明确的步骤对项目进行管理.它 ...