Remarks

Ssd1309
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet Gallery for Meadow.Foundation.Displays.Ssd130x

The SSD1309 is a display controller used to control small, low resolution, single color OLED displays. OLED displays generate their own light - no backlight is included or required.

SSD1309 displays can be found supporting both I2C and SPI and come in resolutions of 32x128, 64x128, 16x96 and 64x96.

You may find mutlicolor variants, however, the color is achieved by placing one or more color filter over the single color display.

Code Example

MicroGraphics graphics;
Ssd1309 display;

public override Task Initialize()
{
    CreateSpiDisplay();
    //CreateI2CDisplay();

    Resolver.Log.Info("Create canvas...");
    graphics = new MicroGraphics(display);

    return base.Initialize();
}

void CreateSpiDisplay()
{
    Resolver.Log.Info("Create Display with SPI...");

    var config = new Meadow.Hardware.SpiClockConfiguration(new Frequency(6000, Frequency.UnitType.Kilohertz), Meadow.Hardware.SpiClockConfiguration.Mode.Mode0);

    var bus = Device.CreateSpiBus(Device.Pins.SCK, Device.Pins.MOSI, Device.Pins.MISO, config);

    display = new Ssd1309
    (
        spiBus: bus,
        chipSelectPin: Device.Pins.D02,
        dcPin: Device.Pins.D01,
        resetPin: Device.Pins.D00
    );
}

void CreateI2CDisplay()
{
    Resolver.Log.Info("Create Display with I2C...");

    display = new Ssd1309
    (
        i2cBus: Device.CreateI2cBus(),
        address: 60
    );
}

public override Task Run()
{
    graphics.Clear();
    graphics.CurrentFont = new Font8x12();
    graphics.DrawText(0, 0, "Meadow F7", Meadow.Foundation.Color.White);
    graphics.DrawRectangle(5, 14, 30, 10, true);

    Resolver.Log.Info("Show...");
    graphics.Show();
    Resolver.Log.Info("Show Complete");

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

To wire a Ssd1309 to your Meadow board using I2C, connect the following:

Ssd1309 Meadow Pin
GND GND
VCC 3V3
SCL D08 (SCL Pin)
SDA D07 (SDA Pin)

The OLED displays are available with a SPI or I2C interfaces. Wiring for the I2C interface is as follows:

Wiring a Ssd1309 to a Meadow F7

Characteristic Locus
Inheritance object Ssd130xBase Ssd1306 > Ssd1309
Implements IGraphicsDisplay ISpiPeripheral II2cPeripheral IDisposable
Inherited Members Ssd130xBase.ColorMode Ssd130xBase.SupportedColorModes Ssd130xBase.Width Ssd130xBase.Height Ssd130xBase.PixelBuffer Ssd130xBase.DefaultSpiBusSpeed Ssd130xBase.SpiBusSpeed Ssd130xBase.DefaultI2cAddress Ssd130xBase.DefaultSpiBusMode Ssd130xBase.SpiBusMode Ssd130xBase.IsDisposed Ssd130xBase.createdPorts Ssd130xBase.spiComms Ssd130xBase.dataCommandPort Ssd130xBase.resetPort Ssd130xBase.chipSelectPort Ssd130xBase.connectionType Ssd130xBase.Data Ssd130xBase.Command Ssd130xBase.PAGE_SIZE Ssd130xBase.i2cComms Ssd130xBase.imageBuffer Ssd130xBase.readBuffer Ssd130xBase.commandBuffer Ssd130xBase.pageBuffer Ssd130xBase.showPreamble Ssd130xBase.InvertDisplay Ssd130xBase.Contrast Ssd130xBase.Sleep Ssd130xBase.displayType Ssd130xBase.SendCommands(Span<byte>) Ssd130xBase.Show() Ssd130xBase.Show(int, int, int, int) Ssd130xBase.Clear(bool) Ssd130xBase.DrawPixel(int, int, Color) Ssd130xBase.DrawPixel(int, int, bool) Ssd130xBase.InvertPixel(int, int) Ssd130xBase.StartScrolling(Ssd130xBase.ScrollDirection) Ssd130xBase.StartScrolling(Ssd130xBase.ScrollDirection, byte, byte) Ssd130xBase.StopScrolling() Ssd130xBase.Fill(Color, bool) Ssd130xBase.Fill(int, int, int, int, Color) Ssd130xBase.WriteBuffer(int, int, IPixelBuffer) Ssd130xBase.Dispose() Ssd130xBase.Dispose(bool) Ssd130xBase.Oled128x64SetupSequence Ssd130xBase.Oled128x32SetupSequence Ssd130xBase.Oled72x40SetupSequence Ssd130xBase.Oled96x16SetupSequence Ssd130xBase.Oled64x48SetupSequence object.Equals(object) object.Equals(object, object) object.GetHashCode() object.GetType() object.MemberwiseClone() object.ReferenceEquals(object, object) object.ToString()
Namespace Meadow.Foundation.Displays
Assembly Ssd130x.dll

Syntax

public class Ssd1309 : Ssd1306, IGraphicsDisplay, ISpiPeripheral, II2cPeripheral, IDisposable

Constructors

Ssd1309(II2cBus, byte)

Create a new SSD1309 object

Declaration
public Ssd1309(II2cBus i2cBus, byte address = 60)

Parameters

Type Name Description
II2cBus i2cBus

I2cBus connected to display

byte address

Address of the bus on the I2C display.

Remarks

Ssd1309
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet Gallery for Meadow.Foundation.Displays.Ssd130x

The SSD1309 is a display controller used to control small, low resolution, single color OLED displays. OLED displays generate their own light - no backlight is included or required.

SSD1309 displays can be found supporting both I2C and SPI and come in resolutions of 32x128, 64x128, 16x96 and 64x96.

You may find mutlicolor variants, however, the color is achieved by placing one or more color filter over the single color display.

Code Example

MicroGraphics graphics;
Ssd1309 display;

public override Task Initialize()
{
    CreateSpiDisplay();
    //CreateI2CDisplay();

    Resolver.Log.Info("Create canvas...");
    graphics = new MicroGraphics(display);

    return base.Initialize();
}

void CreateSpiDisplay()
{
    Resolver.Log.Info("Create Display with SPI...");

    var config = new Meadow.Hardware.SpiClockConfiguration(new Frequency(6000, Frequency.UnitType.Kilohertz), Meadow.Hardware.SpiClockConfiguration.Mode.Mode0);

    var bus = Device.CreateSpiBus(Device.Pins.SCK, Device.Pins.MOSI, Device.Pins.MISO, config);

    display = new Ssd1309
    (
        spiBus: bus,
        chipSelectPin: Device.Pins.D02,
        dcPin: Device.Pins.D01,
        resetPin: Device.Pins.D00
    );
}

void CreateI2CDisplay()
{
    Resolver.Log.Info("Create Display with I2C...");

    display = new Ssd1309
    (
        i2cBus: Device.CreateI2cBus(),
        address: 60
    );
}

public override Task Run()
{
    graphics.Clear();
    graphics.CurrentFont = new Font8x12();
    graphics.DrawText(0, 0, "Meadow F7", Meadow.Foundation.Color.White);
    graphics.DrawRectangle(5, 14, 30, 10, true);

    Resolver.Log.Info("Show...");
    graphics.Show();
    Resolver.Log.Info("Show Complete");

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

To wire a Ssd1309 to your Meadow board using I2C, connect the following:

Ssd1309 Meadow Pin
GND GND
VCC 3V3
SCL D08 (SCL Pin)
SDA D07 (SDA Pin)

The OLED displays are available with a SPI or I2C interfaces. Wiring for the I2C interface is as follows:

Wiring a Ssd1309 to a Meadow F7

Ssd1309(ISpiBus, IDigitalOutputPort, IDigitalOutputPort, IDigitalOutputPort)

Create a new Ssd1309 display object

Declaration
public Ssd1309(ISpiBus spiBus, IDigitalOutputPort chipSelectPort, IDigitalOutputPort dataCommandPort, IDigitalOutputPort resetPort)

Parameters

Type Name Description
ISpiBus spiBus

SPI bus connected to display

IDigitalOutputPort chipSelectPort

Chip select output port

IDigitalOutputPort dataCommandPort

Data command output port

IDigitalOutputPort resetPort

Reset output port

Remarks

Ssd1309
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet Gallery for Meadow.Foundation.Displays.Ssd130x

The SSD1309 is a display controller used to control small, low resolution, single color OLED displays. OLED displays generate their own light - no backlight is included or required.

SSD1309 displays can be found supporting both I2C and SPI and come in resolutions of 32x128, 64x128, 16x96 and 64x96.

You may find mutlicolor variants, however, the color is achieved by placing one or more color filter over the single color display.

Code Example

MicroGraphics graphics;
Ssd1309 display;

public override Task Initialize()
{
    CreateSpiDisplay();
    //CreateI2CDisplay();

    Resolver.Log.Info("Create canvas...");
    graphics = new MicroGraphics(display);

    return base.Initialize();
}

void CreateSpiDisplay()
{
    Resolver.Log.Info("Create Display with SPI...");

    var config = new Meadow.Hardware.SpiClockConfiguration(new Frequency(6000, Frequency.UnitType.Kilohertz), Meadow.Hardware.SpiClockConfiguration.Mode.Mode0);

    var bus = Device.CreateSpiBus(Device.Pins.SCK, Device.Pins.MOSI, Device.Pins.MISO, config);

    display = new Ssd1309
    (
        spiBus: bus,
        chipSelectPin: Device.Pins.D02,
        dcPin: Device.Pins.D01,
        resetPin: Device.Pins.D00
    );
}

void CreateI2CDisplay()
{
    Resolver.Log.Info("Create Display with I2C...");

    display = new Ssd1309
    (
        i2cBus: Device.CreateI2cBus(),
        address: 60
    );
}

public override Task Run()
{
    graphics.Clear();
    graphics.CurrentFont = new Font8x12();
    graphics.DrawText(0, 0, "Meadow F7", Meadow.Foundation.Color.White);
    graphics.DrawRectangle(5, 14, 30, 10, true);

    Resolver.Log.Info("Show...");
    graphics.Show();
    Resolver.Log.Info("Show Complete");

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

To wire a Ssd1309 to your Meadow board using I2C, connect the following:

Ssd1309 Meadow Pin
GND GND
VCC 3V3
SCL D08 (SCL Pin)
SDA D07 (SDA Pin)

The OLED displays are available with a SPI or I2C interfaces. Wiring for the I2C interface is as follows:

Wiring a Ssd1309 to a Meadow F7

Ssd1309(ISpiBus, IPin, IPin, IPin)

Create a new Ssd1309 object

Declaration
public Ssd1309(ISpiBus spiBus, IPin chipSelectPin, IPin dcPin, IPin resetPin)

Parameters

Type Name Description
ISpiBus spiBus

SPI bus connected to display

IPin chipSelectPin

Chip select pin

IPin dcPin

Data command pin

IPin resetPin

Reset pin

Remarks

Ssd1309
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet Gallery for Meadow.Foundation.Displays.Ssd130x

The SSD1309 is a display controller used to control small, low resolution, single color OLED displays. OLED displays generate their own light - no backlight is included or required.

SSD1309 displays can be found supporting both I2C and SPI and come in resolutions of 32x128, 64x128, 16x96 and 64x96.

You may find mutlicolor variants, however, the color is achieved by placing one or more color filter over the single color display.

Code Example

MicroGraphics graphics;
Ssd1309 display;

public override Task Initialize()
{
    CreateSpiDisplay();
    //CreateI2CDisplay();

    Resolver.Log.Info("Create canvas...");
    graphics = new MicroGraphics(display);

    return base.Initialize();
}

void CreateSpiDisplay()
{
    Resolver.Log.Info("Create Display with SPI...");

    var config = new Meadow.Hardware.SpiClockConfiguration(new Frequency(6000, Frequency.UnitType.Kilohertz), Meadow.Hardware.SpiClockConfiguration.Mode.Mode0);

    var bus = Device.CreateSpiBus(Device.Pins.SCK, Device.Pins.MOSI, Device.Pins.MISO, config);

    display = new Ssd1309
    (
        spiBus: bus,
        chipSelectPin: Device.Pins.D02,
        dcPin: Device.Pins.D01,
        resetPin: Device.Pins.D00
    );
}

void CreateI2CDisplay()
{
    Resolver.Log.Info("Create Display with I2C...");

    display = new Ssd1309
    (
        i2cBus: Device.CreateI2cBus(),
        address: 60
    );
}

public override Task Run()
{
    graphics.Clear();
    graphics.CurrentFont = new Font8x12();
    graphics.DrawText(0, 0, "Meadow F7", Meadow.Foundation.Color.White);
    graphics.DrawRectangle(5, 14, 30, 10, true);

    Resolver.Log.Info("Show...");
    graphics.Show();
    Resolver.Log.Info("Show Complete");

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

To wire a Ssd1309 to your Meadow board using I2C, connect the following:

Ssd1309 Meadow Pin
GND GND
VCC 3V3
SCL D08 (SCL Pin)
SDA D07 (SDA Pin)

The OLED displays are available with a SPI or I2C interfaces. Wiring for the I2C interface is as follows:

Wiring a Ssd1309 to a Meadow F7