Solved: liquid crystal library runnig?

Working libraries, libraries being ported and related hardware
stancecoke
Posts: 18
Joined: Mon Mar 14, 2016 8:00 am

Solved: liquid crystal library runnig?

Postby stancecoke » Tue Feb 07, 2017 9:27 pm

i try to run a HD44780 compatible 16x2 LCD Display with a blue pill with this pin assignment:

* LCD RS pin to digital pin PA0
* LCD Enable pin to digital pin PA1
* LCD D4 pin to digital pin PA2
* LCD D5 pin to digital pin PA3
* LCD D6 pin to digital pin PA4
* LCD D7 pin to digital pin PA5
see this example:
https://www.arduino.cc/en/Tutorial/HelloWorld

So I initialize the display with the line

Code: Select all

LiquidCrystal lcd(PA0, PA1, PA2, PA3, PA4, PA5);


The sketch compiled without errors. When I power on the system, the Display shows some random black areas for less then a second, then the display is blank and the current increases from 50mA to 160mA :o

OK, Port A is not 5V tolerant, might this be the problem?

Regards
stancecoke

edit: I think I killed the blue pill, it isn't recognized as an usb-device by the computer any longer :(
Last edited by stancecoke on Sat Feb 11, 2017 12:56 pm, edited 1 time in total.

User avatar
Pito
Posts: 609
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: liquid crystal library runnig?

Postby Pito » Wed Feb 08, 2017 11:43 am

Unless you use the LED backlit the current consumption of such LCD display is maybe less a milliamp.
I doubt the display could destroy the Bluepill. Did you wire the R/W signal to gnd?
Double check the wiring.

zmemw16
Posts: 974
Joined: Wed Jul 08, 2015 2:09 pm
Location: St Annes, Lancs,UK

Re: liquid crystal library runnig?

Postby zmemw16 » Wed Feb 08, 2017 2:44 pm

turn the pot, one end - blank, other end - black blocks ?

have you a 'uno' handy, check it works with that ?

you need to check the supply connections and your display details, they do mess with the pins used, blew a i2c oled as
same physically, but not for the vcc and gnd lines :cry:

stephen

stancecoke
Posts: 18
Joined: Mon Mar 14, 2016 8:00 am

Re: liquid crystal library runnig?

Postby stancecoke » Wed Feb 08, 2017 5:47 pm

I checked wiring several times, polaritiy is OK, R/W is connected to GND.
I now have wired the display to 5V tolerant pins of a new Blue Pill, but it still doesn't work. Still much to high current and no letters on the display. At least, the new Blue Pill survived... ;)
All data lines of the display show 4.xxV and the blue pill is not able to draw the lines to 0V. I orderd a new display, I think the old one is faulty.

Thanks for your hints.

Regards
stancecoke

edit: I tested the I/O Pins with blink example. It seems, that Pins where Enable and RS were connected to, are broken on the new Blue Pill too. :(

User avatar
Pito
Posts: 609
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: liquid crystal library runnig?

Postby Pito » Wed Feb 08, 2017 6:59 pm

If you do measure more than 3.3V on the data pins - that means LCD's data are set to be outputs - what is not good.
The LCD's data shall be set as inputs - double check the LCD's R/W pin.
You may wire 1k resistors in series with all signals to avoid catastrophic situations..
But I doubt your BPs have been killed. Do not panic and double/triple check everything again.

PS: when properly wired (where the 5V is coming from??) you do not need 5V tolerant pins as all the LCD's pins are set as inputs - thus your 3.3V BP outputs drive LCD's inputs what is basically ok.

stancecoke
Posts: 18
Joined: Mon Mar 14, 2016 8:00 am

Re: liquid crystal library runnig?

Postby stancecoke » Sat Feb 11, 2017 1:05 pm

Today the new display arrived. Now it works fine, the library is OK! :D

So I have sacrificed the old one to the Lord of the rubbish bin ...

Regards
stancecoke


Return to “Libraries & Hardware”

Who is online

Users browsing this forum: No registered users and 2 guests