Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 242
Posts: 16485
Available for Design & Build services
|
 |
« on: September 28, 2012, 10:54:55 am » |
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]
|
|
|
|
« Last Edit: October 01, 2012, 02:54:53 pm by CrossRoads »
|
Logged
|
|
|
|
|
Samplefinger
Offline
God Member
Karma: 8
Posts: 819
ALWAYS ASK FOR THREE. One to use. One to lose. One to abuse.
|
 |
« Reply #1 on: September 28, 2012, 04:56:50 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.
|
|
|
|
|
Logged
|
Latest Sampling Scores: ATXMEGA64A3U-MH x3, ATXMEGA256A3U-MH x3, SST38VF6404-90-5C-EKE x3, SST38VF6402-90-5C-EKE x3, PGA870 x3, THS770006 x3
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 242
Posts: 16485
Available for Design & Build services
|
 |
« Reply #2 on: September 28, 2012, 08:32:29 pm » |
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.pdfhttp://www.ti.com/lit/ds/symlink/cd74hc138.pdfUsing the MAX7219 is way more efficient way to go and frees up the processor to be doing other stuff.
|
|
|
|
|
Logged
|
|
|
|
|
SE USA
Offline
Faraday Member
Karma: 33
Posts: 3619
@ssh0le
|
 |
« Reply #3 on: September 28, 2012, 08:40:54 pm » |
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
|
|
|
|
|
Logged
|
http://arduino.cc/forum/index.php?action=unread;boards=2,3,4,5,67,6,7,8,9,10,11,66,12,13,15,14,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,86,87,89,1;ALL
|
|
|
|
Valencia, Spain
Offline
Edison Member
Karma: 65
Posts: 2237
|
 |
« Reply #4 on: September 29, 2012, 07:13:48 am » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 242
Posts: 16485
Available for Design & Build services
|
 |
« Reply #5 on: September 29, 2012, 09:09:23 am » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
Valencia, Spain
Offline
Edison Member
Karma: 65
Posts: 2237
|
 |
« Reply #6 on: September 29, 2012, 10:38:11 am » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 12
|
 |
« Reply #7 on: October 01, 2012, 12:29:42 pm » |
Hi!
what's the shipping cost from Tayda electronics?
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 242
Posts: 16485
Available for Design & Build services
|
 |
« Reply #8 on: October 01, 2012, 01:21:57 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
|
|
|
|
|
Logged
|
|
|
|
|
Raleigh, NC.
Offline
Full Member
Karma: 0
Posts: 129
Addicted to Arduino
|
 |
« Reply #9 on: October 01, 2012, 01:57:44 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/ShiftOutBut this isn't the first time I've seen the info on the Maxim7219...Check this site here: http://www.planetarduino.org/?cat=435But 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: 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
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 242
Posts: 16485
Available for Design & Build services
|
 |
« Reply #10 on: October 01, 2012, 02:56:41 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.
|
|
|
|
|
Logged
|
|
|
|
|
Raleigh, NC.
Offline
Full Member
Karma: 0
Posts: 129
Addicted to Arduino
|
 |
« Reply #11 on: October 01, 2012, 10:01:43 pm » |
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
|
|
|
|
|
Logged
|
|
|
|
|
Raleigh, NC.
Offline
Full Member
Karma: 0
Posts: 129
Addicted to Arduino
|
 |
« Reply #12 on: November 06, 2012, 10:20:04 pm » |
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....
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 242
Posts: 16485
Available for Design & Build services
|
 |
« Reply #13 on: November 06, 2012, 11:16:06 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.
|
|
|
|
« Last Edit: November 06, 2012, 11:21:14 pm by CrossRoads »
|
Logged
|
|
|
|
|
Raleigh, NC.
Offline
Full Member
Karma: 0
Posts: 129
Addicted to Arduino
|
 |
« Reply #14 on: November 06, 2012, 11:49:05 pm » |
Thanks....ill update in the morning
|
|
|
|
|
Logged
|
|
|
|
|
|