Pages: 1 2 [3] 4 5 6   Go Down
Author Topic: Scrolling text on LED matrices using SPI and arduino Mega2560  (Read 7756 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

Got 3 matrices wired up with 1 to go...heres the issue now.....the 3rd matrix blinks when I power up but then goes out...so I probed the row and its column and I'm measuring negative voltage....????? why is the Max7219 supplying negative voltage to the matrix rows?
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 533
Posts: 26943
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

If anode is Low when Cathodes are  high (i.e. off)  for the next high anode, it can look like a negative voltage.
The LEDs for the low anode column are reverse biased and just turned off.
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.

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 533
Posts: 26943
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 did up a sort of flowchart showing the program execution summary.
The code itself is 21 landscape pages long, but this lets you see the idea behind it.


* Slide1.JPG (46.23 KB, 720x960 - viewed 28 times.)

* Slide2.JPG (101 KB, 720x960 - viewed 24 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

My code is way too long to post in this forum...could you give me your email possibly and I can send you a schematic capture and my code and see if you can see something I'm doing wrong .....making the LEDs have negative voltage,...
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 533
Posts: 26943
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 already explained that.
If you have the meter- on a cathode that is driven high, and the meter+ on an anode that is driven low, you will see a negative voltage. Perfectly normal.
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

Well there's something up with either the code or the sequence I have the chips ....I dont understand why 2 of 3 matrices are full on .....all 64 LEDs on 2 and the next matrix is totally off.
Logged

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

Guess I will wire up #4 and see if any scrolling takes place.....
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 533
Posts: 26943
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

Sequence will not matter - the code works the same whether the MAX7219's are connected or not. I did a lot of debugging just using Serial.print statements.
Any chance the display is just flipped end for end?

You have the serial monitor opened and a few characters entered?
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 far I have 3 of 4 matrices wired up. I paid extra close attention to the columns and rows ......the first 2 are lit up totally....all 64 on the first 2. The third has none lit up and that's when I probed the anodes(+) and cathodes(-) in rows vs. Columns and saw the negative voltage. I opened the serial monitor and typed hello, but didn't see any effect......I still have the 4th to wire up.....ill update you on how that one reacts. Oh I don't doubt your code and debug, you had yours working........I think there maybe an issue with the integration of what I have and integrating yours in. I have a lot of lines that control an LCD , some buttons and LEDs too.....
Logged

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

I guess I should mention this: so I have ss0 plugged into max7219 #1 which in the 32x8 display is the farthest on the left...then 2 goes to the second matrix from left and then 3 second from right and 4 farthest matrix to the right. MOSI all parallel, SCK all parallel, each ss (load) hooked up to individual chips......the matrices are wired up correctly too.....I just wanted to make that clear....
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 533
Posts: 26943
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

Layout sounds correct & ss usage agree with the code.
May take some tweaking to make it all play nice.
Usually when they all light up its due to having had bad data sent in, or its in display test mode, or ...
I think setup is coded to have display test turn each one on/off briefly, 50mS or something.
I started with just putting a simple pattern in during setup to confirm that I could send data to each one correctly.
Small steps.
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

This is rediculous.....I have all 4 matrices wired up now 1 each to each MAX7219..

SCK all in parallel

MOSI all in parallel

SS to each Max7219 (Pinouts assigned)

I'm using 10K resistors for Iset



I would like to email you....I want to include my code in an .ino and see if you could take a minute and browse through it and see if theres anything wrong...



Also, I open the serial monitor and just type    hello

it makes everything reset......

IDK
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 533
Posts: 26943
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

Put the code here as an attachment (pasting in text), can get some other eyes on it too.

How are you powering things? USB port? Any chance it is overloaded?
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

I emailed you the .ino file

I will have to shrink down the code to try and put it here..it exceeds the 9500 character limit...

To upload, I'm using the USB, but after upload, I have 2  (3.9 V ) lithium batteries = 7.8 V powering it all...

I'll try and shrink it down..

I have a lot of LED commands that would be irrelevant here...
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 533
Posts: 26943
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 won't be able to look at that until 8:30pm.
Add it as an attachment here so others might look at it in the meantime.
(Click Additional Options below, browse to your file, and then post)
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.

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