Does u8glib(V1.17) natively support hardware SPI for Teensy3.x?

Status
Not open for further replies.

Joegi

Well-known member
Up to now I did the prototyping for a project with an ARDUINO DUE, but now for size (board dimensions) reasons I want to port the code to the teensy3.0 (and later to teensy3.1)! The code addresses two monochrome 128x64 displays with ssd1306 controller via u8glib. On the ARDUINO DUE with
Code:
U8GLIB_SSD1306_128X64_2X u8g(6, 7, 8);  //U8GLIB_SSD1306_128X64(cs, dc(a0) [, reset])
U8GLIB_SSD1306_128X64_2X u8g2(3, 4, 5);
the diplays are accessed via hardware SPI without any problems. I now tried to port the program to the teensy 3.0, but I only get the display to work with
Code:
U8GLIB_SSD1306_128X64 u8g(13, 11, 10, 3, 2);
and software SPI (which is much too slow) but not as hoped with
Code:
U8GLIB_SSD1306_128X64 u8g(10, 3, 2);
with hardware SPI! - Is the wiring wrong, or doesn't the u8glib (V1.17) natively support hardware SPI with the teensy3.x?
Thanks for the answers in advance!

For the sake of completeness here is my entire test program for the teensy3.0 with the (working) u8glib initialization for software SPI:
Code:
#include "U8glib.h"

/* Create an instance of the library for the SSD1306 OLD display in SPI mode */
U8GLIB_SSD1306_128X64 u8g(13, 11, 10, 3, 2);

void setup(void)
{
  u8g.setColorIndex(1);
  u8g.setFont(u8g_font_fur30);
  u8g.setFontPosTop();
}

int x = -30, a = 1;

void loop(void) {
  x += a;
  if (x > 100 || x < -30) a = -a;
  u8g.firstPage();  
  do
  {
    u8g.drawStr(x, 0, "Hallo");
  }
  while(u8g.nextPage());
}
 
Perhaps ask the guys here ?
But, i did not see any mention of the teensy.

I have other projects, but if there is a need i can help a bit with Hardware SPI - if they are willing to support it (...Arduino).
 
Status
Not open for further replies.
Back
Top