User avatar
antiriad
Posts: 129
Joined: Sun Nov 17, 2013 7:38 pm
Location: Italy
Contact: Twitter

GPIO pins 22-27 and LCD display

Mon Dec 03, 2018 1:19 pm

Hello,
for my arcade project I'm using a VGA "Shield" (hat) on my RPi that leaves the pins 22-27 unused (overlay VGA 666).
Image

I would like to take advantage of it implementing some kind of additional feature like an LCD display (16x2), would this be technically possibile?

Thank you! ;)

pcmanbob
Posts: 4556
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: GPIO pins 22-27 and LCD display

Tue Dec 04, 2018 10:58 pm

If you only use 4bit data then with the Register Select and enable pins you only need 6 gpio. You will have to connect read/write to ground rather a gpio pin.

Just make sure you use a driver module that allows you to set read/write pin to none.
RPLCD version 1.1 allows this option.
Remember we want information.......................no information no help
The use of crystal balls & mind reading is not supported

User avatar
antiriad
Posts: 129
Joined: Sun Nov 17, 2013 7:38 pm
Location: Italy
Contact: Twitter

Re: GPIO pins 22-27 and LCD display

Wed Dec 05, 2018 4:59 pm

Hello and thank you very much for your feedback: unfortunately I'm a total newbye about GPIO and LCD screens, so I could not understand the first part of your answer. ;)

I'm thinking about a 16x2 basic LCD display like this:
https://www.adafruit.com/product/181

Description says that
Can be fully controlled with only 6 digital lines! (Any analog/digital pins can be used)
But it's not clear to me if it will fit, if I should search for a specific LCD model for RPi and so on... from where could I start?

Thank you very much!

scotty101
Posts: 3256
Joined: Fri Jun 08, 2012 6:03 pm

Re: GPIO pins 22-27 and LCD display

Wed Dec 05, 2018 5:14 pm

The adafruit website has instruction for using that LCD with the raspberry pi.
https://learn.adafruit.com/character-lc ... cuitpython

The guide does pick some specific GPIO pins but you can choose any of the other free GPIO pins.
Electronic and Computer Engineer
Pi Interests: Home Automation, IOT, Python and Tkinter

pcmanbob
Posts: 4556
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: GPIO pins 22-27 and LCD display

Wed Dec 05, 2018 7:24 pm

antiriad wrote:
Wed Dec 05, 2018 4:59 pm

I'm thinking about a 16x2 basic LCD display like this:
https://www.adafruit.com/product/181

Description says that
Can be fully controlled with only 6 digital lines! (Any analog/digital pins can be used)
But it's not clear to me if it will fit, if I should search for a specific LCD model for RPi and so on... from where could I start?
So that is a HDD44780 compatible LCD which is what I assumed you were talking about it clearly states only 6 digital lines required, so that's 6 gpio the pi gpio being digital.

Now there are lots and lots of examples on line https://www.google.com/search?q=16x2+lc ... =firefox-b of how to use this type of lcd with the pi you are just going to have to modify which ever example you choose to follow to use the free gpio you have.

I suggested RPLCD ver 1.1 because I know it works and has lots of built in functionality
https://pypi.org/project/RPLCD/
https://rplcd.readthedocs.io/en/stable/
it also works with python2 and 3 as long as you install it for which ever version of python you intend to use, it also has the option for you to choose which gpio pins you want to use for which functions ( remember I said 4bit data then with the Register Select and enable pins you only need 6 gpio ).

you might benefit from installing it using one of the examples so you get to understand how it works, of course you will have remove the vga add on first then once you understand you can change the gpio used to the ones you have free once the vga add on is installed.
Remember we want information.......................no information no help
The use of crystal balls & mind reading is not supported

User avatar
antiriad
Posts: 129
Joined: Sun Nov 17, 2013 7:38 pm
Location: Italy
Contact: Twitter

Re: GPIO pins 22-27 and LCD display

Mon Dec 10, 2018 2:55 pm

Thank you very, very much for all your feedback.
After reading more in depth, I have more informations and inevitable new questions. :D

At first, I am obliged to use LCDproc since the software that sends information to display is set up for this.

I've seen some LCD2USB boards that, of course, are supported by LCDproc and should make everything easier, nevertheless I'd really like to find a (solderless) solution to exploit that unused pins on the VGA hat.

So, aside from LCD2USB boards, I wonder which connection board (I2C?) is OK to connect the LCD display to the pins of the VGA hat (I prefer a solderless solution so I'd like to buy display + connection board yet assembled).

Thank you again!

pcmanbob
Posts: 4556
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: GPIO pins 22-27 and LCD display

Mon Dec 10, 2018 7:16 pm

If you intend to use specific software then I suggest you contact the writer of the software to see if it can be configured to drive the LCD using only the gpio pins you have free.

As the software seems to be written to use usb, serial and parallel ports for connecting to the LCD you may find you will not be able to use it with the limited gpio you have free.
Remember we want information.......................no information no help
The use of crystal balls & mind reading is not supported

Return to “HATs and other add-ons”