SSD1306 OLEDs – DMA Library for Arduino Due

So we’re always cooking up hot new hardware in the Grav Corp labs. Recently, we’ve been working on a project using a 128×64 OLED screen with the SSD1306 controller.

SSD1306 OLEDs - DMA Library for Arduino Due

Adafruit is a good source of these displays, with an excellent library written by Limor Fried. The Adafruit_SSD1306 library makes it simple to use these displays with a variety of Arduinos, using either software or hardware SPI. However, we wanted a speed boost, and the Due looked like it could deliver, with its DMA (Direct Memory Access) capability.

So what is DMA? Direct Memory Access, as simply stated by Wikipedia:

  1. Direct memory access (DMA) is a feature of computerized systems that allows certain hardware subsystems to access main system memory independently of the central processing unit (CPU).

We wanted to use the DMA capabilities of the Arduino Due’s SAM3X8E microcontroller to speed up calls to the display() function, which writes the display buffer to the OLED controller. With stock settings using hardware SPI, calls to display() take ~2ms on the Due. This is a long time to tie up our CPU, so what can we do to improve this?

Like all good endeavours, this began with research. We hunted for anything regarding the SSD1306 and DMA but came up short. After digging deeper, we found Marek Buriak’s library for ILI9341-based TFT screens. Marek used code from William Greiman, who developed SD card libraries for the Arduino. William took advantage of the SAM3X8E’s DMA capabilities to enable faster SD card transfers, and Marek then adapted this code to allow faster writes to ILI9341-based screens.

 

For More Detail : SSD1306 OLEDs – DMA Library for Arduino Due


A Propos De L'Auteur

Ibrar Ayyub

Je suis expérimenté, rédacteur technique, titulaire d'une Maîtrise en informatique de BZU Multan, Pakistan à l'Université. Avec un arrière-plan couvrant diverses industries, notamment en matière de domotique et de l'ingénierie, j'ai perfectionné mes compétences dans la rédaction claire et concise du contenu. Compétent en tirant parti de l'infographie et des diagrammes, je m'efforce de simplifier des concepts complexes pour les lecteurs. Ma force réside dans une recherche approfondie et de présenter l'information de façon structurée et logique format.

Suivez-Nous:
LinkedinTwitter

Laisser un Commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

fr_FRFrench
Faire défiler vers le Haut