Bit manipulation of 4x20 LCD screen

Greetings
I am looking for a way to manipulate the individual bits on a 4x20 LCD screen without being limited to the 8 createChar that the software allows for. Can I just send a stream of binary to the screen and update every bit in the entire screen all at once? I want to create an animation on the screen but I cant do it with the restrictions that only 8 createChar allows. I'm using a mega with 4x20 LCD with I2C backpack. I am not married to the I2C backpack as the mega has more than enough pins to allow a parallel connection and still leave me with plenty of IO. I've googled about but haven't found a means of doing it. It may not be possible or I may have to change to a TFT style screen to accomplish this. Id like to use the screens that I already have but if that is the way, then that is the way. Any advise, links, utube vid links or any pointers as to where to look would be greatly appreciated.

Not with the standard LCD controller chip. Use a TFT display.

2 Likes

Pretty much what I had figured but I though I'd ask the hackosphere and see if a new trick had been developed to get around this. Thanks for your help
amachinetech

You can't beat the hardware! :face_with_raised_eyebrow:

And you will always be limited by the character "blocks" with space between.

I confess that I am guessing here.
Can you define custom characters on the fly and define the position of individual dots in a single character and then display that character?
Not a great explanation, but hopefully you will get the idea.

Yes, but the designers didn't provide as many custom characters as the maximum number of characters on the screen. If I remember correctly, you can only have 8.

Whatever you do it will look crap. There are gaps between individual letters.

You can draw separate "frames" very fast e.g. each with a new set of 8 custom characters.

Persistence of vision will show your picture. You need to balance the dot occurrence. e.g. a 4-frame "static picture" might have a visible dot in 3 frames.
I have done this. It is horrible.

If you want graphic animations choose an OLED or TFT.
An LCD is too slow. It looks smeary. Even Graphic LCDs.

Of course a really slow animation is possible on a Character LCD.
Each frame is shown with its own set of 8 Custom characters.

David.

1 Like

That is why I wondered if the custom characters could be updated on the fly.

In david_prentice's reply, he implies that you can update on the fly.
As regards

[quote="david_prentice, post:7, topic:988409"] ...it will look crap ...[/quote] that is subjective. It may be adequate for your needs, however i suspect it will not be good enough.

Yes, you can update on the fly. You will be writing a fresh set of custom character definitions as well as updating the characters displayed.

Let's say 80 bytes per partial frame. At 50us per byte this is 4ms.
At 4 partial frames for a "static image" is 16ms. So it is "practical".

It will just look a bit crap. And fairly difficult to achieve.

As an experiment.
Print

*David Prentice*

for 3 sub frames followed by

*              *

Do this continuously. The "David Prentice" will show up but a little fainter than a steady 4 sub frames of "*David Prentice*"

Follow this with a 2 + 2 version. And then with a 1 + 3 version.
They will look progressively worse.

Do this experiment before you even think of the complications of custom characters, multiplexing, LCD smeariness, ...

Bear in mind that Arduino LCD libraries are not very fast. Even in Parallel.
You state in #1 that you want to use an I2C backpack.
Change the theoretical 50us per byte to a theoretical 450us per byte.

Bill Perry probably has real-life times for popular Arduino libraries.
I suspect that they will be nearer 200us and 2000us per byte.

Which rules out any form of multiplexing. Even with Bill's libraries.

David.

When I want more fine grain control of a display like this I use a dot matrix display with an st7920, as demonstrated here: Tutorial 16 - 128x64 ST7920 graphical/dot-matrix SPI LCD (arduino-tutorials.net)

1 Like

Yes. The ST7920 is easy to use. You can send faster animations than the LCD responds to.

But there are plenty of other 128x64 Graphics LCDs that are smaller e.g. ST7565

0.96" and 1.3" OLEDs are cheap. Bigger OLEDs get quite expensive.
OLEDs can show fast animations without smearing. You get slight shadows.

David.

Indeed, there are many better solutions than a square peg for a round hole.

One other point to note around the custom character set limit. If you update a character that is already displayed on the screen, then that character will also be updated. So the limit applies to the number on the screen at any time.

1 Like

That is correct. There is no feedback to the MCU from the controller about which character is currently being updated. That would be required in order to make the "on the fly" concept work.

of course the super fine grain animation is not what I want to do. i was looking to make a "hurray you found the prize screen with 8 custom characters, and also a nope you missed it with another 8 custom characters and a few other messages with their own set of 8 special characters. Tell me more about this "update on the fly" It could solve the issue I have

Sure, I can tell you that it won't work. "on the fly" depends on updating characters while they are not being displayed in the segment scan. But the hardware has no way of reporting any position in the segment scan. Even if that were the case, the I/O would probably be too slow for that.

What you can do, is change the custom characters that are displayed. But they can't co-exist on the screen at the same time.

This Monochrome 1.3 128x64 OLED graphic display - STEMMA QT / Qwiic : ID 938 : $19.95 : Adafruit Industries, Unique & fun DIY electronics and kits is a fabulous little display, and you can't beat the price for the functionality.

Each screen message can use up to 8 custom characters.
Just use a new set for a new message.

8 custom characters is plenty good enough for a simple text message with a simple "icon / logo"
Just remember that you can't have more than 8 at any one time.

We assumed (wrongly) that you wanted to have some fancy moving graphics. Which would be better suited to an OLED or GLCD.

You can do limited animations using custom characters. Here is an example of an odometer type clock display on an LCD screen: LCD 1602 odometer style digit rollover

2 Likes

That is slick. I'm looking forward to digging into it with my coffee.