I2C LCD with STM32F4-07VG and CooCox

Thread Starter

Mugle_ENSPARTAN

Joined Feb 4, 2019
2
Hello all. I have a problem with my lcd. I use it on our robot to see a parameters on robot with STM32F4-07VG board.

I used lcd 4x20 with i2c wiring and pcf8574 module and also coocox to program it with library from www.stm32f4-discovery.net

The problem is, the lcd is often send the random data (not like there isn't same the baudrate), the text is running random from up to bottom. So i have to reset the board so the lcd will display right text and static text (not running text).

I dont know there is problem with my program or my wiring lcd. Because the case is randomly happen. Sometimes it's happen when the robot have a tremble, sometimes it's happen when the robot is motionless.

Maybe someone know about this problem and can explain to me, thanks

*video/pic when the lcd error is come afterward
 

MrChips

Joined Oct 2, 2009
34,807
How long is the cable from the MCU to the LCD?
Try putting a 100nF capacitor across VDD and GND directly at the LCD.
 

MrChips

Joined Oct 2, 2009
34,807
Why is the cable so long?

I would suggest inserting suitable delays in your code when sending E pulses, before and after any E transitions.
You need to ensure that the data settles before low-to-high transition of E, while E is high, and after high-to-low transition.
 
Top