Using DMA with OLED Library

Status
Not open for further replies.
Hi guys,

I've currently set up my OLED 128x64 monochrome from Adafruit, and i'm using it with SPI and the SSD_1306 Library on my Teensy 3.6.
I thought the uC would be powerful enough to handle this quickly, but if I refresh the display to fast (for smooth poti values) my tasks get stuck, and even my button pads LEDs start flickering visibly.
Now I've read about DMA and think it could maybe fix my problem.

• Is, or how is it possible to implement DMA in my sketch? Do I have to hack the lib then?
• Do you maybe have another solution for this?

Thanks and greets!
 
Last edited:
I'm pretty sure any problems are likely from updating too fast with the speed of the T_3.6, or <you don't mention> from working with other SPI devices if the drivers aren't perfect.

Also - you don't show any code - not sure how fast updates are being attempted - also it is possible more screen area than needed is being updated each time? If the buttons don't change updates to them should be skipped. If buttons are skipped and flickering then the fast update rate is messing with the controller.

I've only ever used the i2c version of these and they run very well on that - I've mostly run the 'demo' stars demo - but pushed the i2c speed up a great deal with the T_3.6 during the Beta of that and I didn't see screen flicker there - just fast smooth updates of the drawing and the falling stars. I only ever bought the cheap eBay versions.

But using the "#include <i2c_t3.h>" I bumped the speed up 10 or 40 times the default and it ran there with this:
Code:
#ifdef I2C_T3_H
    Wire.setClock(400000UL); // Set I2C frequency to 400kHz
#endif
 
Status
Not open for further replies.
Back
Top