Go Down

Topic: Qduino Mini and Micro OLED via SPI interface (Read 168 times) previous topic - next topic

rom555

I am trying to connect Micro OLED (https://www.sparkfun.com/products/13003) to Qduino Mini(https://www.sparkfun.com/products/13614) via SPI interface. I cannot figure which pins on Qduino correspond to Micro OLed's D/C and CS?

Can you help me figure this out?

Mapped these OK:

OLED    -> QDUINO:

GND        -> GND
3V3         -> VCC
D1(SDI)   -> MOSI    
D0(SCK)  -> SCK      
RST         -> RST  

Not sure about these two:

OLED    -> QDUINO:

D/C         -> ?
CS           -> ?

PaulRB

#1
Apr 22, 2018, 03:33 pm Last Edit: Apr 22, 2018, 03:38 pm by PaulRB
You can probably use any two digital pins you like for D/C and CS.


rom555

thanks!

D15 and D16 are respectively SCK and MOSI as per this chart?

https://cdn.sparkfun.com/datasheets/Dev/Arduino/Boards/QduinoMiniV1.pdf

avr_fred

#3
Apr 22, 2018, 10:52 pm Last Edit: Apr 22, 2018, 10:54 pm by avr_fred
Yes, your assignments are correct for SCK and MOSI. But RST of the display should be routed to any GPIO pin, same as D/C and CS, not to the reset line of the processor. You will need to change the #defines in the example programs to match your configuration since they default to an Uno pinout. Look for these lines:

#define PIN_RESET 9  // Connect RST to pin 9 (SPI & I2C)
#define PIN_DC    8  // Connect DC to pin 8 (SPI only)
#define PIN_CS    10 // Connect CS to pin 10 (SPI only)

and change the pin numbers to those you've used.

PaulRB

But RST of the display should be routed to any GPIO pin, same as D/C and CS, not to the reset line of the processor.
For my education, why not? As long as the RST line is active low, which I have not checked but they normally are, would that not work?

avr_fred

Sure, you can use the hardware reset. But be prepared to:

0) Ensure the rise of VCC and the reset timing meet the device requirements

And then

1) Edit the library or
2) Dedicate/waste a pin for the library to initialize or
3) Find a dummy output pin number for the code to initialize that doesn't conflict with the actual hardware and compiles correctly (don't know if there is any compiler/runtime validation)

If I was out of gpio, #3 would be where I start but I've never had to do that.

rom555

connecting hardware RST to Micro OLED RST did not work. used D5 pin for RST and all is working! many thanks for the tips!

Go Up