20x4

1 view
Skip to first unread message

Hebe Newnam

unread,
Aug 5, 2024, 1:15:31 AM8/5/24
to thimcasode
Ihave a very old set up with a Raspberry Pi B+ and a Hifiberry Digi that I added a 20x4 LCD screen. Everything was working (albeit slowwwww) until I made the error of upgrading the Volumio instalation to the latest, to be fair I have not update it in a while.

I have done as before and used Andypi tutorial with the addition of python3. I can make it work but for wtv reason it just does not stick on startup. Literaly I can see the LCDproc starting, the MPDlcd coming after with no information of track on the screen and after a while, as the system takes quite a long time to boot, reverting back to LCDproc. If you start the mpdlcd from the console it works but not on startup.


hi I have been using saiyatos pydpiper for a while and am happy with it so far so good, but I was curious what settings you changed.

I also have had to go back to a previous version for things to work.

is it just the pages file to" pages_lcd_20x4.py"?

or is there something more up to date. thanks


Hello all. Sorry for the long delay, but have a lot of projects in mind. For some reason, using a backup of an image of Volumio that has all the settings above, I stop having the bitrate info on display. if I trie to starta fresh instalation of pydPiper, says it no longer supports the raspbian jesse and gives error on the docker setup. Anyone with this problem? Not a big deal, but of the radio bitrate appeared before, why suddenly stop appearing?


I've done quite a lot of reading and been through some excellent posts, but still have a problem and cannot determine whether something is wrong with my screen or if the screen is fine and I'm just driving it wrong.


Aha, update with success to a certain degree.

The display I've used in the post above is actually the second one I have after the first one I bought off ebay didn't seem to work (the backlight wouldn't turn on).

On the first (with no backlight), it came without a jumper on the LED pins. I tried it first without and nothing.

Then I added a jumper, and still nothing although something must be wrong because it pulls around 0.15A at 5V DC!


They all give me either full blocks on lines 1 and 3 (2nd photo above), full blocks on all four lines or full blocks on 1 and 3 / half blocks on 2 and 4 (1st photo above). Sometimes with backlight, sometimes without.


I'd also like to work with you to get the guesser working for this backpack.

It is possible that is not wired like the 6 variations tried. I've not seen other variations out there but it is possible.

Do you have an ohm meter that we can use to ohm out the signals so figure out how it is wired up?


I'd focus on why the guesser sketch can't identify the PCF8574.

It is a very simple process. It writes to the chip output port and expects a certain response.

In this case it expects a 0x00

If it doesn't get it and the chip is a 8574 then something is wrong and needs to be corrected.


Do you have a ohm meter to trace out the traces on the board, which is best way to determine how the backpack is wired. The guesser is just guessing a limited of combinations and it usually works, but tracing the wires is better and foolproof since it provides the accurate proper mapping formation.


Hi Bill,

Not sure whether your post was directed to me or aliumas' one.

The "updated" sketch was your update taken from this thread: =1298575 where it correctly identifies the more recent PCF8574A version which has a default address of 0x3f. With that version, it found my LCD board's address and communicates OK (backlight toggling), but I never see the string appear on the actual LCD, just the three variations of blocks mentioned in my earlier post.


But you said you were running an "updated" version of the guesser sketch?

I think that there may be some confusion here.

The one you said was the updated sketch is actually older than the other one.

The newer sketches will print out a version number. You should see version 1.4.1

And even though it says "PCF8574" it works on all varieties since they all work the same.


I'd like to figure out why it fails to recognize the chip. The only way that can happen is that after a zero was written to the port register something other than zero was read back.

That shouldn't happen.

It would be nice if you could print out the hex value of the "data" variable in IdentifyIOexp()

just after this line:


Bill, sorry, I missed your question regarding printint out the hex value of the "data" variable in IdentifyIOexp()

just after line "data = Wire.read();". If that's still relevant, I'll need some guidance, I can't quite understand how to do that.


As far as I can tell, I have the correct address, 0x3f, as this is identified by the guesser which I could get working. This would be confirmed by the blinking backlight when starting one of those simple "hello world" sketches.


Yes, I realise that your device is (0x3F). I can see that from the empty A0 A1 A2 pads on your pcb. You can change this address by soldering links across these pads. There is no need to change address. (shorting all the pads would make the address 0x38)

My dev board is hard-wired as (0x38) and difficult to change.


I am sure that there is a simple solution. It is unlikely that you have two "bad" displays. A duff LED on a green display does not matter. A duff LED on a blue display makes it unreadable. A shorted track should be easy to cure. Without a backlight, the 20x4 display will only take a few mA.


I presume that the Green LCD has a duff backlight. Which you can test very easily.

Does the Green LCD show text properly? And with which constructor()?

And the Blue LCD does not work with the constructor() suggested by the guesser sketch.


I missed your question regarding printint out the hex value of the "data" variable in IdentifyIOexp()

just after line "data = Wire.read();". If that's still relevant, I'll need some guidance, I can't quite understand how to do that.


Sorry for the confusion David.

Both of my screens are blue.

One has no working backlight, but appears to work, although as you say, is nearly unusable as text is hard to read.

On that working screen, a construcor that works is


The WEH002004A is a COB-structured OLED display module featuring a 20x4 character configuration. It boasts a 2.88-inch diagonal module size with an active display area of 70.16 x 20.95 mm and integrates the WS0010-TX all-in-one font IC. Supporting the default interface of 6800, with optional 8080 or SPI interfaces, it operates in a 1/16 duty drive mode. All standard Winstar COB OLED character types are equipped with this all-in-one Fonts controller IC, offering support for ASCII, English, Russian, European, and Japanese character sets via a built-in ROM standard font library.


The WEH002004A shares identical outline dimensions (98.0 x 60.0 mm) and view area size (77.0 x 25.2 mm) as the Winstar LCD WH2004A, utilizing the same pinout configuration. Winstar's 20x4 OLED Display is an excellent choice for upgrading applications from STN LCDs to OLED displays. Key features include:


The module has an integrated PCB board, eliminating the need for customers to develop additional PCBs. Additionally, four screw holes on the PCB board simplify installation. Operating at a logic supply voltage ranging from 4.8V to 5.3V (typically 5.0V), this OLED module ensures reliable performance across a broad temperature spectrum, with storage capabilities from -40C to +85C. It also offers multiple emitting colors to cater to diverse customer preferences.


The SparkFun SerLCD is an AVR-based, serial enabled LCD that provides a simple and cost effective solution for adding a 20x4 Black on RGB Liquid Crystal Display into your project. We've seriously overhauled the PCB design on the back of the screen by including an ATmega328P that handles all of the screen control, meaning a backpack is no longer needed! This display can now communicate in three different ways: serial, I2C, and SPI. This version comes equipped with a Qwiic connector, bringing serial LCDs into the Qwiic ecosystem. This simplifies the number of wires needed and allows your project to display all kinds of text and numbers.


The on-board ATmega328P AVR microcontroller utilizes 11.0592 MHz crystal for greater communication accuracy with adjustable baud rates of 1200 through 1000000 but is default set at 9600. The firmware for this SerLCD is fully opensource and allows for any customizations you may need.


Note: Since the SerLCD is a 3.3V device, please make sure you convert to 3.3V logic depending on your chosen microcontroller or single board computer. Otherwise, you may risk damaging your board.


-- HELP: Long Strings Truncating At 30-characters --I have a student group who is attempting to integrate this LCD into their project. It's almost certainly an issue with the code, but they are experiencing a truncation of strings that are printed to the screen, specifically when strings are longer than 30 characters.


For context, they are using the Qwic connection, using the Wire library to communicate with the screen via I2C. The long strings are successfully wrapped from the first 20-character-long line down to the second line, but as I said, strings are consistently truncated to 30 characters (cutting off in the middle of the second row)...


After pip3ing the library, it works great with my RPi. The light is bright and can produce any color with RGB command. It'd be nice if it had a QWIIC socket but it can easily be mounted with the Sparkfun QWIIC adapter board ( )... The legs even align with the mounting holes in the adapter.


I like these in conjunction with the RedBoard QWIIC as I can very simply plug the two together and have a display for my little applications.The IIC interface is a little slow for some applications so I buffer the data and then update the display when the program has time. Working that way I can use it to display near real-time data.

3a8082e126
Reply all
Reply to author
Forward
0 new messages