deangabber
Posts: 1
Joined: Fri Jan 24, 2014 3:44 pm

Using a 80x8 LED display

Fri Jan 24, 2014 4:08 pm

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
ldp_8008.tar.gz
(4 KiB) Downloaded 953 times
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
led2.jpg
led2.jpg (62.57 KiB) Viewed 12292 times
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

User avatar
kimondouk
Posts: 5
Joined: Sat Jul 14, 2012 6:24 pm
Location: London
Contact: Website

Re: Using a 80x8 LED display

Thu Apr 17, 2014 5:58 pm

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.

User avatar
kimondouk
Posts: 5
Joined: Sat Jul 14, 2012 6:24 pm
Location: London
Contact: Website

Re: Using a 80x8 LED display

Sat Apr 19, 2014 4:13 pm

Oops it's labelled on the board = lower pin is ground. Have just attached it to a USB power supply and it works fine.

User avatar
sav25
Posts: 364
Joined: Thu Aug 30, 2012 7:18 pm
Location: Southend-on-Sea, Essex, UK
Contact: Website Twitter

Re: Using a 80x8 LED display

Sat Apr 19, 2014 5:07 pm

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).
Averagemaker.com

bnsracing
Posts: 1
Joined: Sat Jul 19, 2014 4:57 am

Re: Using a 80x8 LED display

Sat Jul 19, 2014 5:03 am

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

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

Re: Using a 80x8 LED display

Sat Jul 19, 2014 11:33 am

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).
You may be interested in what I did with two MCP23008's (easier to connect to the 8x8 matrix), albeit some time ago:
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.
Still running Raspbian Jessie on some older Pi's (an A, B1, B2, B+, P2B, 3xP0, P0W) but Stretch on my 2xP3A+, P3B+, P3B, B+, A+ and a B2. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

popeyesfx
Posts: 14
Joined: Sun Sep 30, 2012 5:53 pm
Location: Notts

Re: Using a 80x8 LED display

Fri Sep 05, 2014 3:35 pm

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

User avatar
DougieLawson
Posts: 34166
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Using a 80x8 LED display

Sun Sep 07, 2014 8:41 pm

popeyesfx 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
https://github.com/DougieLawson/Raspber ... ter/matrix
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

popeyesfx
Posts: 14
Joined: Sun Sep 30, 2012 5:53 pm
Location: Notts

Re: Using a 80x8 LED display

Mon Sep 08, 2014 1:13 pm

Thanks for the link, will check it out.
Cheers

Amanwhocan
Posts: 5
Joined: Thu Feb 12, 2015 3:21 am

Re: Using a 80x8 LED display

Thu Feb 12, 2015 3:34 am

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)

GrumpyPadre
Posts: 2
Joined: Sat Mar 21, 2015 6:27 am

Re: Using a 80x8 LED display

Sat Mar 21, 2015 8:58 pm

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

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 11088
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Using a 80x8 LED display

Sat Mar 21, 2015 10:49 pm

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.

GrumpyPadre
Posts: 2
Joined: Sat Mar 21, 2015 6:27 am

Re: Using a 80x8 LED display

Tue Mar 24, 2015 6:04 pm

Thanks

rodm
Posts: 2
Joined: Mon Feb 23, 2015 11:12 am

Re: Using a 80x8 LED display

Wed Apr 15, 2015 12:34 pm

This was fantastic - thanks Peter. I took your work and did a bunch with it. Very fun!
  • 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
Let me know if you have any issues?

Documented it in a blog
http://rods-stuff.blogspot.com.au/2015/ ... berry.html

dalveer
Posts: 3
Joined: Sat Oct 31, 2015 7:28 am

Re: Using a 80x8 LED display

Mon Nov 16, 2015 9:05 am

Everyone loves a colorful LED screen! Our 16x32 RGB LED display is a low cost, and easy-to-use arrangement of bright LEDs - just like the ones used in Times Square! This display makes a fantastic addition to your Raspberry Pi. It is pretty easy to wire up, but the display is quite demanding when it comes to getting it to display something...luckily this tutorial has all the code you need to get blinky
https://www.robomart.com/led

rodm
Posts: 2
Joined: Mon Feb 23, 2015 11:12 am

Re: Using a 80x8 LED display

Thu Nov 26, 2015 5:02 am

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

User avatar
DougieLawson
Posts: 34166
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Using a 80x8 LED display

Thu Nov 26, 2015 10:52 am

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.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

anigwei
Posts: 1
Joined: Mon Dec 12, 2016 10:24 am

Re: Using a 80x8 LED display

Mon Dec 12, 2016 10:26 am

Hi,

Knowing that the signals are TTL... what maximum cable length do you think it will support?

Thanks!

Handy4u59
Posts: 1
Joined: Sat Jun 03, 2017 12:55 pm

Re: Using a 80x8 LED display

Sat Jun 03, 2017 1:01 pm

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

Return to “Other projects”