Driving an AdaFruit SSD1306 OLED display with a netduino [reloaded]

neduino ssd1306 driver

I ported adapted the Arduino driver written by Limor Fried for the SSD1306 monochrome OLED display to the netduino last week back in January.

At the time, I could not figure out why I was unable to communicate with the display over hardware SPI and had resorted to bit banging data, which was quite slow as you can see:

Last night, I revisited the driver and figured out the issue I had in January.Β I overhauled the code which now works properly @ 40 MHz using hardware SPI.

Here’s a video of the new driver in action:

Connecting the display to the netduino

SSD1306 VDD ->netduino 3.3 volts power

SSD1306 VBAT ->netduino 3.3 volts power

SSD1306 CS -> netduino D10 (or other Dx pin)

SSD1306 RESET -> netduino D9 (or other Dx pin)

SSD1306 D/C -> netduino D8 (or other Dx pin)

SSD1306 CLK -> netduino D13

SSD1306 DAT -> netduino D11

The driver and the sample code is located at http://netduinohelpers.codeplex.com/

Happy hacking!

Post edited on June 1st 2011.



  1. Pingback: Driving an AdaFruit SSD1306 OLED display with a netduino « adafruit industries blog
  2. Pingback: Electronics-Lab.com Blog » Blog Archive » Driving an SSD1306 OLED display with a netduino
  3. Catscan · March 3, 2011

    I tried the same thing with no luck, I’d love to see this driver running at multiple frames per second. I have had it working at pretty quickly with i2c.

    • Fabien Royer · March 3, 2011

      Hey there.

      I recently acquired a logic analyzer that I intend to use to diagnose the SPI issue on the netduino. Stay tuned πŸ™‚
      It’s good to know that I2C works though and I might add that support to the netduino driver.


    • Fabien Royer · June 1, 2011

      I got it working over SPI @ 40 MHz last night. See the new code.


  4. Catscan · March 29, 2011

    Any luck?

    • Fabien Royer · March 29, 2011

      I haven’t focused on it lately. I did get a logic analyzer to diagnose the issue though πŸ™‚ I’ll get to it.

  5. Fabien Royer · June 1, 2011

    Yes, much luck πŸ™‚ I got it working over SPI @ 40 MHz last night.

    See the new code.


  6. andydemeyer · April 27, 2013

    Hi Fabien, I am trying to get Adafruit’s PN532 to work over I2C with Netduino without any luck. Can you elaborate a bit on the issue you had that made you try the bitbanging, hopefully this can shed some light on the issues I’m having. Also, can you point me to some info on the logic analyzer you use and its usage? Help much appreciated… Regards, Andy

  7. andydemeyer · April 29, 2013

    Hi Fabien, first of all thanks for your feedback. There’s indeed no direct relation, except the fact that I’m hopeless to try anything πŸ™‚ I have taken a look at the Saleae offering and stumbled upon this one: http://www.ikalogic.com/ikalogic-products/scanalogic-2/. It’s only 4 channel, but I was hoping it would do the trick for a lot less money πŸ™‚ Next to this, I was also thinking whether I could use my netduino to sniff the I2C data from my arduino, which works fine with the PN532 board…

    • Fabien Royer · April 30, 2013

      For what it’s worth: the Netduino firmware has had bugs affecting I2C, SPI and other areas of the system. In fact, these issues comes and go with firmware revisions and ‘newer’ doesn’t always mean ‘better’: you may find that you need to restore an older version of the Netduino firmware to get things to work. It’s a great idea to compare a logic trace using an Arduino for use as a point of reference, especially if you decide to post in the Netduino forums if you ever discover a discrepancy.


  8. andydemeyer · April 30, 2013

    Well it’s funny that you state that, I did post on the Netduino forums and the only form of support I got there is to use the latest Netduino drivers and get a Logic Analyzer. While I do get that they can’t buy every single board out there and test it, I am a bit disappointed that the community supporting this isn’t very active, and I am starting to wonder what the “arduino-compatible” statement actually is worth… To stay on the positive side, I ordered the Scanalogic 2 from Ikalogic and am still hoping to be able to use .NET for my hardware adventures πŸ˜‰

  9. Dylan/David · November 30, 2014

    What exactly must i change to get this working with the st7565?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s