Jump to content

How to connect HD44780 to CubieTruck?


DmKorneev

Recommended Posts

So, can you link to documentation page for your display or provide details (pin mapping and supply voltage)? If display requires 5v supply, then you need to make sure there are no pull-up resistors on i2c lines, and that you don't send read commands to HD44780, otherwise you can connect it to TWI1 pins on CN8 (section "Expansion ports" on wiki page https://linux-sunxi.org/Cubietruck )

Link to comment
Share on other sites

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")
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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,

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Important Information

Terms of Use - Privacy Policy - Guidelines