Skip to content

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

January 16, 2011

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.

About these ads

From → C#, components, netduino

13 Comments
  1. Catscan permalink

    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.

    • 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.

      Cheers,
      -Fabien.

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

      Cheers,
      -Fabien.

  2. Catscan permalink

    Any luck?

    • I haven’t focused on it lately. I did get a logic analyzer to diagnose the issue though :) I’ll get to it.

  3. Yes, much luck :) I got it working over SPI @ 40 MHz last night.

    See the new code.

    Cheers,
    -Fabien.

  4. 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

  5. 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…

    • 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.

      Cheers,
      -Fabien.

  6. 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 ;)

Trackbacks & Pingbacks

  1. Driving an AdaFruit SSD1306 OLED display with a netduino « adafruit industries blog
  2. Electronics-Lab.com Blog » Blog Archive » Driving an SSD1306 OLED display with a netduino

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 238 other followers

%d bloggers like this: