I would like to use one of the 1306 types to add a small display to a teensy. First a teensy 3.2 and normally running at 24Mhz and later probably on a 3.6.
Checking if I would run into problems.
Alain
If you are running 24Mhz because you are running on battery and are worried about power usage, you might want to look into the Teensy e-paper display. As I understand it, the display only uses power when you are writing to it, so if the writes are infrequent, this might be for you. The new version has the pins soldered in, so you could just putting stacking headers (or normal female headers if you are not attaching the teensy to a breadboard/pcb), and possibly remove it as necessary. I bought this, but so far, I haven't tried it.
Another alternative is to attach the Adafruit feather wing adapter shield, and use the Adafruit feather wing OLED display. This works better for the 3.2 than the 3.5/3.6, as you need to mount the feather specially because of the extra pins in the 3.5/3.6. I have the older problem that needed some surgery to work on the Teensy. The new version is claimed to work fine on the Teensy without modification (the problem was they were tying the reset button to the display reset, but on the Teensy/feather, the reset button is actually the program button):
Sparkfun has SSD1306 128x32 mono OLED display with a board that just mounts on top of the Teensy. Because it doesn't use the back row pins, it can just as easily be put on the 3.5/3.6. This is nice because it sits on top of the Teensy. There are jumpers so you can control which pins are used:
Sparkfun has their own library for the Teensyview, but I imagine the Adafruit library will also work. Note, the Sparkfun library does not support transactions, so it won't play with other SPI devices on your system that have been modified for transactions. The Sparkfun library sets the SPI bus speed to 1Mhz. Like the Teensy e-paper, I think I bought one, but I haven't used it yet.
Note, the SPI code in the Teensydunio release that has been modified by Paul for the Teensy has this line in it:
Code:
#ifdef SPI_HAS_TRANSACTION
SPI.beginTransaction(SPISettings(8000000, MSBFIRST, SPI_MODE0));
#else
SPI.setClockDivider (4);
#endif
That sets the SPI bus speed to 8Mhz. That means you should not have to modify the library (if I'm reading it right).
In addition, many of the SSD1306 OLED 128x32 mono displays also come in I2C variants. You would need to add 2 pull-up resistors (usually 2.2Khz) between pin 18 and 3.3v, and between pin 19 and 3.3v to enable i2c. I2c is a shared bus, and it is a little slower than SPI. So, it more likely will work if you aren't constantly redrawing the display.