When I received a Raspberry Pi for Christmas it was a little like "Coals to Newcastle"
because my day job is working with UNIX systems.
But the great thing about the Raspberry Pi, which sets it apart from other systems, is the General Purpose IO pins.
My first thought about what do with my Pi was to hook it up to an LED display.
I looked around on eBay and came across the LDP-8008 from Embedded Adventures.
This has 80 columns by 8 rows of led's and was perfect for what I needed.
Reading through the Data sheet for the LDP-8008 was a bit confusing at first because some parts of the
document relate to a 16 row display. It explains reasonably well what you need to do to get the display
working.
I connected up the GPIO pins of the Pi to the LDP-8008 in the following way.
###############################################
# connect Raspberry Pi GPIO to J1 on LDP-8008
###############################################
# GPIO pin LDP-8008 pin
# 3 ------------> 2 A (Row address)
# 5 ------------> 4 B (Row address)
# 6 ------------> 5 GND
# 7 ------------> 6 C (Row address)
# 8 ------------> 7 EN (Enable Display)
# 10 ------------> 8 D (Row address)
# 11 ------------> 9 \R1 (Red Led)
# 12 ------------> 10 \G1 (Green Led)
# 13 ------------> 14 L (Latch)
# 15 ------------> 16 S (Shift)
###############################################
The document went on a bit about the need for a 5V 2.5 amp power supply, but to my surprise
I found it worked without any power supply connections at all!
The main thing to remember is that the LDP-8008 has an 80 bit shift register that you must shift
one row's worth of column data into. You then select which of the 8 rows you want that data to show on.
I created a python module (ldp.py) to make it easier to write python scripts without worrying about pin numbers.
This module, a font module and 2 example scripts are included in a compressed tar file
The example scripts are called static and scroll. I'll leave you to work out what they do.
To use my examples you must have previously installed the RPi.GPIO module. You can get it from here:
http://sourceforge.net/projects/raspberry-gpio-python/
My Pi came with this module pre-loaded.
You can copy my zipped tar file to your Pi and then extract it with:
tar xvzf ldp_8008.tar.gz
Assuming you have connected the LDP-8008 to your Pi as shown above you can then try this:
sudo ./scroll "Raspberry Pi" 1
The 2 example python scripts need 2 args. The first is your required text string and the second is the
led colour. 1 for red, 2 for green and 3 for orange.
Type CTRL-C to terminate the script.
Enjoy
Pete Goss
-
- Posts: 1
- Joined: Fri Jan 24, 2014 3:44 pm
Re: Using a 80x8 LED display
Works really well - how do I boost power to the display? this works but flickers quite a bit on my model A - and the 2 power pins in the centre of the board aren't labeled in the datasheet.
Re: Using a 80x8 LED display
Oops it's labelled on the board = lower pin is ground. Have just attached it to a USB power supply and it works fine.
- sav25
- Authorised Reseller
- Posts: 465
- Joined: Thu Aug 30, 2012 7:18 pm
- Location: Southend-on-Sea, Essex, UK
Re: Using a 80x8 LED display
This looks great but I'm not confident with any kind of matrix now after failing miserably with just a simple 8x8 matrix unit - had light bleeding everywhere when trying to mulitplex (with MCP23017).
Re: Using a 80x8 LED display
Hi there - apologies for any inherent dumbness, I'm a super noob - I bought a Pi for the purposes of testing this tutorial and seeing if I could write a custom script to drive data to it.
In theory I'm all set with the updated python software; I've downloaded the scripts to my Pi. My first stab at connecting the 8008 gave no lights whatsoever; I tried a few things, and found that I could get some of the rows to light up, but fully seating the connection would cause the Pi to shut down. I did things the proper way and I'm fairly sure I'm connected the right way round, pin 1 to pin 1 etc, but not 100% sure, because it's been a long time since I diddled with any electronics.
I'm assuming I'm hitting the brownout sensor, or whatever it's called. You all seem to be having ok luck without an additional power source - any idea what's happening to me? Is the newer Pi more sensitive to power problems? Am I plugged in the wrong way? Some super basic help would be very much appreciated.
thanks
jason
In theory I'm all set with the updated python software; I've downloaded the scripts to my Pi. My first stab at connecting the 8008 gave no lights whatsoever; I tried a few things, and found that I could get some of the rows to light up, but fully seating the connection would cause the Pi to shut down. I did things the proper way and I'm fairly sure I'm connected the right way round, pin 1 to pin 1 etc, but not 100% sure, because it's been a long time since I diddled with any electronics.
I'm assuming I'm hitting the brownout sensor, or whatever it's called. You all seem to be having ok luck without an additional power source - any idea what's happening to me? Is the newer Pi more sensitive to power problems? Am I plugged in the wrong way? Some super basic help would be very much appreciated.
thanks
jason
- FTrevorGowen
- Forum Moderator
- Posts: 7257
- Joined: Mon Mar 04, 2013 6:12 pm
- Location: Bristol, U.K.
Re: Using a 80x8 LED display
You may be interested in what I did with two MCP23008's (easier to connect to the 8x8 matrix), albeit some time ago:sav25 wrote:This looks great but I'm not confident with any kind of matrix now after failing miserably with just a simple 8x8 matrix unit - had light bleeding everywhere when trying to mulitplex (with MCP23017).
http://www.cpmspectrepi.webspace.virgin ... blePi.html
but "hardware multiplexed devices" are easier to use:
http://www.cpmspectrepi.webspace.virgin ... odule.html
(FWIW, a "snapshot" of 'C' demonstration software for various "GPIO projects" including the above can be found at:
http://www.cpmspectrepi.webspace.virgin ... tware.html )
Trev.
Testing Bookworm on a Pi5 and a P4B but running Bullseye or Buster on other (older) Pi's and the P400 I often post from. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm for notes & screenshots etc.
Re: Using a 80x8 LED display
Hi
Do you have the source code for the scroll and static demo's. I would like to play around with them as I am new to led matrices and not sure what I'm doing. YET
cheers
Do you have the source code for the scroll and static demo's. I would like to play around with them as I am new to led matrices and not sure what I'm doing. YET
cheers
- DougieLawson
- Posts: 42760
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
Re: Using a 80x8 LED display
https://github.com/DougieLawson/Raspber ... ter/matrixpopeyesfx wrote:Hi
Do you have the source code for the scroll and static demo's. I would like to play around with them as I am new to led matrices and not sure what I'm doing. YET
cheers
Languages using left-hand whitespace for syntax are ridiculous
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
Re: Using a 80x8 LED display
Thanks for the link, will check it out.
Cheers
Cheers
-
- Posts: 6
- Joined: Thu Feb 12, 2015 3:21 am
Re: Using a 80x8 LED display
Hi there
In the ldp.py file, as far as I can tell, the line in the elif n ==2: section that says gpio.output(B,2) is this wrong?
Please confirm
Could you give me advice on how to get this to work with a 64 x 16 panel instead of the 80 x 8 one, the differences would give me a greater insight into how this works, best regards, Amanwhocan
elif n == 3:
gpio.output(A,1)
gpio.output(B,1)
gpio.output(C,0)
gpio.output(D,0)
elif n == 2:
gpio.output(A,0)
gpio.output(B,2)
gpio.output(C,0)
gpio.output(D,0)
elif n == 1:
gpio.output(A,1)
gpio.output(B,0)
gpio.output(C,0)
gpio.output(D,0)
else:
gpio.output(A,0)
gpio.output(B,0)
gpio.output(C,0)
gpio.output(D,0)
In the ldp.py file, as far as I can tell, the line in the elif n ==2: section that says gpio.output(B,2) is this wrong?
Please confirm
Could you give me advice on how to get this to work with a 64 x 16 panel instead of the 80 x 8 one, the differences would give me a greater insight into how this works, best regards, Amanwhocan
elif n == 3:
gpio.output(A,1)
gpio.output(B,1)
gpio.output(C,0)
gpio.output(D,0)
elif n == 2:
gpio.output(A,0)
gpio.output(B,2)
gpio.output(C,0)
gpio.output(D,0)
elif n == 1:
gpio.output(A,1)
gpio.output(B,0)
gpio.output(C,0)
gpio.output(D,0)
else:
gpio.output(A,0)
gpio.output(B,0)
gpio.output(C,0)
gpio.output(D,0)
-
- Posts: 2
- Joined: Sat Mar 21, 2015 6:27 am
Re: Using a 80x8 LED display
I'm a noob at Raspberry and 8008, I looked at the pin outs and the picture and was wondering is there a cable you can buy that matches the pin outs. The one in the picture looks like a professionally made one, If not is there a reference somewhere that tells me how to make the cable ?
Thanks
Thanks
- mahjongg
- Forum Moderator
- Posts: 15100
- Joined: Sun Mar 11, 2012 12:19 am
- Location: South Holland, The Netherlands
Re: Using a 80x8 LED display
Its simply a 40 pole flat cable, with isolation displacement (IDE) connectors, this one seems to have been made by hand, as ready mades do not use "rainbow flatcable". Perhaps you have a box with old computer cables, but if you do, don't use 80-wire cables, even though they seem to fit, they are for PATA harddisks, and connect several pins together, read this pitfall sticky: http://www.raspberrypi.org/forums/viewt ... f9#p665572
i'm sure you can buy ready mades.
i'm sure you can buy ready mades.
-
- Posts: 2
- Joined: Sat Mar 21, 2015 6:27 am
Re: Using a 80x8 LED display
Thanks
Re: Using a 80x8 LED display
This was fantastic - thanks Peter. I took your work and did a bunch with it. Very fun!
Documented it in a blog
http://rods-stuff.blogspot.com.au/2015/ ... berry.html
- made it so the pi could also receive requests and display them
- created some functions combining your scroll and static functions
- Added in some lookup tram functionality
- Used your core functionality to create a way to display any pattern on the matrix
Documented it in a blog
http://rods-stuff.blogspot.com.au/2015/ ... berry.html
Re: Using a 80x8 LED display
Hey Peter,
just fired this up on a raspberry 2, and it looks like it didn't work. Looking at the GPIO pin config (the pictures anyway), they looked the same to me - just more pins at the end. Do you know if it should just work with the new Pi, or there needs to be some code changes?
Thanks heaps (and have had lots of fun with this)
Rod
just fired this up on a raspberry 2, and it looks like it didn't work. Looking at the GPIO pin config (the pictures anyway), they looked the same to me - just more pins at the end. Do you know if it should just work with the new Pi, or there needs to be some code changes?
Thanks heaps (and have had lots of fun with this)
Rod
- DougieLawson
- Posts: 42760
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
Re: Using a 80x8 LED display
The first 26 hardware pins on a B+/A+/2B/PiZero are 100% identical to the pins on an old B/A. So everything should work as before.
http://pinout.xyz/ has an interactive diagram.
http://pinout.xyz/ has an interactive diagram.
Languages using left-hand whitespace for syntax are ridiculous
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
Re: Using a 80x8 LED display
Hi,
Knowing that the signals are TTL... what maximum cable length do you think it will support?
Thanks!
Knowing that the signals are TTL... what maximum cable length do you think it will support?
Thanks!
Re: Using a 80x8 LED display
I just completed assembling and testing my Pi 3B and 80x8 display and it works great. The display did scroll way too fast. I added a time.sleep(.025) in the code as shown below which now gives me the ability to change the scroll speed. I think I will modify the code so I can pass the scroll speed as an argument next.
# function to read the matrix array and output the values to the display device
#
def showmatrix():
ldp.displayoff()
time.sleep(.025)
for row in reversed(range(8)):
for col in reversed(range(80)):
ldp.colourshift(matrix[row][col])
ldp.showrow(row)
# end def
# function to read the matrix array and output the values to the display device
#
def showmatrix():
ldp.displayoff()
time.sleep(.025)
for row in reversed(range(8)):
for col in reversed(range(80)):
ldp.colourshift(matrix[row][col])
ldp.showrow(row)
# end def