in reply to Re: i2c attached LCD Character Display for a Raspberry Pi
in thread i2c attached LCD Character Display for a Raspberry Pi
I wasn't aware that the SparkFun module provided more than just serial to parallel conversion.
The SainSmart backpack is a simple (and cheap) device. I just looked, their 2 x 16 LCD with i2c backpack is under $10 US. There are other similar backpacks out there that you can wire up yourself to an LCD display which are now really cheap. The disadvantage is that the information on using them is poor.
While trying to get mine working I read numerous posts from people who could not get theirs to work. In the end I went back to basics, and worked out how the backpacks work and how the LCD 4-bit mode works, and then avoided the high level libraries. Simple i2c communication using the HiPi::BCM2835::I2C was all that was needed. The module is described as: The HiPi::BCM2835::I2C module provides direct access to the Broadcom I2C Serial peripheral.
After that it came down to understanding the commands and the way the parallel side of the i2c backpack was connected to the LCD.
I will write up some more detailed notes on the 8-bit/4-bit issue and initialization and post it later
I have a Perl script that collects data from an spi bus-attached ADC that monitors some voltages. I should tidy up the script and post that as well
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: i2c attached LCD Character Display for a Raspberry Pi
by jmlynesjr (Deacon) on May 26, 2016 at 16:54 UTC | |
I went back and looked at my chipKIT code. Turns out my Sparkfun LCD is a SPI interface. My SF 4 digit LED display uses I2C. In either case neither required any bit twiddling. Their backpack has an on-board PIC that abstracts out the HD44780 handling. Ease of use and no soldering comes at a higher price(double) than you have with the SainSmart product. Update:I read through the HiPi docs last night. Good stuff! The developer, Mark Dootson, has done much work on wxPerl and I believe that wxPerl will run on the RPI, if you need to do any GUI work. For Example:
James There's never enough time to do it right, but always enough time to do it over... | [reply] [Watch: Dir/Any] [d/l] |
by Anonymous Monk on Feb 25, 2017 at 16:58 UTC | |
This code uses the HiPi module which seemed to me to require I load the whole GUI (I am using minibian) so I converted a Python demo program to Perl as an illustration of how to use the SMBus module to write to an I2C LCD (16x2). Here is the code:
| [reply] [Watch: Dir/Any] [d/l] |