SS - > (Pin 53 of Mega 2560) -> Load of ALL MAX7219s (Pin 12) these would be in parallel So pretty much what you're saying is I can just leave it as :īyte ss0 = 53 and don't worry about the 47, 48 and 49 as I mentioned before since its in SPI and my MAX7219s are cascaded? If not storing in EEPROM, you can change arraySize to 1500 and store about 240 characters but the message is lost on power loss or reset. I am thinking now how to save the message as just the hex value of the character, and store that in EEPROM instead of the message itself, will let the message be 1021 characters long instead of just 170 characters. No complicated math here, just playing with pointers into an array. Or maybe not, and that was something I was fixing still. I think the one I posted will also let you add to the end of a saved message, and then saves the whole array to EEPROM again. If you then enter PPP it wipes the size stored in EEPROM and you enter a new message. After a power loss, or a reset, it checks for a saved message, if one exists it loads it from EEPROM into the displayArray and then starts displaying it. You can then enter SSS and it will save it to EEPROM along with the message size. The message - it's not in the code! I enter it from the Serial monitor. You could use any 4 pins you wanted on the Mega, so 47-48-49-53 would be fine if you uncascade them. The SS pin needs to be an output for the device to be SPI master, even if you are not using it for SPI. SCK, MOSI, MISO are 13-12-11, but SPI library takes care of those so no pinMode is needed for them, only for the SS pin. Mine aren't cascaded - so connect the SS pin 53 to the first chip & go from there. I starte with 10-9-8-7, but then realized a header didn't fit across the gap, so I left 10 alone and moved the 4 non-cascaded SS pins to 4-5-6-7 instead. You need the SS pin of the SPI group to be an output. SS (Arduino) = Load (Synchronous) on MAX7219īyte ss0 = 7 //MSB -> easy to plug a header into Arduino MOSI (Arduino) = Serial Data Out from Arduino (Asynchronous) to Serial Data In (MAX7219) I have seen a lot of code for scrolling text, but it seems like everyone uses the old LedControl or Matrix libraries.I just want to keep it simple and use the SPI library.Ĭan any coders out there give me a jumpstart help on the array to maybe just scroll "Arduino" across the matrices? SS (Arduino) = Load (Synchronous ~ Parallel ) on MAX7219 MOSI (Arduino) = Serial Data Out from Arduino (Asynchronous ~ Series) to Serial Data In (MAX7219) We just need to use SCK - pin 52 MOSI - Pin 51 and SS - pin 53 SPI pin outs used for this on the Mega 2560 are: SPI: 50 (MISO), 51 (MOSI), 52 (SCK), 53 (SS) I am off to a great start.I have the Datasheet for the Matrix so i know the Rows and columns.Īnd I'm basing it off of the MAX7219 (I have 4 of those - 1 for each matrix)Īnd with the Mega 2560, using the SPI library, we would use these pin outs: Ok, so I am trying to wire up 4 (8 x 8) LED matrices = 32 x 8 ok.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |