Pages: 1 [2] 3 4 ... 6   Go Down
Author Topic: Scrolling text on LED matrices using SPI and arduino Mega2560  (Read 8212 times)
0 Members and 1 Guest are viewing this topic.
Raleigh, NC.
Offline Offline
Full Member
***
Karma: 0
Posts: 129
Addicted to Arduino
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Kind of wish it wasn't Friday because I have this all at work so two days away from it.......oh well start back Monday.....good thing I can solder well too, this is going to be a rats nest of 28 gauge wire.......ill keep you posted crossroads and take pics n video soon too.
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 545
Posts: 27352
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Why not wirewrap it? So  much easier, quicker - and if you have to redo the matrix connections, its lot easier!
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Raleigh, NC.
Offline Offline
Full Member
***
Karma: 0
Posts: 129
Addicted to Arduino
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

MOSI and SCK in Parallel...Thats what I needed to make sure of...its this way in the schematics too....

I have 300 Ohm resistors for the I sets (Pin 18) on each of the MAX7219 ....The ss0 - ss3 Will be controlling each individual LOADs....

I placed the 100 nF and 10 uF caps to suppress any of the EMI in the circuit. I also have the code integrated and compiled / verified in 1.0.1 IDE.

just need to solder in each of the 16 pinouts wires from the MAX7219s to each of the Matrices.....

I'll keep you posted....

I noticed you said lower case letters must be used too....  < -------definitely remember that...

in your code though, you have all the HEX codes for each of the letters...is that to define them once they are input from the serial monitor? I thought it would scroll all of those in sequence when I first downloaded and read your code.



Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 545
Posts: 27352
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

300 - that might be well on the low side. I always thought Table 11 was in k-ohm, as Figure 3 shows 9.5K.  But I can't find anywhere that it says Table 11 is k ohm.
I'd be careful with 300.

Those hex codes define how the LEDs are turned on/off to make each letter.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Raleigh, NC.
Offline Offline
Full Member
***
Karma: 0
Posts: 129
Addicted to Arduino
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You may be right.....I usually used 330 for any common anode segment displays, but maybe I will go with at least 1K.....

And one more thing.....MOSI....this is the data pin coming from arduino to pin 1 ( data in) on the first max7219... But then pin 24 (data out) of the first chip would then interface pin 1 again of the next max7219 and so on through #4 . So that technically is asynchronous. the serial clk or SCK is the only Pinout that should be in parallel or synchronous......correct?
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 545
Posts: 27352
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

"MOSI....this is the data pin coming from arduino to pin 1 ( data in) on the first max7219... But then pin 24 (data out) of the first chip would then interface pin 1 again of the next max7219 and so on through #4 . "

You are using individual slave selects, yes? Then SCK & MOSI to go each device in parallel; nothing is daisychained out to in, out to in.

I am thinking your idea of synchronous vs asynchronous is different than  mine.

SPI is synchronous - data is accompanied by a clock source.
Asynchronous - no clock is provided, receiving device creates its own timing - such as RS232.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Raleigh, NC.
Offline Offline
Full Member
***
Karma: 0
Posts: 129
Addicted to Arduino
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So bottom line, SS or LOAD is interfaced to each individual chip coming from the assigned ss0-ss3.

SCK needs to in parallel with each chip sharing the same clock output from arduino.

Then the MOSI or data would go from arduino to pin 1 of chip.....pin 24 of chip goes to pin 1 of next chip and so on through number 4 max7219.

If I'm wrong here could you correct me.
Logged

Raleigh, NC.
Offline Offline
Full Member
***
Karma: 0
Posts: 129
Addicted to Arduino
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If data out from max7219 isn't interfaced to data in on the next max7219 sequence, are you sure MOSI Will work if its in parallel? All 4 chips sharing the data out from arduino like the SCK does? Look at the schematic in the playground link I posted in my pilot post of this topic.....that's the schematic I've been going by.
Logged

Raleigh, NC.
Offline Offline
Full Member
***
Karma: 0
Posts: 129
Addicted to Arduino
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Im confused now trying to understand why you would use MOSI (data) in parallel when the site and datasheet explains to cascade the MOSI.....could you post a quick schematic, or block diagram of what YOU have working please
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 545
Posts: 27352
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

SCK, MOSI in parallel to all chips.
Seperate SS/Load to each chip.
It's just a chip and it can be wired any way the design calls for.
I went with 4 seperate load lines because I felt it made the coding easier for me.
In a situation with a more static display, having the data line daisychained might make more sense.


* 4xMAX7219.png (61.72 KB, 1950x983 - viewed 39 times.)
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Raleigh, NC.
Offline Offline
Full Member
***
Karma: 0
Posts: 129
Addicted to Arduino
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok, now I see....you have a point about manipulating a chip. I appreciate your patience. Let me bust out this wiring up job and ill send you pics and video. That looks like EAGLE CAD.....your schematic. Yes?
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 545
Posts: 27352
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, eagle.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Raleigh, NC.
Offline Offline
Full Member
***
Karma: 0
Posts: 129
Addicted to Arduino
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

EAGLE is awesome. I sometimes use expressPCB and trying to learn more orCad and altium. I assume you're an engineer? I just graduated with my BSEET but have years of experience, but I just started tinkering with arduino this past year.
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 545
Posts: 27352
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I use expresspcb a lot for schematics just to post in the forum for discussion.
The lack of rubberbanding makes more complex designs harder to do.

Yes, I have BSEE from RPI.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Raleigh, NC.
Offline Offline
Full Member
***
Karma: 0
Posts: 129
Addicted to Arduino
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That's cool. I have an Associate's in computer and electronics engineering from ITT Tech. And just graduated from Devry with my bachelor's in electronic engineering. I'm starting my masters in project management in January.

Ya expressPCB is very simple. The PCB design portion of eagle I'm trying to learn more. The rats nesting of the traces always irritate me.
Logged

Pages: 1 [2] 3 4 ... 6   Go Up
Jump to: