Adafruit 16x2 LCD doesn't turn on with Pine64
#12
(08-26-2016, 03:58 AM)pfeerick Wrote:
(08-26-2016, 02:58 AM)KnReLe Wrote:
(08-26-2016, 01:11 AM)pfeerick Wrote:
(08-25-2016, 08:53 PM)MarkHaysHarris777 Wrote: i can see from your print-out of the i2c registers that it is not detecting the address of the LCD.  How are you powering it?  Double check your connections.  Make sure its on the correct bus...

Mark, I think you need to have a another look at the first post, specifically the picture... you can clearly see the LCD is on a Adafruit LCD Pi Plate, meaning it is i2c, with all comms and power comming from the pi bus. Plus, there is no room for incorrect wiring as assembly is as simply as place LCD here and solder connectors, etc. 

My question here would be does I2C work out of the box with a particular debian or ubuntu image, and if not, what configuration is needed to get it up and running?

Although that question might not have been directed at me -- I have one data-point's worth of answer to it.

i2c on the bus in question here, TWI-1 or /dev/i2c-1 as it appears in the Linux file system, does have all necessary support bits in place on the Debian 3.10.102-3-pine64-longsleep kernel. (I had it working with the previous -1- and -2- ones as well, but those are obsolete.) These are ready for use, though one will want to install the i2c-tools and libi2c-dev (and whatever other similar packages apply to python) to be able to use them for anything interesting. Reading and writing to simple devices will be the same.


So much for the software side. Hardware-wise, we have to have something connected of course, and if the i2c-capable device or board connected was originally designed for Raspberry Pi, the good news is that there is a good chance of it working, and the less-than perfectly good news is that we have to add the pull-up resistors to the two i2c lines since they are not present from before.

Thanks for that KnReLe. I just wanted to know if I2C actually worked (at all, or if it needed configuring), after the comments earlier about things not being compatible. I was in the middle of wiring up a MCP23017 (as is used on the Adafruit LCD Pi Plate) to see what was involved in getting it working, and thought after those comments that I was probably wasting my time. 

So, after finishing up wiring the MCP23017 chip, adding the 2k pullups to the I2C buss (pulling 3 & 5 up to 3.3v), the chip was detected as I indicated in the edit to my earlier post. I then proceeded to add LEDs to five of the eight Port A I/O pins on the expander, and wrote up some code to see if it all worked. The result... pretty blinky lights! It's alive! 

You can see a video of the results here (apologies for the slight shakiness of it the footage... is getting a bit nippy here at night time now!). The code used is here. And the wiring was based on this guide. So in a nutshell, all that should be needed to get the I2C bus up and running for mypineme's board is the addition of the 2k resistors. Then it's just a matter of seeing how compatible Adafruits library and code is for this is, since it was intended for the Rpi, not the pine. Fingers cross for you on that one! It will be really good if it does work!

Great video -- blinkenlights and stuff that works is always great to see.

As I actually had one of these display units lying around here from when I bought it back in 2013 sometime, I hooked it up with the pull-up resistors in place.  Then I found the test C programs for it that I had made back then and that code compiled and ran without changes, and gave me some text on the screen.  (Should anyone be interested, I did attach a tarball with the code in it.)

I had a look at the Adafruit library, it seems to want to encompass all sorts of LCD interfacing, including direct via GPIOs so it wants to use device-specific libraries such as Rpi.GPIO or a Beaglebone equivalent, Adafruit_BBIO.  So it looks like what may be needed is some kind of  «Pine.GPIO» variation of this.

I also did try the Adafruit library but it said it «could not detemine platform», which is fair i suppose -- as it hasn't been told that there are such things as PineA64...


Attached Files
.gz   adadisp-p64.tar.gz (Size: 4.88 KB / Downloads: 332)
  Reply


Messages In This Thread

Possibly Related Threads…
Thread Author Replies Views Last Post
  Pine64 and Nexdoc mcf 11 21,053 12-05-2017, 03:10 AM
Last Post: Pander
  Mounting RPI3 "hats" on Pine64 gczuczy 5 10,841 07-30-2017, 10:29 AM
Last Post: KnReLe
  adafruit ultimate gps hat mrjake 3 7,367 02-16-2017, 08:15 PM
Last Post: mrjake
  Analog Amplifier for Pine64 mbt28 2 5,535 02-09-2017, 08:46 AM
Last Post: mbt28
  ZJ080NA-08A and pine64 mbt28 4 7,428 10-10-2016, 05:12 AM
Last Post: mbt28
  Euler bus/Pi2 bus on Pine64 xxvolwarexx 1 6,111 10-05-2016, 06:35 PM
Last Post: pfeerick
Exclamation Pine64+ not starting (never) Alex89cgn 1 3,714 08-15-2016, 12:05 PM
Last Post: MarkHaysHarris777
  Pine64 Eagle LBR openhardwarecoza 3 6,346 08-01-2016, 11:05 AM
Last Post: xalius
  Setting up UART2 for Adafruit GPS hat stephen fleming 1 3,816 05-13-2016, 03:20 PM
Last Post: peterz

Forum Jump:


Users browsing this thread: 4 Guest(s)