Pages: [1]   Go Down
Author Topic: Porting OLED library to Arduino DUE troubleshooting  (Read 772 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey ya'll!

I'm trying to use the Adafruit OLED with my Arduino DUE and because no library exists for functionality with the DUE, I've been trying to port the already existing Adafruit library over.

I've got things compiling properly, however, I can't get anything on the display.  I've confirmed on my UNO that the display still works properly, but beyond that I'm not sure how to troubleshoot.  The biggest thing that needed porting over was the way the library would access certain ports.  I've taken some handy functions from the forums and am using those to take care of port access.  Beyond that I'm not sure what else it could be.  Could anyone give me some help please?

Adafruit_OLED.cpp is the library I ported over; it makes reference to Adafruit_GFX.cpp also which I've modified a bit (taken out the PROGMEM)

* Adafruit_OLED.cpp (19.58 KB - downloaded 33 times.)
* Adafruit_GFX.cpp (10.91 KB - downloaded 18 times.)
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 57
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey!
Nice to see that I am not the only one with this problem  smiley-sweat Have you solved it? Currently I would use the same display with an Arduino Due board.
Thanks in advance,
T.
Logged


Germany
Offline Offline
Edison Member
*
Karma: 100
Posts: 1229
If you believe something is right, you won't see what's wrong (David Straker).
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi

U8glib (http://code.google.com/p/u8glib/) will work on the Arduino Due. It has also been reported, that U8glib supports the Adafruit OLED on the Uno. I personally do not own this Adafruit OLED, but it would be nice to hear whether the Adafruit OLED can be used with U8glib on the Due.

Note: Use the U8GLIB_SSD1306_128X32 constructor for this display.

Oliver
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am using the 128x64 adafruit OLED with my DUE ok, using u8glib (U8GLIB_SSD1306_128X64). I first tried with software SPI. Everything was straightforward. In the signature for the constructor, the reset pin is an optional parameter. I found that without the reset pin defined, my display didn't work. Maybe the default ended up being a pin I wasn't using....

I have also tried using hardware SPI and I can make that work on its own as well. I have not been able to make hardware SPI for the display work at the same time as hardware SPI for my SD card reader.... but I am not guru so that maybe possible. What is working fine for me, is u8glib using software SPI at the same time as using hardware SPI to read my SD card.

Regards

Quentin
Logged

Germany
Offline Offline
Edison Member
*
Karma: 100
Posts: 1229
If you believe something is right, you won't see what's wrong (David Straker).
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for reporting!

Oliver
Logged

0
Online Online
Shannon Member
****
Karma: 160
Posts: 10425
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I found that without the reset pin defined, my display didn't work.
Yes, TFT/OLED COG's always seem to need a reset pulse to get into a defined state in my
experience, power up isn't enough, which is tedious really...

COG = chip-on-glass, the control chip bonded onto the TFT back-glass

I'd recommend sticking a logic analyser or scope on your pins before first connecting a
display to check you are getting the right waveforms - always more stressful to debug
"blind"...
Logged

[ I won't respond to messages, use the forum please ]

Pages: [1]   Go Up
Jump to: