Anyone working on HD44780 library?
Re: Anyone working on HD44780 library?
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.
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.
Re: Anyone working on HD44780 library?
It appears to work now, so either I was messing up something before inadvertently, or the new firmware fixed it. Thanks Dave.
- polygontwist
- Posts: 36
- Joined: Sat Jun 28, 2014 4:54 pm
- Location: Germany, Rostock
- Contact:
Re: Anyone working on HD44780 library?
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?).
Re: Anyone working on HD44780 library?
Thanks for the revised URL.
The wiring is pretty much arbitrary and needs to match whatever you call GpioLcd with. So, my example had:
The pinout on the HD44780 LCDs looks like:
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.
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)
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
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.
Re: Anyone working on HD44780 library?
I've used hobbytronics serial adapter and that vastly simplies handling of those LCDs (although it another part in the project).
Re: Anyone working on HD44780 library?
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 )
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 )
- Smrtokvitek
- Posts: 7
- Joined: Sun May 10, 2015 9:09 pm
- Location: Czech Republic
- Contact:
Re: Anyone working on HD44780 library?
SDA is data and SCL is clock so you should connect data to data and clock to clock
Re: Anyone working on HD44780 library?
Ok, I get it now. ThanksSmrtokvitek wrote:SDA is data and SCL is clock so you should connect data to data and clock to clock
Re: Anyone working on HD44780 library?
[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?
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?
Re: Anyone working on HD44780 library?
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.
The files which start with pyb are all for the pyboard.
I guess I should fix the README.md file.