Interfacing Sparkfun micro OLED with the MODM7AE70

Discussion to talk about hardware related topics only.
Post Reply
jpelletier
Posts: 18
Joined: Wed Dec 23, 2020 3:32 am

Interfacing Sparkfun micro OLED with the MODM7AE70

Post by jpelletier »

I ported the library to interface with the Sparkfun micro OLED (#13003).
The OLED displays something but it doesn't quite work.

My code is on Github here:
https://github.com/jpelletier/oled_spi/tree/master

Values at initialisation are good and validated on another platform. The OLED isn't defective, same hardware runs fine on 3 other platforms.

OLED - Netburner connexions

Netb. OLED 0.66" Sparkfun 64x48 pixels #LCD-13003
P2.1 1 GND
P2.2 2 VDD
P2.28 3 D1/MOSI
P2.25 4 D0/SCK
-- 5 D2
P2.9 6 D/C
P2.19 7 nRESET
P2.29 8 nCS
User avatar
pbreed
Posts: 1080
Joined: Thu Apr 24, 2008 3:58 pm

Re: Interfacing Sparkfun micro OLED with the MODM7AE70

Post by pbreed »

To start with did you set all the functions?
IE
P2[25].function(PINP2_25_SPI0_SPCK);
P2[28].function(PINP2_28_SPI0_MOSI );
P2[9].function(PINP2_9_OUT);

Pin 29 you could choose GPIO or SP{I CS (I'd choose GPIO to start, and manage the CS manually).
I might swithc to QSPI managing the SPI if I got DMA moving a whole image across without intervantion so I just updated ta memory structure and the OLED followed without code action...

P2[29],function(PINP2_29_OUT );
Or for QSPI...PINP2_29_SPI0_NPCS0
User avatar
pbreed
Posts: 1080
Joined: Thu Apr 24, 2008 3:58 pm

Re: Interfacing Sparkfun micro OLED with the MODM7AE70

Post by pbreed »

What does your SPI code look like?

One could also start by putting all the pins in GPIO mode and bitbanging the interface..
jpelletier
Posts: 18
Joined: Wed Dec 23, 2020 3:32 am

Re: Interfacing Sparkfun micro OLED with the MODM7AE70

Post by jpelletier »

I setted all the function correctly, since it was displaying text. I changed to software management of CS

There was a few bugs but I finally made it work.
The setting for the offset needed to be set to 0x20 to make it display properly.
See here for final code (may still have 'not working' comments but ignore them).
https://hackaday.io/project/177816-micr ... rary-ports
Post Reply