Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How to connect HD44780 to CubieTruck?

Featured Replies

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).

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 )

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")

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

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

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,

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.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.