Arduino-LiquidCrystal-I2C-library | LiquidCrystal LCD display connected to an Arduino
kandi X-RAY | Arduino-LiquidCrystal-I2C-library Summary
kandi X-RAY | Arduino-LiquidCrystal-I2C-library Summary
Library for the LiquidCrystal LCD display connected to an Arduino board.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Arduino-LiquidCrystal-I2C-library
Arduino-LiquidCrystal-I2C-library Key Features
Arduino-LiquidCrystal-I2C-library Examples and Code Snippets
Community Discussions
Trending Discussions on Arduino-LiquidCrystal-I2C-library
QUESTION
I am new to electronics and has completed a tutorial on how to operate a 16x2 Character LCD via I2C in Arduino using liquidCrystal_I2C. Everything works fine but I have a question about the low level interaction between the I2C and the LCD. Looking at the library's source code, I notice that when writing a 4 bits nibble (LiquidCrystal_I2C::write4bits
), the code writes the nibble to the I2C expander first
(LiquidCrystal_I2C::expanderWrite
), and then writes again when pulsing the Enable bit. Why is the first expanderWrite
necessary? Why can't write4bits just call pulseEnable
(with the blacklight bit set)?
I am sure there is a reason as I checked other library like RPLCD and see a similar pattern. Can anyone enlighten me? Thank you.
...ANSWER
Answered 2017-Jul-01 at 01:13From the datasheet I found the LCD requires specific timing in the communication protocol.
On the rising edge of the enable line the Register Select and Read/Write lines must have already settled for tsu1 (100ns). On the falling edge of the enable line the data must have already settled for tsu2 (60ns). By writing _data
they are also writing the RS and R/W lines as they are the lower nibble of _data
.
This article covers the topic very thoroughly.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Arduino-LiquidCrystal-I2C-library
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page