Jump to content

Recommended Posts

Posted

i2s

Did you mean i2c? Anyway, HD44780 has parallel 4/8 bit interface, what display do you have (with integrated i2c port expander I assume)? You need to know how HD44780 pins are mapped to port expander register bits, and power supply requirements (3.3v or 5v).

Posted

Okay, still no chematics, but assuming it's a clone of this port expander, it has more or less "standart" pin mapping.

 

Now comes the dangerous part. A20 GPIOs are not 5v tolerant, so connecting this port expander to cubietruck using 5v supply voltage may irreversibly damage cubie's CPU

You can try powering it from 3.3v, pcf8574 supports lower voltage, and there are HD44780 based displays designed for 3.3v, worst thing that could happen - contrast and backlight brightness will be lower than normal.

 

Now, assuming you connected your display (VCC to 3.3v, GND to GND, SCL to TWI1 SCL and SDA to TWI1 SDA):

  • install i2c-tools
  • check if i2c-1 is configured ("ls /dev/i2c*" or "sudo i2cdetect -l")
  • check if port expander is available on the bus ("sudo i2cdetect -y 1")
Posted

Hello zador.blood.stained,

 

Actually I only know it from Raspberry and Banana Pi point of view. BPi is also an A20 board...

Here you can find it:  http://www.armbian.com/banana-pi/

see chapter "Connect your LCD display"

 

Here it is powered with 5V.

I have this working with 4x20 I2C LCD on my Banana Pi using WiringPi as described by armbian and lemaker...

 

It works the same way on Raspberry Pi and Banana Pi, so it should be the same or at least similar on Cubietruck...

 

regards

SMH

Posted

I didn't say that it won't work, it's just not recommended. I also have HD44780 based LCD connected to RPi with pcf8574a, but I'm powering pcf with 3.3v and display with 5v - more or less "recommended" way. Better safe than sorry imho.

Posted

If you do not use the vga port, there is a ready 5V I2C for you. Wiring your 4 wire I2C LCD using a vga connector is much more easier than connecting to the pins on board (which is tinier compare to rpi or bpi)

post-223-0-62883500-1449299061_thumb.png

Posted

Hi,

 

I wrote (actually, I remade)  a simple library in order to use I2C based HD44780. Please look into GitHub code:

https://github.com/panciunio/pyCT-PCF8574

In my projects based on I2C I using  2 channels voltage converter, so be careful what you do!

 

It's very simple, basic instruction set but easy to use and modify. It's not completely solution because at first you need working I2C layer (smbus). More information you may find on my forum: https://cubieboard.org.pl

Sorry, it's only in Polish because of my English...

 

Regards,

Posted

Actually I forked and modified Python library for this configuguration too :) : https://github.com/zador-blood-stained/RPLCD-i2c

But topicstarter wanted to display info from mpd on the display, so for him the easiest solution would be compiling lcdproc (with some modifications due to different pinout) and using something like mpdlcd.

 

Accessing smbus from python2 is easy, for python3 it needs to be compiled manually.

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines