B4R Question rLiquidCrystal conflict with serial port?

bdunkleysmith

Active Member
Licensed User
I am using a 2x16 LCD Display & Keypad Shield with an ESP13 ESP8266 based WiFi Shield via the rLiquidCrystal library. While the LCD display functions, even with the contrast trimpot set at the extreme end of the adjustment it is difficult to read. I presumed this was because it was intended that the LCD display operate from a 5V source while the ESP8266 is 3.3V. So I fitted Mosfet based logic level converters on each of the control (E & RS) and data (DB4-7) lines between the ESP8266 and display shield. However this did not function at all.

I suspect my problem is not just a level issue and in some way involves the ESP8266 serial port.

I assumed the command:
B4X:
Private lcd As LiquidCrystal

lcd.Initialize(5, 255, 12, Array As Byte (13, 14, 15, 16))
would just setup the necessary pins on the ESP8266, 5, 12, 13, 14, 15 & 16 in this case. But it seems to affect the serial port too because the blue status LED lights up after just that initialise command is issued.

The ESP8266 shield is fed by serial data from an UNO, which it then broadcasts via UDP. Over time while this data broadcasting is occurring, the blue LED sometimes flashes, but not in sympathy with the data being sent from the UNO, which I can see by way of the TX LED on the UNO.

I am curious why when the LCD display functions correctly, albeit with low contrast when powered from 3.3V and driven from the ESP8266, that when I fit logic level converters so the display can be powered from 5V, the code doesn't run. And particularly whether this may be caused by something rLiquidCrystal does to the serial port when setting up the Arduino controller ready to drive the display.
 

bdunkleysmith

Active Member
Licensed User
Thanks for your input tigrot.

I've determined the blue LED on my ESP13 ESP8266 based WiFi Shield is connected to pin 16 and as I was using that as one of the LCD display data pins, that's why it was activated seemingly randomly.

So it's all good and I do not need to worry about level converters as I'm now just running the LCD off 3.3V and added a charge pump to generate a small negative voltage for the LCD so there is sufficient voltage differential from Vcc for the display to have good contrast.
 
Upvote 0

bdunkleysmith

Active Member
Licensed User
Tigrot perhaps because this doesn't relateto B4R coding issues we could take this conversation offline. I will send you a message.
 
Upvote 0
Top