6 years, 6 months ago.

Can`t show any text on the LCD

Hi supporter

I use the STM32 L152RE and 1602A LCD display. I think I miss some pin but I don`t know what to.... /media/uploads/williamwu/dsc_0249.jpg /media/uploads/williamwu/--_F9PAlUe.png

include the mbed library with this snippet

#include "mbed.h"
#include "ACM1602NI.h"

ACM1602NI lcd(D14, D15);

int main() {
    lcd.printf("Hello, World!\n");
    lcd.printf("ACM1602NI\n");
}

Question relating to:

1 Answer

6 years, 6 months ago.

Please post your code and wiring diagram.

Common errors are: bad connections, RW pin not connected to GND, bad or missing contrast voltage.

Do you see anything when powering the display? It typically shows a row of dark rectangles on the top line.

See here for more info.

Accepted Answer

Hi Wim

I have upload the situation I met.

Thanks for your reply.

posted by william wu 31 Oct 2017

It seems from your code above that you included a lib for the ACM1602, which is a display using the I2C interface. The component code (and a picture) for that display is here. However, your picture above shows a display that is probably not an ACM1602 but a regular parallel interface type. That type of display needs either Simon Ford's TextLCD lib or my extended LCD library. You need to wire up the displays E, RS and D4-D7 to the proper pins on the nucleo. You also need RW connected to GND and obviously you need powerlines and Vlcd.

The picture also shows that all characters are bright rectangles. That means your contrast setting is not correct. This is caused by the fact that the Vlcd (pin 3) is connected to GND. It should be connected to a potmeter wiper with the other ends at GND and 5V. Adjust the Vlcd to get the proper contrast. Probably around 0.5V.

Check the display datasheet to verify that the backlight A/K may be hooked up to powersupply without any series resistor as you have done now. The current could be too high otherwise and damage the backlight.

posted by Wim Huiskamp 31 Oct 2017