Arduino Forum

Using Arduino => LEDs and Multiplexing => Topic started by: CrossRoads on Sep 28, 2012, 05:54 pm

Title: 8 x 32 display
Post by: CrossRoads on Sep 28, 2012, 05:54 pm
Hi gang,
I recently received some 8x8 matrix displays, and was asked how to connect them up for a scrolling display.
I came up with these 2 examples.
I've got some MAX7219's on order from taydaelectronics ($1.25 each), and a big piece (180mm x 300mm) of perfboard (the digits are 60mm square), and expect to be wiring up the lower example shortly.
I've got 5x8 fonts layed out, and some ideas about how I'll be scrolling based on a rolling pointer idea, and accepting input from the serial port, so I think it will be interesting.
Maybe go from there to a 16x16 layout and play with some graphics somehow.

[EDIT: I've changed my design to use a seperate slave select for each pin, as described in the code listing below]
Title: Re: 8 x 32 display
Post by: JoeN on Sep 28, 2012, 11:56 pm
If I am reading the top schematic right you are using a 74HC595 to select your anode (rows) on the matrices so the 595 is the source of current.  I thought they were terrible current sources.  Won't you need a PNP transistor or a p-channel MOSFET in there somewhere as a better current source?  And why not just us a 74HC138 decoder instead of a shift register anyway - that provides high on all lines except low on the selected line which is a natural fit for the current source.
Title: Re: 8 x 32 display
Post by: CrossRoads on Sep 29, 2012, 03:32 am
Yes, 74HC595 not very good - have to limit current to 8-9mA to keep total current down to 70mA.
74HC138 is worse - 4mA, and 50mA total.
http://www.ti.com/lit/ds/symlink/sn74hc138.pdf
http://www.ti.com/lit/ds/symlink/cd74hc138.pdf

Using the MAX7219 is way more efficient way to go and frees up the processor to be doing other stuff.
Title: Re: 8 x 32 display
Post by: Osgeld on Sep 29, 2012, 03:40 am
lol you could do what I did on my 32x32 matrix and just piggy back the 595's effectively doubling the current capacity (or get some of those "high current" models)

http://www.digikey.com/product-detail/en/TPIC6B595N/296-1956-5-ND/277601
Title: Re: 8 x 32 display
Post by: fungus on Sep 29, 2012, 02:13 pm

I've got some MAX7219's on order from taydaelectronics ($1.25 each), and a big piece (180mm x 300mm) of perfboard (the digits are 60mm square), and expect to be wiring up the lower example shortly.


MAX7219s make this sort of thing incredibly easy. It almost feels like cheating.
Title: Re: 8 x 32 display
Post by: CrossRoads on Sep 29, 2012, 04:09 pm
Having the multiplexing taken out of the software does make the programming a little easier, allows the hardware design to be more compact, probably brings the build cost down, and with fewer components increases reliability also.
Here's my program to run the board so far, and the fonts I created for it (couple a punctuation things added also).
Could probably do the serial input to font mapping a little cleaner, will see how it works when I actually get it built up.
Could probably do with some functionizing also. I like to see clearly what the program is doing and I'm going for speed/responsiveness. Not going to run out of flash, so am not particularly concerned about program length.
Title: Re: 8 x 32 display
Post by: fungus on Sep 29, 2012, 05:38 pm

Having the multiplexing taken out of the software does make the programming a little easier


One of the hardest parts of programming this sort of thing is keeping the main loop free-running (non-blocking) and interleaved with the display update code.

With a MAX7219 you can go off and do something time consuming with the CPU and the display will take care of itself.
Title: Re: 8 x 32 display
Post by: The_Doctor on Oct 01, 2012, 07:29 pm
Hi!

what's the shipping cost from Tayda electronics?
Title: Re: 8 x 32 display
Post by: CrossRoads on Oct 01, 2012, 08:21 pm
I bought 8 7219', bunch of different resistors, some other small parts, couple small toggle switches. $16.56 parts total, $1.80 shipping. Smallish padded envelope.

Parts arrived from a Colorado address quite quickly.

Prior order: $38.76 parts total with a bunch of pots, knobs, push buttons, battery holders, lot more bulk: $8.99 shipping
Title: Re: 8 x 32 display
Post by: Aaron_dyer on Oct 01, 2012, 08:57 pm
I am currently trying to build a similar project. I have 4    8 x 8 LED matrices but once aligned up next to each other it makes the 32 x 8 layout.  I am thinking of going with the Mega 2560 on this project so I can have more outputs......But I am running out of referneces when it comes to the wiring it all up......I know 74595 are not very efficient. I found this site on arduino tutorial:

http://arduino.cc/en/Tutorial/ShiftOut

But this isn't the first time I've seen the info on the Maxim7219...Check this site here:

http://www.planetarduino.org/?cat=435

But Like I said I'm trying to cascade it all so it can drive 4 matrices......I'd like to make an audio analyzer like this guy has here:

http://www.youtube.com/watch?v=Iv_IaonLjCM

Does anyone know how to hook them up as a cascaded row  ????/  Just 4  8x8  LED matrices...

I have the data sheets on the rows and columns and such..I just want to be able to know if this is correct
Title: Re: 8 x 32 display
Post by: CrossRoads on Oct 01, 2012, 09:56 pm
Did you see the diagram in the first post? I think that's pretty clear. Use SPI for fast updates, and see the code listing in #5 for a way to create an array that represents the state of the display. Update the array, send it out.
Title: Re: 8 x 32 display
Post by: Aaron_dyer on Oct 02, 2012, 05:01 am
Yes the SPI pinouts make sense, but I just wasn't too sure about the asynchronous data in the max7219 and synchronous SPI inputs to them. Thanks for the direction
Title: Re: 8 x 32 display
Post by: Aaron_dyer on Nov 07, 2012, 04:20 am
crossroads,

I'm looking at your block diagram in this forum and if I'm interpreting it correctly, you dont have the data pins in parallel...you have the data out pin on each max7219 interfacing the next chips data in pin...Thats what I was trying to say about the website on the playground earlier......

Then I don't get the ss0-ss3 now...

I'm about to scrap the mega2560 for this and try it with an Uno or Duelminove....
Title: Re: 8 x 32 display
Post by: CrossRoads on Nov 07, 2012, 05:16 am
The data pins are definitely in parallel Aaron, as noted in an EDIT to the first post.
The code as written wouldn't work if each device wasn't being addressed seperately.

Here's the latest code that I have running.
Title: Re: 8 x 32 display
Post by: Aaron_dyer on Nov 07, 2012, 05:49 am
Thanks....ill update in the morning
Title: Re: 8 x 32 display
Post by: CrossRoads on Nov 07, 2012, 03:23 pm
The bottom is the updated Block Diagram of what I have running.
Title: Re: 8 x 32 display
Post by: Aaron_dyer on Nov 07, 2012, 03:34 pm
This is exactly how I have it wired up...

and as you use ss 10 , 9, 8 and 7..

I use  53, 49, 48, and 47  (Because 50 - 52 are the other SPI pins)


I'm just torn between what we have and what this playground site says to do:

http://www.arduino.cc/playground/Main/MAX72XXHardware


its saying the Load and Clk are in parallel but the data (MOSI) needs to be cascaded for the syncing into the next matrix...


Title: Re: 8 x 32 display
Post by: bratan on Nov 07, 2012, 09:03 pm

The data pins are definitely in parallel Aaron, as noted in an EDIT to the first post.
The code as written wouldn't work if each device wasn't being addressed seperately.

Here's the latest code that I have running.

Whoa, I was just making almost same exact schematic yesterday. How did you interconnect SEG pins between 2 MAX7219 chips? Did you use diodes?
Title: Re: 8 x 32 display
Post by: CrossRoads on Nov 07, 2012, 09:20 pm
I'm only using 1 color. I wasn't aware I had dual color parts when I started, only discovered that after wiring up the first one and seeing all the extra pins.
Back to the internet at that point for a better datasheet. Found a part number on the artwork on the bottom of the matrix that led to a datasheet that better reflected the part, vs the marking on the side.