Raleigh, NC.
Offline
Full Member
Karma: 0
Posts: 129
Addicted to Arduino
|
 |
« Reply #60 on: November 06, 2012, 07:35:42 pm » |
Taken from the Playground site we are mentioning here...I have it in my posting about the scrolling on matrices.....
"By no means these 2 capacitors can be ommitted (Left out), as it might lead to sporadic or permanent malfunctions. These types of errors are really hard to track down. Both capacitors must be placed as near as possible to the V+ and the Gnd pins of the MAX72XX. "
I need to re place the caps closer.....and not just on Vcc and ground planes.....
|
|
|
|
|
Logged
|
|
|
|
|
Raleigh, NC.
Offline
Full Member
Karma: 0
Posts: 129
Addicted to Arduino
|
 |
« Reply #61 on: November 06, 2012, 07:43:49 pm » |
Now I'm getting conused again......
this is taken from the playground website:
"If you read the datasheet for the MAX72XX you know that the drivers can be cascaded by simply connecting the signal DOut from one chip to DIn on the next chip. The signals Clk and Load(/CS) have to be connected in parallel to each MAX72XX. There is no strict limit as to how many drivers can be cascaded that way."
I don't have the Loads connected in parallel...they are set up from ss0-ss3 individually from the arduino I/Os 53, 49, 48 and 47......
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 240
Posts: 16465
Available for Design & Build services
|
 |
« Reply #62 on: November 06, 2012, 09:34:39 pm » |
Move the clear digits to immediately after the SPI.begin(); This chunk of code at the end of setup will leave display test on = all LEDs on: byte display_test = 0x0F; // 0x00 = normal, 0x01 = display test mode all on full // dispay test to normal digitalWrite (ss0, LOW); SPI.transfer (display_test); SPI.transfer (0x01); digitalWrite (ss0, HIGH);
I would put in a brief delay, and then set this register to 0 to turn it off.
|
|
|
|
|
Logged
|
|
|
|
|
Raleigh, NC.
Offline
Full Member
Karma: 0
Posts: 129
Addicted to Arduino
|
 |
« Reply #63 on: November 06, 2012, 10:24:53 pm » |
is there anyway you could take the code I pasted before and update it with your updates and repost it.....I'm starting to lose track of everything...I'd appreciate it....
Also one thing I need to be certain of.....
imagine you have your 4 matrices going from left to right with each having the max7219 under them.....
the first max7219 that needs to be interfaced from the arduino is farthest to the right then going from right to left correct? Or is it farthest to the left going to the right.....
I know I'm blowing up these forums...I just want to get this right....
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 240
Posts: 16465
Available for Design & Build services
|
 |
« Reply #64 on: November 06, 2012, 11:31:23 pm » |
#0 is on the left, #3 is on the right. I'll see if I can fix the code up.
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 240
Posts: 16465
Available for Design & Build services
|
 |
« Reply #65 on: November 06, 2012, 11:38:27 pm » |
Try this.
|
|
|
|
|
Logged
|
|
|
|
|
Raleigh, NC.
Offline
Full Member
Karma: 0
Posts: 129
Addicted to Arduino
|
 |
« Reply #66 on: November 06, 2012, 11:47:49 pm » |
Thanks for clearing up the sequence layout.:you have been so helpful.....I'm a junior engineer with a good yr. Arduino time......just wanting this to be right....ill upload in the morning once I do the caps better....need to find some 104's
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 240
Posts: 16465
Available for Design & Build services
|
 |
« Reply #67 on: November 06, 2012, 11:59:05 pm » |
Okay, will be watching.
|
|
|
|
|
Logged
|
|
|
|
|
Raleigh, NC.
Offline
Full Member
Karma: 0
Posts: 129
Addicted to Arduino
|
 |
« Reply #68 on: November 07, 2012, 09:22:14 am » |
ok heres the latest...
I placed all the caps some 10 uF polarized electrolytic and some 0.1 uF (104) ceramic caps on each of the max7219s Vcc line....
I uploaded the code you fixed up for me.....
before, the matrices would just stay on fully 3 of 4 that is.....
now.....they do go out...I'm sure its due to the register clear you mentioned....
However,
I open the serial monitor with the USB stil plugged into the mega 2560 and type hello...
theres nothing on the matrices....but when I press enter after typing hello, the LCD resets.....
I made sure the layout sequence of the matrices was correct right...and Ohmed for a good 30 minutes that all the paralleling is measuring continuity....
Is there anyway that we can manipulate the code (without changing any wiring) to just have it scroll a string? ---> no serial monitor...
|
|
|
|
|
Logged
|
|
|
|
|
Raleigh, NC.
Offline
Full Member
Karma: 0
Posts: 129
Addicted to Arduino
|
 |
« Reply #69 on: November 07, 2012, 11:47:07 am » |
Ok check out the forum titled "MAX7219 in daisy chain. How many decop capacitors I need" it should be fairly newly updated, and in there is what I did.....I did end up cascading them and its working for the most part but the scrolling isn't going across one matrix to the next, it just scrolls the same letter on each matrix individually...
and the letters are backwards....I tried to swap the wiring on just one matrix to see what that would do and it made it erattic...
|
|
|
|
|
Logged
|
|
|
|
|
Raleigh, NC.
Offline
Full Member
Karma: 0
Posts: 129
Addicted to Arduino
|
 |
« Reply #70 on: November 08, 2012, 09:48:50 am » |
|
|
|
|
|
Logged
|
|
|
|
|
Raleigh, NC.
Offline
Full Member
Karma: 0
Posts: 129
Addicted to Arduino
|
 |
« Reply #71 on: November 08, 2012, 09:51:58 am » |
My bad..I posted the video and not the shield.....the video obviously was before the shield...
theres a pic attached of the shield now...
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 240
Posts: 16465
Available for Design & Build services
|
 |
« Reply #72 on: November 08, 2012, 10:59:16 am » |
You've obviously got the MAX7219's working. What you need a grasp of now is using arrays to send them data. Here's the way I did it. I have an array, called displayArray. In this example it is 64 bytes, displayArray[0] to displayArray[63]. In my code, I made it 1022, so it can be stored in EEPROM & saved during a power outage. There is a pointer that keeps track of where the data will start that will be sent to the MAX7219s, called displayStart. You load up displayArray by whatever means (preload it in the pre-setup byte array definition for example). Then you use the displayStart pointer and copy the data to the MAX7219.
So if displayStart = 7, then the data from displayArray[7] would be copied into display0 register1, up to displayArray[14] going into into display0 register8 next, display1 gets displayArray[15] to displayArray[22] and so on for display2 and display3. That data sits there for 100mS, then displayStart gets bumped to 8, and the process starts again.
(NOTE -the names below the diagram should have read display0, display1, display2, display3 - little copy & paste error)
|
|
|
|
« Last Edit: November 08, 2012, 11:01:05 am by CrossRoads »
|
Logged
|
|
|
|
|
Raleigh, NC.
Offline
Full Member
Karma: 0
Posts: 129
Addicted to Arduino
|
 |
« Reply #73 on: November 08, 2012, 12:53:17 pm » |
I remember arrays in C++ class but I'm just not a great programmer..still amateur .....
I've attached my latest and somewhat greatest code.....I'm going to build up a protoboard matrix with my Uno...I'm surprised nobody has tried this with the mega 2560 like me....
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 240
Posts: 16465
Available for Design & Build services
|
 |
« Reply #74 on: November 08, 2012, 01:01:47 pm » |
"I'm surprised nobody has tried this with the mega 2560 like me" You're sending data out the SPI port to a MAX7219. Choice of microcontroller doing it makes no difference. Its the understanding of the manipulation of the data that makes it work. Uno, Fio, BT, Promini, Maga1280, Duemilanove, Deicamila, Leonardo, Bobuino, the hardware does not matter.
|
|
|
|
|
Logged
|
|
|
|
|
|