Remarks

S6D02A1
Status
Source code GitHub
NuGet package

The S6D02A1 is a display controller used to drive color displays over SPI using 12, 16 or 18 bbp. These displays require a backlight. These displays are commonly found with a resolution of 128x160.

The Meadow.Foundation S6D02A1 driver currently only supports 16bpp RGB565.

Code Example

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

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

        display = new S6D02A1(
            device: Device, 
            spiBus: spiBus,
            chipSelectPin: null,
            dcPin: Device.Pins.D01,
            resetPin: Device.Pins.D00,
            width: 128, height: 160);

        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 S6D02A1 to your Meadow board, connect the following:

S6D02A1 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 > S6D02A1
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.IsColorModeSupported(DisplayBase.DisplayColorMode) 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 S6D02A1 : TftSpiBase, IDisposable

Constructors

S6D02A1(IIODevice, ISpiBus, IPin, IPin, IPin, Int32, Int32, DisplayBase.DisplayColorMode)

Declaration
public S6D02A1(IIODevice device, ISpiBus spiBus, IPin chipSelectPin, IPin dcPin, IPin resetPin, int width, int height, DisplayBase.DisplayColorMode displayColorMode = DisplayBase.DisplayColorMode.Format12bppRgb444)

Parameters

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

Properties

DefautColorMode

Declaration
public override DisplayBase.DisplayColorMode DefautColorMode { get; }

Property Value

Type Description
DisplayBase.DisplayColorMode

Overrides

Methods

Initialize()

Declaration
protected override void Initialize()

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

SetRotation(TftSpiBase.Rotation)

Declaration
public void SetRotation(TftSpiBase.Rotation rotation)

Parameters

Type Name Description
TftSpiBase.Rotation rotation