Welcome

More Boards

While a single board showing a video at 32x16 pixels resolution is nice, I had some more boards I could use to boost the resolution. The microcontroller controlling the first PCB already spent all its time and memory on just one PCB, so how could I add more? One way was to get a larger processor, for example an ARM. That would mean soldering a TQFP and probably completely rewriting my code, though, so I chose the alternative: just use more AVRs!

This idea solved the problem quite nicely: I could re-use the code I currently used, and the led-matrix would be really expandable: just click an AVR on the back of every board you want to add to the LED-screen, make sure the AVR gets its data and you're done. The serial port bandwith would be a problem, though, but I wouldn't run into it with my 10 boards: using an USB-to-serial-converter, the AVRs can receive data up to half a MBit with this crystal, and up to 2 MBit with a 16MHz crystal.

I had to update the protocol a bit to adjust for more than one board. I decided to keep it simple: I daisychained the boards, tying the TxD from one AVR to the RxD of the next. The protocol got a small update too: when an AVR got 0x80 via the serial port, it'd reset it's communication and forward the 0x80 to the rest of the AVRs behind it. The 512 bytes following that would get written to the display ram as grayscales, and every byte after that would get passed through to the rest of the AVRs. That way, I didn't have to mess with adresses etc: the PC-software just had to write a 0x80-byte to the serial port, followed by the data for all the PCBs.

After updating my MPlayer-plugin, I got this effect:

For something a bit more universal, I decided to to modify AALib too. I ended up with a quite hackish library that would output pixels instead of ascii-characters instead of pixels. I ran the aalib demo BB using this, and the result was stunning, mainly because BB was made with lo-res displays (text consoles actually) in mind:

« Prev 6 Next »


© 2006-2022 Sprite_tm - Contact