StefanPetrick
Well-known member
Adafruit_SSD1306 hardware SPI on Teensy 3.1
Hello,
I´m using the Adafruit1306 lib and a Teensy 3.1. I have an OLED module where CLK, MOSI, CS and D/C are available.
Software SPI works fine, but I didn´t get the hardware SPI working yet.
The library says
This part works - 2 MHz software SPI.
But how to activate hardware SPI? Which pins do I have to use? What about RESET?
This doesn´t work:
Thanks for any hint,
Stefan.
Hello,
I´m using the Adafruit1306 lib and a Teensy 3.1. I have an OLED module where CLK, MOSI, CS and D/C are available.
Software SPI works fine, but I didn´t get the hardware SPI working yet.
The library says
Code:
// If using software SPI (the default case):
#define OLED_MOSI 9
#define OLED_CLK 10
#define OLED_DC 11
#define OLED_CS 12
#define OLED_RESET 8
Adafruit_SSD1306 display(OLED_MOSI, OLED_CLK, OLED_DC, OLED_RESET, OLED_CS);
/* Uncomment this block to use hardware SPI
#define OLED_DC 6
#define OLED_CS 7
#define OLED_RESET 8
Adafruit_SSD1306 display(OLED_DC, OLED_RESET, OLED_CS);
*/
This part works - 2 MHz software SPI.
But how to activate hardware SPI? Which pins do I have to use? What about RESET?
This doesn´t work:
Code:
#define OLED_MOSI 9
#define OLED_CLK 10
#define OLED_DC 6
#define OLED_CS 7
#define OLED_RESET 8
Adafruit_SSD1306 display(OLED_DC, OLED_RESET, OLED_CS);
Thanks for any hint,
Stefan.
Last edited: