Excellent work Richard!!!
This will work well for my use, but with a little more tweaking it would be nice to have a define to set 1 of 4 different viewing directions to make a more universal driver.
Excellent work Richard!!!
This will work well for my use, but with a little more tweaking it would be nice to have a define to set 1 of 4 different viewing directions to make a more universal driver.
Shawn
Hi Richard,
I've been using your display drivers with 12864 ST7920 LCDs and one thing that's annoying (for me) is randomly on startup I'll be getting 3 large(ish) zeros in the top left corner of the display. If they appear, there's no getting rid of them without cutting power to the display. Any idea what I'm missing here? I can still write stuff to the display, but the zeros will remain there irrespective of screen clearing. Even filling the screen with a filled (black) rectangle - the zeros are still there but just colour inverted.
You can see if they're going to appear with the initialisation call to st7920_init as the areas around there is more populated with random dots than neighbouring areas. Sometimes it's clear enough to make them out before calling a screen clear and show.
Could this be a timing problem on my initialisation? It's happened on various displays (same model) and various completely different programs.
Troy
Last edited by rocket_troy; - 8th October 2024 at 01:58.
most likely, the displays have two screen memory regions one for graphics the other for the normal lcd character displayCould this be a timing problem on my initialisation?
at power up display is in lcd mode, the init routine sets it to graphics, lcds are slow to powerup they cannot be hurried.
if the display is written to before graphics mode is established then its possible some lcd chrs will be displayed accidently.
lcd chrs can only be cleared if the display is in lcd mode , graphic pixels can only be set in graphics mode
both memories are visible on screen no matter what mode is set.
Warning I'm not a teacher
Yeah, what you've said does make sense. I've played around with all sorts of timings - like up to 10s pause after calling the st7920_init and 2s prior, but I don't think it's my writing to the display that's causing the issue as the signs are already there when I call st7920_init.
So, are you aware of any commands I can call to initialise the "character" memory before calling st7920_init?
Thanks,
Troy
as in my demo
Code:Pause 1500 ' LCD initialize time lcdout $FE,1 gosub st7920_init 'graphic mode
Warning I'm not a teacher
[mega facepalm] DUH!!!
Thanks Richard.
Troy
Well, the zeros are still appearing even with up to 5 consecutive commands to clear the character memory. However, probably not as often. Definitely is text in the character display memory that's causing it - no doubt about it, but I'm also sure I'm doing something wrong with either the wiring or initialisation. Probably tolerable for now.
Troy
Bookmarks