This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Any MSP430 OLED display code examples for SSD1306 driver?

Other Parts Discussed in Thread: MSP430F5529, MSP430G2553

I'm trying to find some MSP430 code examples for an OLED display that uses the SSD1306 driver chip. I have found some example code for the arduino environment but nothing for the MSP430 that uses the code composer environment. It is a pretty common driver chip for the OLED displays so I thought that there would be some readily available ccs examples out there, but I'm finding nothing.

I'm using the launchpad that has the 5529 chip on it. Can anybody steer me in the right direction for learning how to use the SSD1306 with the launchpad? Or share something they have written which uses the SSD1306? The one I have uses SPI, but code using a different interface would be helpful too.

Thanks

  • Hi,

    by googling i found the following references: 

    http://xdec.de/msp430-oled-display-ssd1306-128x64/

    http://doc.43oh.com/BoosterPack:OLED

    The software is written for smaller launchpad MSP-EXP430G2 with MSP430G2553, but it shares the same USCI module which is really similiar to the USCI module on MSP430F5529.

  • Yep, that's just the kind of thing I was looking for. For some reason I didn't see those links when I was searching. The 43oh link looks much more promising. It's a real project from code composer and hopefully won't take too much tweaking  to get to work with the 5529 launchpad instead.

    If anyone else knows of, or has code for the 5529 and the SSD1306 OLED driver chip, please do share.

    Thanks

  • I was able to get the code to work from 43oh found here: http://store.43oh.com/download/uploads/TheTerminal-OLEDDisplay/code/GWDeveloper-OLED_MSP430_USCI.zip

    The problem remains getting the text to display correctly on my OLED that has a 128x32 resolution. The code was written for a 128x64 OLED. I changed the definitions in the header file OledSD1306.h for my resolution as follows:

    #define SSD1306_LCDHEIGHT 32
    #define SSD1306_MAXROWS 4

    but it appears that the display is divided into (maybe 7) extremely short rows and any text that is written to the display is being crammed into those short rows which makes it illegible. I'm sure there are some modifications that need to be made for the difference in resolution but I'm having trouble figuring out where they are. Can anyone with experience coding displays tell me what needs to be set? Maybe I need to use a different font too?

    Thanks

  • I didn't need to change the font, the 6x8 font worked. There were 2 settings that needed to change in the setup for the SSD1306.

    SSD1306_SETMULTIPLEX changed from 0x3F to 0x1F (from 64 to 32)

    SSD1306_SETCOMPINS changed from 0x12 to 0x02

    This sets up the display into 4 rows of 8 pixels each, which the 6x8 font can be displayed on correctly. I think that if you wanted to run a bigger font on the display you would need to write your own routine to play some games with the font to get it to display on the 4 rows correctly.

  • hi Toby,
    i have tried to load the file without problem but when i debug it , i receive error message "Errors exist in required project" OLED-SSD1306.
    did you get this error ?
  • sorry Toby , i have manage to figure out the problem,i had to create new empty project and copy and past the code + add all existing files.
    it worked , the problem now is my OLED display does not light up , not sure if i wired the pins wrong, i am using SPI ,,, the OLED is SSD1306 128x64

**Attention** This is a public forum