Home › Evil Mad Scientist Forums › LED Matrix Kits › Connecting 2 Peggy II boards and increasing the number of commands to execute.s › Re: Connecting 2 Peggy II boards and increasing the number of commands to execute.s
November 28, 2012 at 3:19 am
#21013
Windell Oskay
Keymaster
First off, I’m not sure how much you need to expand, but you can actually get a fair number of extra LEDs with the hardware that you have. The Peggy 2 has 25 rows and columns on board, but the LED driver chips actually support 32 columns. The extra seven columns are broken out on the PCB as A0 – A6, by U5. So, if you have six rows, using these extra pins will get you 42 extra LEDs. The only downside is that you’ll have to modify the code to include those extra locations.
It is not possible to expand the program memory of the AVR microcontroller directly. While I suspect that it’s possible to use the code more efficiently– I’ve almost never filled up the full 32 kB! — I’ll try to suggest a few workarounds.
– Use a larger AVR, for example the ATmega1284, which has 128 kB of program memory. This could be used as the “brain” of the Peggy, with some code changes. You could also use it as a “master” that sends serial commands to the two Peggy units over TWI (I2C).
– Use a larger-AVR-based Arduino board, such as the Arduino Mega with the ATmega2560 processor– which has 256 kB of program space.
– Use an off-board Arduino, with an appropriate shield, to read commands from an SD card and transmit them to the Peggy board(s) over TWI.
– Store the commands on the computer, and stream them to the Peggy board(s) through a serial or TWI interface.