|
|||||||
![]() |
Forum Index > Projects > LED Pegboard and Matrix Projects | ||
Real time serial communication with Peggy 2? |
|||
| | | Printable Version |
|
Anonymous: voxel | ||||||||
|
Hello, |
|
||||||||
|
|||||||||
|
Anonymous: voxel | ||||||||
|
One other thing I forgot to ask also is would it be possible to trim the top edge of the board to place multiple Peggy 2's side-by-side as well as top-to-top? |
|
||||||||
|
|||||||||
|
Windell | ||||||||
with the Arduino I have been able to implement a real-time serial communication with a MAX7219 and a 8x8 LED matrix to interact with mouse movement, audio levels, etc. What are the limitations, if any, on the animation capabilities of the Peggy2? Seeing as though the Peggy2 is running the same ATMega168, would it be possible to set up a serial connection to perform real-time animation? One of the things that you should keep in mind is that 25x25 is a lot bigger than 8x8-- almost ten times as many LEDs. The primarly limitation is on available RAM. Only a few frame buffers will fit in RAM at a time-- we haven't really explored enough yet to give hard numbers on that. (We can probably be much more efficient.) You can also leverage the available flash space to store a number of frames of animation and quickly switch between them. Also, does the Peggy 2 feature per-LED brightness? You can use multiple frame buffers buffers (as we have in our example code) to either create sequential frames or to display multiple levels of grey by refreshing them quickly. We think that 8 levels of grey works pretty well with a decent refresh rate. One other thing I forgot to ask also is would it be possible to trim the top edge of the board to place multiple Peggy 2's side-by-side as well as top-to-top?Yes, you can do it on your own, if you are careful. There are no traces on the top past the reach of the LEDs-- just "empty" border with holes to mount and/or hang the display. Windell H. Oskay drwho(at)evilmadscientist.com http://www.evilmadscientist.com/ |
![]() Evil Scientist ![]() Status: offline
Registered: 06/15/06 |
||||||||
|
|||||||||
|
Anonymous: voxel | ||||||||
|
Thanks for the quick reply Windell! One of the things that you should keep in mind is that 25x25 is a lot bigger than 8x8-- almost ten times as many LEDs. The primarly limitation is on available RAM. Only a few frame buffers will fit in RAM at a time
![]() One other thing I forgot to ask also is would it be possible to trim the top edge of the board to place multiple Peggy 2's side-by-side as well as top-to-top?
|
|
||||||||
|
|||||||||
|
Windell | ||||||||
...but would that be too much overhead for the processor?I really don't know. The software serial does have significant overhead that steals time away from the display. If you need that kind of data rate, there are probably better ways to do this. Feeding the data one byte at a time via TWI from a separate Arduino is probably a good solution, for example. Then again, the Peggy itself could be modded to free up the hardware serial port, which would also be fast enough without overhead. Would it be at all beneficial to somehow "hack in" the Arduino as the main CPU? This doesn't make much sense to me-- the CPU on the peggy is already the same as that on an Arduino; there will be challenges and no benefits. Is there room (would it be safe) to drill small mounting holes between the LED sockets? (I'll most likely be using 5mm LEDs)Nope. Can't do that. But you *can* mount the LEDs exactly between the holes instead of on the grid; see the instructions for how to do that. Windell H. Oskay drwho(at)evilmadscientist.com http://www.evilmadscientist.com/ |
![]() Evil Scientist ![]() Status: offline
Registered: 06/15/06 |
||||||||
|
|||||||||
|
Anonymous: yincrash | ||||||||
|
I'm also interested in putting in the serial ttl port. |
|
||||||||
|
|||||||||
|
Windell | ||||||||
Looking at the flickr photo, you ground the top pin and the bottom pin (let's call them 1 and 6) then just hook pin 4 to PB4 and pin 5 to PB2.In the AFSoftSerial library, you just tell it to use those pins as RX and TX respectively? Windell H. Oskay drwho(at)evilmadscientist.com http://www.evilmadscientist.com/ |
![]() Evil Scientist ![]() Status: offline
Registered: 06/15/06 |
||||||||
|
|||||||||
|
Anonymous: voxel | ||||||||
Nope. Can't do that. But you *can* mount the LEDs exactly between the holes instead of on the grid; see the instructions for how to do that.
Feeding the data one byte at a time via TWI from a separate Arduino is probably a good solution, for example. Then again, the Peggy itself could be modded to free up the hardware serial port, which would also be fast enough without overhead.
This doesn't make much sense to me-- the CPU on the peggy is already the same as that on an Arduino; there will be challenges and no benefits.
|
|
||||||||
|
|||||||||
|
Anonymous: voxel | ||||||||
|
Oh and I meant to mention an idea I had... (On a side note, I can't seem to find a registration for the forums anywhere??) |
|
||||||||
|
|||||||||
|
Windell | ||||||||
I realized my original question was a little ambiguous. Just in case, I was asking about drilling small mounting holes between the LED sockets to be able to put screws through for mounting (if I removed the top portion to allow top-to-top (as well as side-by-side) placement of the Peggy panels. If it's just a couple of holes, maybe. I'd look at the PCB files to see if there are any clear spaces that you might exploit. I'm not familiar with TWI (or I2C, which wikipedia says TWI is a derivative of) but I assume it would be similar to a 3-wire connection (which is what I've been using to experiment with my little MAX7219 setup). But I'll have to look into it if I decide to go that route. Yes, another simple serial protocol; happens to be on pins PC4 & PC5. The Arduino "Wire" library is for using TWI. Windell H. Oskay drwho(at)evilmadscientist.com http://www.evilmadscientist.com/ |
![]() Evil Scientist ![]() Status: offline
Registered: 06/15/06 |
||||||||
|
|||||||||
|
|
| All times are PDT. The time is now 06:25 AM. |
|
|
Octolively
Interactive LED kits
Meggy Jr RGB
LED matrix game
development kit.
Business-card sized
AVR target boards
Peggy 2
LED Pegboard kits