Remarks

Ssd1327
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet Gallery for Ssd1327

Code Example

MicroGraphics graphics;

public MeadowApp()
{
    Console.WriteLine("Initialize display...");

    var spiBus = Device.CreateSpiBus();

    var display = new Ssd1327(Device, spiBus, Device.Pins.D02, Device.Pins.D01, Device.Pins.D00);

    display.SetContrast(60);

    graphics = new MicroGraphics(display);
    graphics.CurrentFont = new Font8x12();

    graphics.Clear();

    for(int i = 10; i > 0; i--)
    {   //interate across different brightnesses
        graphics.DrawText(0, i * 11, "SSD1327", Color.FromRgb(i * 0.1, i * 0.1, i * 0.1));
    } 

    graphics.Show();
}

Sample project(s) available on GitHub

Wiring Example

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

Ssd1327 Meadow Pin
GND GND
VCC 3V3
SCL SCK
SDA MOSI
RESET D00
DC D01
CS D02

It should look like the following diagram:

Characteristic Locus
Inheritance System.Object > Ssd1327
Implements IGraphicsDisplay
Namespace Meadow.Foundation.Displays
Assembly Ssd1327.dll

Syntax

public class Ssd1327 : object, IGraphicsDisplay

Constructors

Ssd1327(IMeadowDevice, ISpiBus, IPin, IPin, IPin)

Declaration
public Ssd1327(IMeadowDevice device, ISpiBus spiBus, IPin chipSelectPin, IPin dcPin, IPin resetPin)

Parameters

Type Name Description
IMeadowDevice device
ISpiBus spiBus
IPin chipSelectPin
IPin dcPin
IPin resetPin

Fields

chipSelectPort

Declaration
protected IDigitalOutputPort chipSelectPort

Field Value

Type Description
IDigitalOutputPort

CommandState

Declaration
protected const bool CommandState = null

Field Value

Type Description
System.Boolean

dataCommandPort

Declaration
protected IDigitalOutputPort dataCommandPort

Field Value

Type Description
IDigitalOutputPort

DataState

Declaration
protected const bool DataState = null

Field Value

Type Description
System.Boolean

imageBuffer

Declaration
protected readonly BufferGray4 imageBuffer

Field Value

Type Description
BufferGray4

resetPort

Declaration
protected IDigitalOutputPort resetPort

Field Value

Type Description
IDigitalOutputPort

spiPeripheral

Declaration
protected ISpiPeripheral spiPeripheral

Field Value

Type Description
ISpiPeripheral

Properties

ColorMode

Declaration
public ColorType ColorMode { get; }

Property Value

Type Description
ColorType

Height

Declaration
public int Height { get; }

Property Value

Type Description
System.Int32

PixelBuffer

The buffer the holds the pixel data for the display

Declaration
public IPixelBuffer PixelBuffer { get; }

Property Value

Type Description
IPixelBuffer

Width

Declaration
public int Width { get; }

Property Value

Type Description
System.Int32

Methods

Clear(Boolean)

Declaration
public void Clear(bool updateDisplay = false)

Parameters

Type Name Description
System.Boolean updateDisplay

DrawPixel(Int32, Int32, Color)

Declaration
public void DrawPixel(int x, int y, Color color)

Parameters

Type Name Description
System.Int32 x
System.Int32 y
Color color

DrawPixel(Int32, Int32, Boolean)

Declaration
public void DrawPixel(int x, int y, bool colored)

Parameters

Type Name Description
System.Int32 x
System.Int32 y
System.Boolean colored

DrawPixel(Int32, Int32, Byte)

Declaration
public void DrawPixel(int x, int y, byte gray)

Parameters

Type Name Description
System.Int32 x
System.Int32 y
System.Byte gray

Fill(Color, Boolean)

Declaration
public void Fill(Color fillColor, bool updateDisplay = false)

Parameters

Type Name Description
Color fillColor
System.Boolean updateDisplay

Fill(Int32, Int32, Int32, Int32, Color)

Declaration
public void Fill(int x, int y, int width, int height, Color color)

Parameters

Type Name Description
System.Int32 x
System.Int32 y
System.Int32 width
System.Int32 height
Color color

FillBuffer()

Declaration
public void FillBuffer()

Initialize()

Declaration
protected void Initialize()

InvertPixel(Int32, Int32)

Declaration
public void InvertPixel(int x, int y)

Parameters

Type Name Description
System.Int32 x
System.Int32 y

SendCommand(Ssd1327.Command)

Declaration
protected void SendCommand(Ssd1327.Command command)

Parameters

Type Name Description
Ssd1327.Command command

SendCommand(Byte)

Declaration
protected void SendCommand(byte command)

Parameters

Type Name Description
System.Byte command

SendData(Byte)

Declaration
protected void SendData(byte data)

Parameters

Type Name Description
System.Byte data

SendData(Byte[])

Declaration
protected void SendData(byte[] data)

Parameters

Type Name Description
System.Byte[] data

SendData(Int32)

Declaration
protected void SendData(int data)

Parameters

Type Name Description
System.Int32 data

SetContrast(Byte)

Declaration
public void SetContrast(byte contrast)

Parameters

Type Name Description
System.Byte contrast

Show()

Declaration
public void Show()

Show(Int32, Int32, Int32, Int32)

Declaration
public void Show(int left, int top, int right, int bottom)

Parameters

Type Name Description
System.Int32 left
System.Int32 top
System.Int32 right
System.Int32 bottom

WriteBuffer(Int32, Int32, IPixelBuffer)

Declaration
public void WriteBuffer(int x, int y, IPixelBuffer displayBuffer)

Parameters

Type Name Description
System.Int32 x
System.Int32 y
IPixelBuffer displayBuffer