Created Sun, 04 May 2014 07:40:16 +0000 by Emopandas
Sun, 04 May 2014 07:40:16 +0000
I have had an issue with getting this OLED Pmod working for some time so long in fact I gave up on this pmod I got... I have the max32 and cannot get the correct pinout to work since I believe that the Pmod shield has extra circuitry?? that i have not been able to replicate with the max 32? I am not positive but I have spent hours going over the schematics of the max 32 and the pmod shield for the uno32. Is there plans for a pmod shield for the max32 anytime soon? Or does anyone have a solution to this problem?
Tue, 13 May 2014 23:00:50 +0000
No Pmod Shield for the Max 32 that I know of. The Pmod Shield out there now just remaps the signals on a Uno32 to convenient Pmod headers. There is a solution to your OLED problem, but it depends on which library you are trying to use.
IOShieldOled Library: Take a look at the reference manual for the Basic IO Shield below:
[url]http://www.digilentinc.com/Data/Products/CHIPKIT-BASIC-IO-SHIELD/chipKIT%20Basic%20IO%20Shield_rm.pdf[/url]
The OLED and the IO shield use the same SSD1306 display controller, so the pinouts shown for the IO shield on the Max 32 should be what you need to connect the Pmod OLED to. The only thing that's missing is the SS pin, which should be digital pin 74 on the Max32 (SS1). Actually, now that I look at it again, you should be able to use any pin for SS because it looks like this library uses a bit-bang SPI routine.
On the other hand...
OLED Library: I actually just made a modification to the OLED library (which I hope will get updated soon on the Digilent PmodOLED page) that makes the library compatible with the chipKIT CMOD. I've attached the library file that I modified. You'll see a section that looks like the following:
#if defined (_BOARD_CMOD_)
const int DataCmd = 7; //Pin J1-07
const int Reset = 6; //Pin J1-08
const int VbatCtrl = 30; //Pin J1-09
const int VddCtrl = 8; //Pin J1-10
#else
const int DataCmd = PIN_DSPI0_SS + 4;
const int Reset = PIN_DSPI0_SS + 5;
const int VbatCtrl = PIN_DSPI0_SS + 6;
const int VddCtrl = PIN_DSPI0_SS + 7;
#endif
You would need another #if defined (BOARD_MEGA) to assign the pin numbers for those four pins. Your choice. This library should use DSPI0 (SPI2) on the Max32, which corresponds to SS = Pin 53, SDO(SDI on the OLED) = Pin 51, SCK = Pin 52. That should help you get started with the wiring.