TinyCircuits Forum

General Category => General Discussion => Topic started by: beermat on March 02, 2017, 07:24:25 PM

Title: TinyScreen+ driving multiple displays demo
Post by: beermat on March 02, 2017, 07:24:25 PM
Video here: https://www.youtube.com/watch?v=KF0zIwhqUz0 (https://www.youtube.com/watch?v=KF0zIwhqUz0)

Well, I achieved what I set out to do (use the TinyScreen+ to drive multiple OLED displays I have acquired over the past few months) but the code is a major hackfest, so will remain private for now :)

The sketch is a *heavily* hacked version of the Adafruit Teensy sketch here (using dragon eyes): https://learn.adafruit.com/animated-electronic-eyes-using-teensy-3-1 (https://learn.adafruit.com/animated-electronic-eyes-using-teensy-3-1)

Modifications include using an in-memory buffer to store the display output, so this buffer can be pushed to each screen, rather than having to redraw on each screen. This buffer is then pushed using SPI DMA to the displays. Two DMA channels are used simultaneously - one to push the buffer to the TinyScreen+ integrated display, and the other channel to push the buffer to the 3 external displays. All external displays share MISO, MOSI, CLK and DC. Because the two displays on the left of the TinyScreen+ are SSD1331 based and the one on the right is SSD1351 based (and a higher 128*96 resolution), separate initialization and setup commands are required, so two CS pins are used to target the appropriate commands to the appropriate driver/screen. The SSD1351 display on the right is configured to use a 96*64 pixel section.

Frame rate is a healthy 73fps!

Video here: https://www.youtube.com/watch?v=KF0zIwhqUz0 (https://www.youtube.com/watch?v=KF0zIwhqUz0)