Teensy 3.6... OLED display.. SPI or I2C?

Status
Not open for further replies.

vfxwolf

Well-known member
Greetings all,

I have a project connected to an SSD 1306 OLED thats working fine through I2C. However, I watched comparison between I2C and SPI https://www.youtube.com/watch?annot...&feature=iv&src_vid=XnipKRHAZ5U&v=Wz6Fzo3rsLM that showed a definitive speed advantage to using SPI as opposed to I2C. When it comes to the Teensy, is there a preferred option? I'm considering rewiring for SPI as I'm at the breadboard stage, and wondering if its worth the effort.

Thanks.
 
SPI is well worth it, your comparing i2c with an average use of 400khz to an SPI bus with speeds above 1MHz, that can be ran way higher as well, depending on your application, you could run 10MHz if the LCD supports it.
 
I would suspect the SPI displays are faster than I2C, especially if you are using the default i2c speed, which limits the i2c bus to 100khz.

One thing I've run into with highly optimized displays like the SSD1351, is the Teensy 3.5/3.6 can drive the display much faster than it can handle, and I had to go in and slow down the SPI bus so the Teensy wasn't sending data faster than the display could accept. I don't think the SSD 1306 has the special DMA optimizations, and so it it may not be an issue. But you have to tune the display.
 
Driving this 1306 OLED display with hardware SPI on a Teensy 3.1, I was able to run the display at 862 fps.
See this thread.

Regards,
Paul

PS: I measured the SPI clock to be 8MHz in the example in the thread mentioned above.
 
Last edited:
The strange thing is, I've ported a circuit and sketch from the Mega to the Teensy 3.6.. the I2C OLED screen actually seems LAGGIER on the teensy. Any idea what might be causing this?
 
Status
Not open for further replies.
Back
Top