LiquidCrystal.h trouble with Due (SOLVED)

Hi,

I’ve got a 16x2 character 1602A LCD module (Hitachi HD44780 compatible). I know how to use it and I’ve got it working with my Arduino Nano. However I haven’t been able to get it working with my Due. I do realize the Due is 3.3V and the LCD module is 5V so the first thing I tried was to use one of these: https://www.adafruit.com/products/395

It didn’t work. Tried with and without pull-up resistors (82k each), no difference. I also tried direct connections from the Due to the module: Didn’t work either. At the best I have managed to get the module to display random characters at each CPU reset. Sometimes I get parts of the actual strings I’m trying to print but not always. I’ve checked the connections to the best of my abilities and tried changing to different I/O ports. My strong gut feeling is that there is something wrong with the library. Maybe it’s trying to run too fast for the module on a Due???

I also did verify with a multimeter that the level shifter is working so I’m a bit clueless what to do next. Any ideas?

Thanks,
// K

Forgot to mention I’m running the latest nightly build of Adruino IDE on a 64bit Linux…

kbrown: ... I do realize the Due is 3.3V and the LCD module is 5V so the first thing I tried was to use one of these: https://www.adafruit.com/products/395

It didn't work. Tried with and without pull-up resistors (82k each), no difference. ...

The DUE has built-in 1k pull-up resistors, that were probably confusing the TXB0108 (as mentioned on Adafruit's site). Maybe try removing the pull-ups from the DUE board, and use the big resistors alone?

There are also parts of the Wired library that plainly do not work. Search for these and be sure that you don't need/use them.

-Chris

Thanks Chris!

I'll see if I can find the resistors. Just to clarify I had the 82k pull-ups on the 5V side of the adafruit converter. Maybe that's not the right thing to do?

Just as an experiment I modified the existing LiquidCrystal.cpp file. I doubled and then quadruped all the delays I could find: Didn't make a difference so it's back to square one...

Just ordered one of 74LVC245 level shifters. I'll report back if I have better luck with this..

Received the 74LVC245A today. While wiring it up I noticed it says "designed for 1.65-V to 3.6-V Vcc operation" in the datasheet. However further down in the datasheet it says the supply voltage range is -0.5V to 6.5V so I decided to go ahead and try it with 5V Vcc. Lo and behold it worked straight out of the box. Problem solved :)

Cheers, Kari