Remarks

SSD1351
Status
Source code GitHub
NuGet package

The SSD1351 is a display controller used to drive 16bpp (RGB565) color OLED displays over SPI. These displays are commonly found with a resolution of 128x128.

Code Example

public class MeadowApp : App<F7Micro, MeadowApp>
{
    Ssd1351 display;
    GraphicsLibrary graphics;

    public MeadowApp ()
    {
        var spiBus = Device.CreateSpiBus();

        display = new Ssd1351(
            device: Device, 
            spiBus: spiBus,
            chipSelectPin: null,
            dcPin: Device.Pins.D01,
            resetPin: Device.Pins.D00,
            width: 96, height: 64);

        graphics = new GraphicsLibrary(display);

        graphics.CurrentFont = new Font8x8();
        graphics.Clear();
        graphics.DrawTriangle(10, 10, 50, 50, 10, 50, Meadow.Foundation.Color.Red);
        graphics.DrawRectangle(20, 15, 40, 20, Meadow.Foundation.Color.Yellow, false);
        graphics.DrawCircle(50, 50, 40, Meadow.Foundation.Color.Blue, false);
        graphics.DrawText(5, 5, "Meadow F7 SPI");
        graphics.Show();
    }
}

Sample projects available on GitHub

Wiring Example

To wire a Ssd1351 to your Meadow board, connect the following:

Ssd1351 Meadow Pin
LED- 3V3
LED+ GND
MOSI MOSI
SCK SCK
RESET D15
A0 D14
CS D13
VCC 3V3
GND GND

It should look like the following diagram:

Characteristic Locus
Inheritance System.Object DisplayBase TftSpiBase > Ssd1351
Implements System.IDisposable
Inherited Members TftSpiBase.NO_OP TftSpiBase.MADCTL TftSpiBase.MADCTL_MY TftSpiBase.MADCTL_MX TftSpiBase.MADCTL_MV TftSpiBase.MADCTL_ML TftSpiBase.MADCTL_RGB TftSpiBase.MADCTL_BGR TftSpiBase.MADCTL_MH TftSpiBase.MADCTL_SS TftSpiBase.MADCTL_GS TftSpiBase.COLOR_MODE TftSpiBase.ColorMode TftSpiBase.colorMode TftSpiBase.Width TftSpiBase.Height TftSpiBase.dataCommandPort TftSpiBase.resetPort TftSpiBase.chipSelectPort TftSpiBase.spi TftSpiBase.spiDisplay TftSpiBase.spiBuffer TftSpiBase.spiReceive TftSpiBase.currentPen TftSpiBase.width TftSpiBase.height TftSpiBase.xMin TftSpiBase.xMax TftSpiBase.yMin TftSpiBase.yMax TftSpiBase.Data TftSpiBase.Command TftSpiBase.SetColorMode(DisplayBase.DisplayColorMode) TftSpiBase.Clear(Boolean) TftSpiBase.Clear(Color, Boolean) TftSpiBase.Clear(UInt16, Boolean) TftSpiBase.SetPenColor(Color) TftSpiBase.DrawPixel(Int32, Int32) TftSpiBase.DrawPixel(Int32, Int32, Boolean) TftSpiBase.DrawPixel(Int32, Int32, UInt16) TftSpiBase.DrawPixel(Int32, Int32, Color) TftSpiBase.DrawPixel(Int32, Int32, Byte, Byte, Byte) TftSpiBase.InvertPixel(Int32, Int32) TftSpiBase.InvertPixelRgb444(Int32, Int32) TftSpiBase.Show() TftSpiBase.Show(Int32, Int32, Int32, Int32) TftSpiBase.Write(Byte) TftSpiBase.Write(Byte[]) TftSpiBase.DelayMs(Int32) TftSpiBase.SendCommand(Byte) TftSpiBase.SendData(Int32) TftSpiBase.SendData(Byte) TftSpiBase.SendData(Byte[]) TftSpiBase.ClearScreen(UInt16) TftSpiBase.Dispose() DisplayBase.IgnoreOutOfBoundsPixels
Namespace Meadow.Foundation.Displays.Tft
Assembly TftSpi.dll

Syntax

public class Ssd1351 : TftSpiBase, IDisposable

Constructors

Ssd1351(IIODevice, ISpiBus, IPin, IPin, IPin, Int32, Int32)

Declaration
public Ssd1351(IIODevice device, ISpiBus spiBus, IPin chipSelectPin, IPin dcPin, IPin resetPin, int width, int height)

Parameters

Type Name Description
IIODevice device
ISpiBus spiBus
IPin chipSelectPin
IPin dcPin
IPin resetPin
System.Int32 width
System.Int32 height

Properties

DefautColorMode

Declaration
public override DisplayBase.DisplayColorMode DefautColorMode { get; }

Property Value

Type Description
DisplayBase.DisplayColorMode

Overrides

Methods

Initialize()

Declaration
protected override void Initialize()

Overrides

IsColorModeSupported(DisplayBase.DisplayColorMode)

Declaration
public override bool IsColorModeSupported(DisplayBase.DisplayColorMode mode)

Parameters

Type Name Description
DisplayBase.DisplayColorMode mode

Returns

Type Description
System.Boolean

Overrides

SetAddressWindow(Int32, Int32, Int32, Int32)

Declaration
protected override void SetAddressWindow(int x0, int y0, int x1, int y1)

Parameters

Type Name Description
System.Int32 x0
System.Int32 y0
System.Int32 x1
System.Int32 y1

Overrides