Comments: AVR-Based Serial Enabled LCDs Hookup Guide
Looking for answers to technical questions?
We welcome your comments and suggestions below. However, if you are looking for solutions to technical questions please see our Technical Assistance page.
If you've found an issue with this tutorial content, please send us your feedback!
I encourage all users to look at page 17 of the HD44780 datasheet as there are some interesting characters in its repetoire that are beyond normal ASCII. For instance, there's a nice degree symbol. As a demo of how to use it, here's a line from my testing that works (it displays normal human body temperature, with a degree symbol, and an F):
If you're not an "expert" at C/C++ programming, I should explain a couple of things about this. First, the \xDF says that the following characters are hexadecimal numbers. However, there's a "gotcha" that with the advent of Unicode the number following the \x escape can be two, three, or four characters, and an F character would be seen as a hex number. To get around this, we end the string (temporarily) with a quote (what many erroneously call a double quote), add some white space (in this case a single space) then "another" string containing just the character F to indicate that the temperature is Fahrenheit and not Celsius (or Kelvin or Rankine or something even more obscure). Getting back to the code, if the compiler sees two strings separated by only white space, it'll just make a single string out of them.
I should mention that this depends on SparkFun's continued use of HD44780 with ROM code A00. If they go to ROM code A02, use \xB0 instead.
Is there any documentation of the actual protocol used in the serial/I2C/SPI/USB protocol? I went through some of the examples and there seem to be various bytes that you sent before sending special commands, others to enable commands etc., but it is really awkward to have to reverse engineering the protocol by tracing through arduino-ish libraries. It would be great to have some clean documentation on the protocol that is product agnostic.
Along the same lines, it couldn't hurt to provide a specification table with the function of each pin so one wanting to integrate this into their project doesn't have to trace through the tutorial magnifying each photo trying to figure out what goes where.
Hi ikaros66, Thanks for reaching out. Sorry, we don't have any official document of the protocol, but hopefully the "command cheatsheet" at the top of the arduino library cpp file helps:
https://github.com/sparkfun/SparkFun_SerLCD_Arduino_Library/blob/master/src/SerLCD.cpp#L48
Also, the header file in the library also shows all the specific bytes for each type of communication/command to the screen.
https://github.com/sparkfun/SparkFun_SerLCD_Arduino_Library/blob/master/src/SerLCD.h#L13
About the functionality of each pin on the LCDs, hopefully this hardware overview in our hookup guide is helpful:
https://learn.sparkfun.com/tutorials/avr-based-serial-enabled-lcds-hookup-guide/hardware-overview
Also, if you need more specific info about how the on-board AVR is receiving commands/characters, you could also look at the firmware repo here:
https://github.com/sparkfun/OpenLCD/tree/master/firmware/OpenLCD
Hope this helps and thanks again for reaching out. -Pete
I ported the Arduino code for the SerLCD library to CircuitPython, and released it to the CircuitPython Community bundle. The CircuitPython library supports I2C, SPI and UART (Serial) communication. All the Arduino examples were ported to Python.
The code along with installation instructions and other information is available on GitHub (github.com/fourstix/Sparkfun_CircuitPython_SerLCD)[https://github.com/fourstix/Sparkfun_CircuitPython_SerLCD]
You can install the SerLCD CircuitPython libraries on a Raspberry Pi with the following command:
The code was written on my own time and is open source and free to use.
I needed this to run on AdaFruit's CircuitPython. I like the 3.3V instead of having to add hardware to convert 5V. I also needed it to run I2C as I wanted the GPS to be on the serial pins for my new Express based project. I got it all to work after some effort--mostly having to read the directions. I have the combined code from both Sparkfun, AdaFruit and me here: https://github.com/alohawild/Maven/blob/master/OpenLCD.py. Harvest the code. I have tried to document it and make it clear and include Sparkfun's notes on how to use the OpenLCD based code.
Oops! Sorry, I replied to the wrong post.
What's the typical power consumption of this LCD with the backlight on?
Hi! That's a good question that has been asked a few times. I had some time to test it out in the last two days. Check out the new section in the Hardware Overview: Current Consumption on what to expect from the current consumption with the backlight turned off, for each individual color, and continuously cycling. I also tested it with something in all the character spaces. I didn't notice any significant changes when there was text on.
So I came here from buying my second Raspberry Pi and I thought it would be neat to add an LCD display to it (it's going to be a pi-hole server)... But .... I get that 5V RPi and 3.3V LCD display need something in-between for me to buy to work ... but what is it? Is there a Pi Hat that interfaces with 3.3V devices? I couldn't find it in the documentation and I came here into the comments to look too, and didn't find it either. I'm a software guy, I have no idea how hardware fits together without instructions. Can you add "using the LCD with raspberry pi" section .. just point me at the hardware I need to buy, and add a wiring diagram (and pray to your Gods if software geeks need to solder). I'll pass on the LCD for now, but it would be neat to have my Pi in a closet with this display showing DNS lookup statistics !
I have what I think is a LCD-14073 SERLCD display, and the basic functions work ok for me. However, I'm not sure I have access to everything I can do with it. The question I have concerns the (2) libraries on GitHub. Depending on where I click in the guide, I go to either OPENLCD library or the SparkFun_SerLCD_Arduino_Library. Which library should I be using for the 14073 in i2c mode and in the serial mode?
Hi there, it sounds like you are looking for technical assistance. Please use the link in the banner above, to get started with posting a topic in our forums. Our technical support team will do their best to assist you.
How do you turn off the system messages? It's hard to seriously use this in a project if every time you change the backlight (or any other setting) you see that confirmation briefly on screen. Some versions of the firmware apparently use 0x2E and 0x2F to enable/disable that but mine doesn't respond to those messages at all.
Hi there, it sounds like you are looking for technical assistance. Please use the link in the banner above, to get started with posting a topic in our forums. Our technical support team will do their best to assist you.
That being said, it sounds like you might have an older version of the screen and may need to update the firmware.
I just purchased this for a project, and have read through all the documentation. The text is showing up ok, but the backlight is not on or almost not on. I have tried different contrast settings, and different backlight settings and nothing. I know it is communicating ok, but the backlight appears to be off no matter what I do. I am running it on a adafruit feather 32u4.
Hey There, I seem to remember a bug in the initial release of firmware having to do with the backlight. Have you tried updating to the latest firmware. There is a guide on how to do this in the troubleshooting section of this hookup guide:
https://learn.sparkfun.com/tutorials/avr-based-serial-enabled-lcds-hookup-guide/troubleshooting
Hope this helps!
Hi, thanks for the nice product.
I have encountered some problems using the LCD in the following sequence: - set the contrast - send the clear setting - send characters then the characters are shifted by some position. (not starting at 0 row 0 column) I resolved the problem putting a delay in between set the contrast and send the clear setting. can someone give an advice? ps. i'am using an launchpad without using energia
Hi, are there any specifiations on the operating conditions with respect to temperature and humdity. We plan to use this LCD display in a farm in a case under direct sunlight so the temperature may reach 60-70C. Thanks
Thanks for a great tutorial. I really enjoyed it.
To make my display easier to use, I attached a Sparkfun Qwiic (3.3v I2C) adapter to my display. I ported the Arduino LiquidCrystal library to use with the serLCD display and Qwiic. I also ported all the LiquidCrystal examples as well. This way you can use the Serial Enabled LCD display pretty much like any other LCD display with the Arduino. The library is available here on github if you want to check it out: https://github.com/fourstix/QwiicSerLCD
I also played around with updating the firmware. I have a few more comments that might help others with the Firmware Update section of the tutorial, based on things I learned.
1) You can program the display with a regular (non-Beefy) 3.3v FTDI buddy if you supply power to the display from some other source. Since I have a Qwiic Adapter soldered to my display, I just supplied power through Qwiic adapter and used the regular FTDI buddy for programming.
2) The URL you want to add to the Arduino IDE File->Preferences: Additional Board Manager URL field is:
https://raw.githubusercontent.com/sparkfun/Arduino_Boards/master/IDE_Board_Manager/package_sparkfun_index.json
If you already have another board manager URL defined in the field, use a comma to separate it from the new URL.
3) In my Arduino IDE the name of the board for programming the display was slightly different than the tutorial images. The board was shown as 'Sparkfun SerLCD' in my IDE.
4) Two libraries are pre-requisite for recompiling the display software: SoftPWM and LiquidCrystalFast. I found SoftPWM through the Arduino IDE Library Manager, but I had to go here for the LiquidCrystalFast library: https://www.pjrc.com/teensy/td_libs_LiquidCrystal.html
Is there a mechanical drawing of the board available? Or, even better, an Eagle footprint? I'd like to plug this into another PCB.
It's here: https://github.com/SparkfunTechSupport/Dimensional-diagrams/blob/master/LCD-14072/SparkFun%2016x2%20SerLCD%20dimensions%20front%20-%20back.jpg