Go Down

Topic: Scrolling text on LED matrices using SPI and arduino Mega2560 (Read 9391 times) previous topic - next topic

Aaron_dyer

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?

CrossRoads

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.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

CrossRoads

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.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Aaron_dyer

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,...

CrossRoads

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.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Aaron_dyer

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.

Aaron_dyer

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

CrossRoads

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?
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Aaron_dyer

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.....

Aaron_dyer

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....

CrossRoads

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.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Aaron_dyer

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

CrossRoads

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?
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Aaron_dyer

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...

CrossRoads

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)
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Go Up