Turn-key PCB assembly services in prototype quantities or low-volume to mid-volume production runs

Driving SSD1306 based OLED display with DMA library

People love using OLED displays in their projects because they offer better contrast, color depth and different feel from LCD. So there are plenty of OLED display modules ready to be used with microcontroller boards like Arduino. Adafruit also offers great 128×64 SSD1306 based OLED display which has great library for Arduino. But problem is that there are so many Arduino variations with different processor families that using one generic library doesn’t ensure its efficiency. So the guys from grav-corp decided to tweak the library so it would work with Arduino Due much faster because of DMA.

SSD1306_driving_with_DMA

Arduino Due is equipped with ARM microcontroller which most of the features aren’t used by standard Arduino library that are initially built for AVR micros. And so the LCD is driven with SPI interface which works well with DMA. With standard library calls to display() function took about 2ms, with new implementation speed quadrupled and speed could be increased even more by rising SPI clock speed. But another main advantage is that using DAM practically frees CPU from writing data to LCD. Once set, DAM controller can write whole image stored in SD card while CPU can perform other tasks.

[..Source link..]

Bookmark the permalink.

Leave a Reply