exzile
Posts: 132
Joined: Sun Jul 20, 2014 5:33 am

Re: 16x2 LCD I2C help

Fri Oct 03, 2014 12:51 pm

I ordered one. I will test it out and see if I can figure out how it works.
It is using the same PCF chip that I have. I Think it might have a level shifter on, which is what I may need to make mine work. I will test it out and get a level shifter in my current project to see if I can get both types of LCD working (with and without that i2c backpack). I will try to post a pic of my setup when I get my level shifter.

exzile
Posts: 132
Joined: Sun Jul 20, 2014 5:33 am

Re: 16x2 LCD I2C help

Sat Oct 04, 2014 1:50 am

I also got my 4 Bi-Directional Level Shifter Adafruit BSS138 & a new PCF8574AP Chip. After doing some reading I know I can use these to talk to the LCD screen. I just can't find any documentation on hooking up this Level Shifter with a PCF chip.
Anyone use this and know how it should be hooked up?

exzile
Posts: 132
Joined: Sun Jul 20, 2014 5:33 am

Re: 16x2 LCD I2C help

Sat Oct 04, 2014 5:32 am

So I got it to power up and show a line of blocks. The whole time the issue was I did not have a pentotiometer hooked up, so I couldn't see anything.

Now the issue is nothing is really coming up on the screen. I am using the following code/configuration

http://www.rpiblog.com/2012/07/interfac ... ry-pi.html

0x0C make a line indicator flash.
0x0f makes the indicator move to the right.
I am set on address 0x38 for i2c and reverse.

Can someone give me some help here please?

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 5619
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: 16x2 LCD I2C help

Sat Oct 04, 2014 10:10 am

exzile wrote:So I got it to power up and show a line of blocks.
...
That's an "un-initialised" display, as shown here:
http://www.cpmspectrepi.webspace.virgin ... D_Displays_...
(albeit for a different physical interface), and here:
http://www.cpmspectrepi.webspace.virgin ... erial.html
(about half-way down the page).
Full details of the command codes, and the difference between writing commands and data (characters) are in the datasheet:
http://www.hobbytronics.co.uk/datasheets/HD44780.pdf (which hopefully you have read)
Trev.
Still running Raspbian Jessie or Stretch on some older Pi's (an A, B1, 2xB2, B+, P2B, 3xP0, P0W, 2xP3A+, P3B+, P3B, B+, and a A+) but Buster on the P4B's. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

exzile
Posts: 132
Joined: Sun Jul 20, 2014 5:33 am

Re: 16x2 LCD I2C help

Sun Oct 05, 2014 5:38 am

Yea but I was hoping for a solution to initialize it. The link I shared previously is the library I am using 'pylcdlib'.
None of the code seems to work in any of the libraries with my LCD. I also have it wired the same as the tutorial.

exzile
Posts: 132
Joined: Sun Jul 20, 2014 5:33 am

Re: 16x2 LCD I2C help

Sun Oct 05, 2014 5:48 am

Nevermind. After looking down the page comments I notice that two wires had to be switched. So I switched it and now it is working. Thanks for all the help guys, you made this a great learning experience.

Lomoss7
Posts: 2
Joined: Wed Dec 31, 2014 3:59 pm

Re: 16x2 LCD I2C help

Wed Dec 31, 2014 4:17 pm

Hi

I have just purchased the http://www.hobbytronics.co.uk/i2clcd-backpack-v2 and Character display. Its along time (25 yrs) since I did any coding. So a complete idiots guide to getting it working would be appreciated.

My main reason for this choice is the i2c, which if I am right is USB. I have a project idea with would require the use of the Pi USB and not the GPIO pins.

Thanks

Hall

exzile
Posts: 132
Joined: Sun Jul 20, 2014 5:33 am

Re: 16x2 LCD I2C help

Wed Dec 31, 2014 6:06 pm

I don't think I2C is usb, UTX RTX maybe?
You bought the ready to go lcd setup, which is what I wish I would have done instead of buying a port expander and figuring it out myself.

Use google and you will find many resources on how to hook up and code it. There are many projects and tutorials out there I came across on google.

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 5619
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: 16x2 LCD I2C help

Thu Jan 01, 2015 7:25 pm

Lomoss7 wrote:Hi
I have just purchased the http://www.hobbytronics.co.uk/i2clcd-backpack-v2 and Character display. Its along time (25 yrs) since I did any coding. So a complete idiots guide to getting it working would be appreciated.
...
FWIW, that was the first "backpack" I used:
http://www.cpmspectrepi.webspace.virgin ... ackpack_V2
http://www.cpmspectrepi.webspace.virgin ... _Interface
http://www.cpmspectrepi.webspace.virgin ... i2c_demo.c
Trev.
Still running Raspbian Jessie or Stretch on some older Pi's (an A, B1, 2xB2, B+, P2B, 3xP0, P0W, 2xP3A+, P3B+, P3B, B+, and a A+) but Buster on the P4B's. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

Return to “Interfacing (DSI, CSI, I2C, etc.)”