2023-10-27 12:42 PM - last edited on 2024-06-10 04:11 AM by SofLit
Hi, I have and STM32F042 and an LCD with an ST7066U from NewHeaven Displays, it is a 3V3 specific version . I am trying to use 4-bit mode to save pins (I have enough pins for this project to use 8-bit but for future projects too it would be better for me to have 4-bit working). I've followed the data sheet exactly for initialising the display and then I simply type an 'A'. The display does nothing.
I have been struggling with this for many days now. I have managed to get characters on the display but never from power up of the MCU and display. With other code I have that I was just trying anything and everything if I kept the display running and reset the STM32 multiple times I could get it to work somehow. This leads me to believe that I have missed something in the initialisation. But as far as i can tell i followed it exactly.
I also attached a logic analyser to see that the information is being sent correctly (Results attached) and it shows that the data is being sent correctly. The only irregularity is the very first nibble that gets sent when the STM32 powers up but according to the display data sheet this wont be an issue because the display takes time to power up.
I made a PCB (breakout board) to connect the display directly with the MCU so I have no crossed wires. I have triple checked.
Anyone got any ideas for me? Thanks!
2024-06-07 10:04 AM
CAlbe.2,
Did you ever figure out what was causing the problem? I have a somewhat similar issue with our Nucleo-H7A3ZI-Q board and a 7" LCD display that is using the RA8875 controller chip. We're using a 4 wire SPI interface. Sometimes the screen comes on and other times I have to hit the micro's reset button multiple times before the screen is correct.
I'm just wondering if you figured out your issue.
Thanks,
Richard
2024-06-07 10:31 AM
Hi Richard
I did eventually figure it out. There was a problem in my initializing sequence. I got old code that I made from anduino and copied that sequence then it worked.
The annoying thing is that the code that doesn't work is straight from the datasheet. The code that does work has a few extra initializing steps and that has now proven to work reliably, I can't remember how I got to this code but I think it was just off the internet somewhere.
Good luck, hope you come right
2024-06-07 10:34 AM
those displays did not change in 50 years how they work, there are tons of schematics and codes posted over and over again.
try this one
https://github.com/bdmihai/stm32-st7066u
the other best option is to get Arduino Uno it is $10, it has library included so you can see how it works right away.