So, the Christmas holidays have allowed me to return to my DIY Arduboy/girl build, based on a SAMD21. In the first iteration, I was attempting to switch to a new LCD display and do some porting of libraries to ARM SAMD21. As progress ground to a halt in August, I thought what better way to carve up the problem than by attaching the original SPI OLED to a SAMD21 dev board and working through the library port first, followed by a switch to the new LCD display later.
So I bought what I thought sounded like the right spec for this - a SPI 12864 OLED based on the SSD1306. It didn’t come with a CS header pin but that wouldn’t matter for testing my library port, right? So this weekend I got out the offending display, plugged it into my “Wemos” Arduino M0 clone and popped the demo code from the Adafruit_SSD1306 and u8glib2 libraries on. No display using HW SPI, but I can get both showing good results using SW SPI. Same issue on Adafruit ItsyBitsy M4. Tried the ArduboyZ fork library “Hello World” example from @MLXXXp and tried to see if I could emulate what he did using the Sparkfun dev board but no joy (noted that the DC/RST pins change for the SAMD architectures). Even tried a page-buffer example from u8glib2 on the Arduino Uno HW SPI with no success.
My oscilloscope shows the SW SPI SCK toggling at 1MHz, so I went into the Adafruit and u8glib2 files and changed the HW clock to 1MHz, and verified this with the oscilloscope. No joy on the display. I can see SPI data coming out of the MOSI/SCK in the SW pins and, as far as I can tell without a full logic analyser setup, the same coming out of the HW SPI MOSI/SCK, using the decoding on my oscilloscope.
Has anyone else tried using this kind of six pin OLED? Anyone else had dramas getting an SSD1306 OLED working of HW SPI on a SAMD21/51? This “logical” approach of splitting the original problem into smaller parts is now sinking my time fast and I will have to put things on hold again in the New Year.
DC - display library DC pin
RES - display library reset pin
DI - hardware/software MOSI
D0 - hardware/software SCK
VCC - 3.3V
GND - GND
Anyone see anything wrong with the populated/unpopulated parts on the back for SPI?
I’ve ordered a 7 pin version which will take a while to arrive but I’m unsure whether this is a SW or HW problem, as the evidence has been so patchy, from where I’m looking. Hoping that putting it out here will get someone who hasn’t gone “bug blind” to see what I have done wrong or could try next.