Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

U8glib on Teensy++2.0 and SSD1351 1.5" Adafruit display #342

Open
GoogleCodeExporter opened this issue Jul 6, 2015 · 5 comments
Open

U8glib on Teensy++2.0 and SSD1351 1.5" Adafruit display #342

GoogleCodeExporter opened this issue Jul 6, 2015 · 5 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Using teensy++2.0 and 1.5" ssd1351 from adafruit.
2. Wired up like this The numbers in parens are arduino pin numbers.
   B0 (20) -> OC (OLEDCS)
   B1 (21) -> CL (SCK)
   B2 (22) -> SI (MOSI)
   B5 (25) -> DC (A0?)
   B6 (26) -> R (Reset)
3. Using Arduino, with the following constructor, the graphics demo works great:
   U8GLIB_SSD1351_128X128_HICOLOR u8g( 20 /*cs*/, 25 /*dc*/, 26 /*rst*/);
  and
   U8GLIB_SSD1351_128X128GH_HICOLOR u8g( 20 /*cs*/, 25 /*dc*/, 26 /*rst*/);

   Using C and running the hello world example, the constructor:
   u8g_InitHWSPI(&u8g, &u8g_dev_ssd1351_128x128_hicolor_hw_spi, PN(1,1), PN(1,0), PN(1,6))
   only shows a very dim Hello World! and in reverse! And, I have to use different pin names. The CS and DC pins are PN(1,0) and PN(1,5) respectively. I have to use SCLK and OLEDCS (PN(1,1) and PN(1,0) resp) to get anything on the display at all. Using the pins used in Arduino sketches the display remains blank.

What is the expected output? What do you see instead?
Hello World! displayed on the OLED. What I see instead is a very dim Hello 
World! in reverse.

What version of the product are you using? On what operating system?
Latest release (1.17) on Linux Mint.

Please provide any additional information below.
I tried Ucglib and I can't get the C code to work (where do I tell the library 
what pins to use?), the Arduino code works great. Could it be that I need to 
close the jumper labeled BS0 below the microsd socket for 3 PIN SPI (vs the 
default 4 PIN SPI)? See image here 
http://www.adafruit.com/images/1200x900/1431-07.jpg 
And why does it work in Arduino C++ but not in C even when using the same 
constructor (the C++ constructor calls the C constructor).

Original issue reported on code.google.com by [email protected] on 13 May 2015 at 3:59

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant