Anyone working on HD44780 library?

Discuss development of drivers for external hardware and components, such as LCD screens, sensors, motor drivers, etc.
Target audience: Users and developers of drivers.
User avatar
UltraBob
Posts: 43
Joined: Mon Jul 28, 2014 1:18 pm
Location: Zushi, Japan
Contact:

Re: Anyone working on HD44780 library?

Post by UltraBob » Wed Aug 06, 2014 1:42 am

I'll try this when I get home tonight.

I am on flash as well because as mentioned in another thread, my SD seems not to work. I updated to the latest firmware last night so that could take care of it.

User avatar
UltraBob
Posts: 43
Joined: Mon Jul 28, 2014 1:18 pm
Location: Zushi, Japan
Contact:

Re: Anyone working on HD44780 library?

Post by UltraBob » Wed Aug 06, 2014 1:23 pm

It appears to work now, so either I was messing up something before inadvertently, or the new firmware fixed it. Thanks Dave.

User avatar
polygontwist
Posts: 36
Joined: Sat Jun 28, 2014 4:54 pm
Location: Germany, Rostock
Contact:

Re: Anyone working on HD44780 library?

Post by polygontwist » Sun Aug 24, 2014 1:07 pm

dhylands wrote:...
In my case I was using a 4x20 LCD. I uploaded a youtube video.
...
the better URL to the Video is: https://www.youtube.com/watch?v=7-UQodIxdCU (other Users can not edit your Video ;) )

generally it would be nice: Please publish the wiring, for Beginners (or Link to the wiki?).

User avatar
dhylands
Posts: 3417
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: Anyone working on HD44780 library?

Post by dhylands » Sun Aug 24, 2014 5:25 pm

Thanks for the revised URL.

The wiring is pretty much arbitrary and needs to match whatever you call GpioLcd with. So, my example had:

Code: Select all

 lcd = GpioLcd(rs_pin=Pin.board.Y12,
enable_pin=Pin.board.Y11,
d4_pin=Pin.board.Y5,
d5_pin=Pin.board.Y6,
d6_pin=Pin.board.Y7,
d7_pin=Pin.board.Y8,
num_lines=4, num_columns=20)
The pinout on the HD44780 LCDs looks like:

Code: Select all

 1 - Vss (aka Ground) - Connect to one of the ground pins on you pyboard.
 2 - VDD - I connected to VIN which is 5 volts when your pyboard is powerd vi USB
 3 - VE (Contrast voltage) - I'll discuss this below
 4 - RS (Register Select) connect to Y12 (as per example above)
 5 - RW (Read/Write) - connect to ground
 6 - EN (Enable) connect to Y11 (as per example above)
 7 - D0 - leave unconnected
 8 - D1 - leave unconnected
 9 - D2 - leave unconnected
10 - D3 - leave unconnected
11 - D4 - connect to Y5 (as per example above)
12 - D5 - connect to Y6 (as per example above)
13 - D6 - connect to Y7 (as per example above)
14 - D7 - connect to Y8 (as per example above)
15 - A (BackLight Anode) - Connect to VIN
16 - K (Backlight Cathode) - Connect to Ground
On 14-pin LCDs, there is no backlight, so pins 15 & 16 don't exist.

The Contrast line (pin 3) typically connects to the center tap of a 10K potentiometer, and the other 2 legs of the 10K potentiometer are connected to pins 1 and 2 (Ground and VDD)

Here is a typical diagram: http://www.instructables.com/id/How-to- ... 80-pinout/ plus you add the signals as per the call to GpioLcd.

I think I'll add the wiring guide to my example code - Thanks for bringing this up.
EDIT - I added the wiring used to the pyb_gpio_lcd_test.py and pyb_gpio_lcd_test8.py examples in my repository.

riklaunim
Posts: 32
Joined: Fri Aug 22, 2014 5:42 pm

Re: Anyone working on HD44780 library?

Post by riklaunim » Sun Aug 24, 2014 7:24 pm

I've used hobbytronics serial adapter and that vastly simplies handling of those LCDs (although it another part in the project).

User avatar
yllumi
Posts: 37
Joined: Tue Aug 19, 2014 8:41 am
Location: Bandung, West Java, Indonesia
Contact:

Re: Anyone working on HD44780 library?

Post by yllumi » Mon May 11, 2015 12:20 pm

I still rather confuse of what pin connect to what pin on pyboard.
The pin sequence on i2c lcd board (from top to bottom) is GND, VCC, SDA, SCL. On pyboard, SDA is X10 and SCL is X9.
Do we need to cross SDA-SCL from lcd to pyboard, or SDA to SDA and SCL to SCL?
Because I see in UART that TX go to RX and RX go to TX.

btw I still can't try this because I haven't had the component but I have to complete the schematic for it (my college task :D )

User avatar
Smrtokvitek
Posts: 7
Joined: Sun May 10, 2015 9:09 pm
Location: Czech Republic
Contact:

Re: Anyone working on HD44780 library?

Post by Smrtokvitek » Mon May 11, 2015 12:29 pm

SDA is data and SCL is clock so you should connect data to data and clock to clock ;)

User avatar
yllumi
Posts: 37
Joined: Tue Aug 19, 2014 8:41 am
Location: Bandung, West Java, Indonesia
Contact:

Re: Anyone working on HD44780 library?

Post by yllumi » Tue May 12, 2015 3:34 am

Smrtokvitek wrote:SDA is data and SCL is clock so you should connect data to data and clock to clock ;)
Ok, I get it now. Thanks :D

orsisam
Posts: 9
Joined: Mon Sep 05, 2016 5:58 pm

Re: Anyone working on HD44780 library?

Post by orsisam » Wed Sep 07, 2016 2:46 am

[quote="dhylands"]I wrote a [url=https://github.com/dhylands/python_lcd]python library[/url] which talks to an HD44780 based display which is connected over i2c. This was for the BeagleBoneBlack, and used an LCD module similar to [url=http://arduino-info.wikispaces.com/LCD-Blue-I2C]this one[/url]

The library is split into 2 parts. The lcd.py file knows what commands and stuff to send to the LCD, but not how to get them there.
The i2c_lcd.py file knows how to send commands via i2c to the lcd panel

You can write a replacement for the i2c_lcd.py which talks to the LCD connected directly.

I should port the i2c layer to the pyboard.[/quote]

Hi dhylands,

Can You tell me how to find the i2c address using micropython?

User avatar
dhylands
Posts: 3417
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: Anyone working on HD44780 library?

Post by dhylands » Wed Sep 07, 2016 3:35 am

There are already pyboard versions in the lcd directory.

The files which start with pyb are all for the pyboard.

I guess I should fix the README.md file.

Post Reply