bleckers / ledMatrixDemo_t4

Proof of concept LED Matrix driver for Teensy 4.0

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ledMatrixDemo_t4

Proof of concept LED Matrix driver for Teensy 4.0

This arduino sketch enables a Teensy 4.0 to drive a 32x64 LED matrix panel in full color using the Pixelmatix SmartLED Shield V4 as an interface.

Photo of Teensy 4.0 on the SmartLED Shield

The panel driver uses hardware features of the Teensy 4.0 and SmartLED Shield to drive the panel with near zero CPU overhead. It uses the FlexIO and FlexPWM peripherals together with Direct Memory Access (DMA) to push pixel data to the panel thousands of times per second. In theory, most of the full capabilities of the SmartMatrix library could be ported over to Teensy 4.0 using this technique. This is only a proof of concept to demonstrate the low-level panel interface and fast row updating to produce good color accuracy. It currently lacks a full suite of features (e.g. multiple panels, double buffering, drawing routines, etc).

In order to get it set up, you need to make some modifications to the Teensy: two jumper wires must be soldered to pins 32 (yellow) and 33 (green) on the underside of the board before inserting it into the SmartLED Shield. Additionally, there are 4 more jumper wires which must be inserted into the SmartLED shield sockets. Wire together pins 10 & 14, 2 & 12, 11 & 20, 9 & 21, 5 & 32, and 3 & 33. See the image below.

Photo of the underside of the SmartLED Shield, showing jumper wires

Once up and running, you can adjust latchesPerRow to change the color bit depth. At 1 bit, the panel can only display fully saturated colors (red, green, blue, magenta, cyan, yellow, white). Good truecolor requires at least 8 bits. Up to 16 bits are possible.

Comparison between BMP image and resulting display on the LED panel, at 12 bits of color.

About

Proof of concept LED Matrix driver for Teensy 4.0


Languages

Language:C++ 55.7%Language:C 44.3%