Remarks

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

Code Example

MicroGraphics graphics;

public override Task Initialize()
{
    Resolver.Log.Info("Initializing...");

    var sT7565 = new St7565
    (
        spiBus: Device.CreateSpiBus(),
        chipSelectPin: Device.Pins.D02,
        dcPin: Device.Pins.D00,
        resetPin: Device.Pins.D01,
        width: 128,
        height: 64
    );

    graphics = new MicroGraphics(sT7565);
    graphics.CurrentFont = new Font8x8();

    return base.Initialize();
}

public override Task Run()
{
    graphics.Clear();
    graphics.DrawTriangle(10, 10, 50, 50, 10, 50, false);
    graphics.DrawRectangle(20, 15, 40, 20, true);
    graphics.DrawText(5, 5, "ST7565");
    graphics.Show();

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

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

ST7565 Meadow Pin
LEDA GND
GND GND
VCC 3V3
SDA MOSI
SCL SCK
A0 D00
RST D01
CS D02

Characteristic Locus
Inheritance object > St7565
Implements IGraphicsDisplay ISpiPeripheral IDisposable
Inherited Members object.Equals(object) object.Equals(object, object) object.GetHashCode() object.GetType() object.MemberwiseClone() object.ReferenceEquals(object, object) object.ToString()
Namespace Meadow.Foundation.Displays
Assembly St7565.dll

Syntax

public class St7565 : IGraphicsDisplay, ISpiPeripheral, IDisposable

Constructors

St7565(ISpiBus, IDigitalOutputPort?, IDigitalOutputPort, IDigitalOutputPort, int, int)

Create a new St7565 display object

Declaration
public St7565(ISpiBus spiBus, IDigitalOutputPort? chipSelectPort, IDigitalOutputPort dataCommandPort, IDigitalOutputPort resetPort, int width = 128, int height = 64)

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

int width

Width of display in pixels

int height

Height of display in pixels

Remarks

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

Code Example

MicroGraphics graphics;

public override Task Initialize()
{
    Resolver.Log.Info("Initializing...");

    var sT7565 = new St7565
    (
        spiBus: Device.CreateSpiBus(),
        chipSelectPin: Device.Pins.D02,
        dcPin: Device.Pins.D00,
        resetPin: Device.Pins.D01,
        width: 128,
        height: 64
    );

    graphics = new MicroGraphics(sT7565);
    graphics.CurrentFont = new Font8x8();

    return base.Initialize();
}

public override Task Run()
{
    graphics.Clear();
    graphics.DrawTriangle(10, 10, 50, 50, 10, 50, false);
    graphics.DrawRectangle(20, 15, 40, 20, true);
    graphics.DrawText(5, 5, "ST7565");
    graphics.Show();

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

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

ST7565 Meadow Pin
LEDA GND
GND GND
VCC 3V3
SDA MOSI
SCL SCK
A0 D00
RST D01
CS D02

St7565(ISpiBus, IPin?, IPin, IPin, int, int)

Create a new ST7565 object

Declaration
public St7565(ISpiBus spiBus, IPin? chipSelectPin, IPin dcPin, IPin resetPin, int width = 128, int height = 64)

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

int width

Width of display in pixels

int height

Height of display in pixels

Remarks

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

Code Example

MicroGraphics graphics;

public override Task Initialize()
{
    Resolver.Log.Info("Initializing...");

    var sT7565 = new St7565
    (
        spiBus: Device.CreateSpiBus(),
        chipSelectPin: Device.Pins.D02,
        dcPin: Device.Pins.D00,
        resetPin: Device.Pins.D01,
        width: 128,
        height: 64
    );

    graphics = new MicroGraphics(sT7565);
    graphics.CurrentFont = new Font8x8();

    return base.Initialize();
}

public override Task Run()
{
    graphics.Clear();
    graphics.DrawTriangle(10, 10, 50, 50, 10, 50, false);
    graphics.DrawRectangle(20, 15, 40, 20, true);
    graphics.DrawText(5, 5, "ST7565");
    graphics.Show();

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

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

ST7565 Meadow Pin
LEDA GND
GND GND
VCC 3V3
SDA MOSI
SCL SCK
A0 D00
RST D01
CS D02

Fields

spiComms

SPI Communication bus used to communicate with the peripheral

Declaration
protected ISpiCommunications spiComms

Field Value

Type Description
ISpiCommunications

Remarks

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

Code Example

MicroGraphics graphics;

public override Task Initialize()
{
    Resolver.Log.Info("Initializing...");

    var sT7565 = new St7565
    (
        spiBus: Device.CreateSpiBus(),
        chipSelectPin: Device.Pins.D02,
        dcPin: Device.Pins.D00,
        resetPin: Device.Pins.D01,
        width: 128,
        height: 64
    );

    graphics = new MicroGraphics(sT7565);
    graphics.CurrentFont = new Font8x8();

    return base.Initialize();
}

public override Task Run()
{
    graphics.Clear();
    graphics.DrawTriangle(10, 10, 50, 50, 10, 50, false);
    graphics.DrawRectangle(20, 15, 40, 20, true);
    graphics.DrawText(5, 5, "ST7565");
    graphics.Show();

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

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

ST7565 Meadow Pin
LEDA GND
GND GND
VCC 3V3
SDA MOSI
SCL SCK
A0 D00
RST D01
CS D02

Properties

ColorMode

The display color mode - 1 bit per pixel monochrome

Declaration
public ColorMode ColorMode { get; }

Property Value

Type Description
ColorMode

Remarks

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

Code Example

MicroGraphics graphics;

public override Task Initialize()
{
    Resolver.Log.Info("Initializing...");

    var sT7565 = new St7565
    (
        spiBus: Device.CreateSpiBus(),
        chipSelectPin: Device.Pins.D02,
        dcPin: Device.Pins.D00,
        resetPin: Device.Pins.D01,
        width: 128,
        height: 64
    );

    graphics = new MicroGraphics(sT7565);
    graphics.CurrentFont = new Font8x8();

    return base.Initialize();
}

public override Task Run()
{
    graphics.Clear();
    graphics.DrawTriangle(10, 10, 50, 50, 10, 50, false);
    graphics.DrawRectangle(20, 15, 40, 20, true);
    graphics.DrawText(5, 5, "ST7565");
    graphics.Show();

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

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

ST7565 Meadow Pin
LEDA GND
GND GND
VCC 3V3
SDA MOSI
SCL SCK
A0 D00
RST D01
CS D02

DefaultSpiBusMode

The default SPI bus mode for the device

Declaration
public SpiClockConfiguration.Mode DefaultSpiBusMode { get; }

Property Value

Type Description
SpiClockConfiguration.Mode

Remarks

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

Code Example

MicroGraphics graphics;

public override Task Initialize()
{
    Resolver.Log.Info("Initializing...");

    var sT7565 = new St7565
    (
        spiBus: Device.CreateSpiBus(),
        chipSelectPin: Device.Pins.D02,
        dcPin: Device.Pins.D00,
        resetPin: Device.Pins.D01,
        width: 128,
        height: 64
    );

    graphics = new MicroGraphics(sT7565);
    graphics.CurrentFont = new Font8x8();

    return base.Initialize();
}

public override Task Run()
{
    graphics.Clear();
    graphics.DrawTriangle(10, 10, 50, 50, 10, 50, false);
    graphics.DrawRectangle(20, 15, 40, 20, true);
    graphics.DrawText(5, 5, "ST7565");
    graphics.Show();

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

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

ST7565 Meadow Pin
LEDA GND
GND GND
VCC 3V3
SDA MOSI
SCL SCK
A0 D00
RST D01
CS D02

DefaultSpiBusSpeed

The default SPI bus speed for the device

Declaration
public Frequency DefaultSpiBusSpeed { get; }

Property Value

Type Description
Frequency

Remarks

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

Code Example

MicroGraphics graphics;

public override Task Initialize()
{
    Resolver.Log.Info("Initializing...");

    var sT7565 = new St7565
    (
        spiBus: Device.CreateSpiBus(),
        chipSelectPin: Device.Pins.D02,
        dcPin: Device.Pins.D00,
        resetPin: Device.Pins.D01,
        width: 128,
        height: 64
    );

    graphics = new MicroGraphics(sT7565);
    graphics.CurrentFont = new Font8x8();

    return base.Initialize();
}

public override Task Run()
{
    graphics.Clear();
    graphics.DrawTriangle(10, 10, 50, 50, 10, 50, false);
    graphics.DrawRectangle(20, 15, 40, 20, true);
    graphics.DrawText(5, 5, "ST7565");
    graphics.Show();

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

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

ST7565 Meadow Pin
LEDA GND
GND GND
VCC 3V3
SDA MOSI
SCL SCK
A0 D00
RST D01
CS D02

Height

The display height in pixels

Declaration
public int Height { get; }

Property Value

Type Description
int

Remarks

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

Code Example

MicroGraphics graphics;

public override Task Initialize()
{
    Resolver.Log.Info("Initializing...");

    var sT7565 = new St7565
    (
        spiBus: Device.CreateSpiBus(),
        chipSelectPin: Device.Pins.D02,
        dcPin: Device.Pins.D00,
        resetPin: Device.Pins.D01,
        width: 128,
        height: 64
    );

    graphics = new MicroGraphics(sT7565);
    graphics.CurrentFont = new Font8x8();

    return base.Initialize();
}

public override Task Run()
{
    graphics.Clear();
    graphics.DrawTriangle(10, 10, 50, 50, 10, 50, false);
    graphics.DrawRectangle(20, 15, 40, 20, true);
    graphics.DrawText(5, 5, "ST7565");
    graphics.Show();

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

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

ST7565 Meadow Pin
LEDA GND
GND GND
VCC 3V3
SDA MOSI
SCL SCK
A0 D00
RST D01
CS D02

IsDisposed

Is the object disposed

Declaration
public bool IsDisposed { get; }

Property Value

Type Description
bool

Remarks

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

Code Example

MicroGraphics graphics;

public override Task Initialize()
{
    Resolver.Log.Info("Initializing...");

    var sT7565 = new St7565
    (
        spiBus: Device.CreateSpiBus(),
        chipSelectPin: Device.Pins.D02,
        dcPin: Device.Pins.D00,
        resetPin: Device.Pins.D01,
        width: 128,
        height: 64
    );

    graphics = new MicroGraphics(sT7565);
    graphics.CurrentFont = new Font8x8();

    return base.Initialize();
}

public override Task Run()
{
    graphics.Clear();
    graphics.DrawTriangle(10, 10, 50, 50, 10, 50, false);
    graphics.DrawRectangle(20, 15, 40, 20, true);
    graphics.DrawText(5, 5, "ST7565");
    graphics.Show();

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

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

ST7565 Meadow Pin
LEDA GND
GND GND
VCC 3V3
SDA MOSI
SCL SCK
A0 D00
RST D01
CS D02

PixelBuffer

The buffer the holds the pixel data for the display

Declaration
public IPixelBuffer PixelBuffer { get; }

Property Value

Type Description
IPixelBuffer

Remarks

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

Code Example

MicroGraphics graphics;

public override Task Initialize()
{
    Resolver.Log.Info("Initializing...");

    var sT7565 = new St7565
    (
        spiBus: Device.CreateSpiBus(),
        chipSelectPin: Device.Pins.D02,
        dcPin: Device.Pins.D00,
        resetPin: Device.Pins.D01,
        width: 128,
        height: 64
    );

    graphics = new MicroGraphics(sT7565);
    graphics.CurrentFont = new Font8x8();

    return base.Initialize();
}

public override Task Run()
{
    graphics.Clear();
    graphics.DrawTriangle(10, 10, 50, 50, 10, 50, false);
    graphics.DrawRectangle(20, 15, 40, 20, true);
    graphics.DrawText(5, 5, "ST7565");
    graphics.Show();

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

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

ST7565 Meadow Pin
LEDA GND
GND GND
VCC 3V3
SDA MOSI
SCL SCK
A0 D00
RST D01
CS D02

SpiBusMode

The SPI bus mode for the device

Declaration
public SpiClockConfiguration.Mode SpiBusMode { get; set; }

Property Value

Type Description
SpiClockConfiguration.Mode

Remarks

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

Code Example

MicroGraphics graphics;

public override Task Initialize()
{
    Resolver.Log.Info("Initializing...");

    var sT7565 = new St7565
    (
        spiBus: Device.CreateSpiBus(),
        chipSelectPin: Device.Pins.D02,
        dcPin: Device.Pins.D00,
        resetPin: Device.Pins.D01,
        width: 128,
        height: 64
    );

    graphics = new MicroGraphics(sT7565);
    graphics.CurrentFont = new Font8x8();

    return base.Initialize();
}

public override Task Run()
{
    graphics.Clear();
    graphics.DrawTriangle(10, 10, 50, 50, 10, 50, false);
    graphics.DrawRectangle(20, 15, 40, 20, true);
    graphics.DrawText(5, 5, "ST7565");
    graphics.Show();

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

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

ST7565 Meadow Pin
LEDA GND
GND GND
VCC 3V3
SDA MOSI
SCL SCK
A0 D00
RST D01
CS D02

SpiBusSpeed

The SPI bus speed for the device

Declaration
public Frequency SpiBusSpeed { get; set; }

Property Value

Type Description
Frequency

Remarks

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

Code Example

MicroGraphics graphics;

public override Task Initialize()
{
    Resolver.Log.Info("Initializing...");

    var sT7565 = new St7565
    (
        spiBus: Device.CreateSpiBus(),
        chipSelectPin: Device.Pins.D02,
        dcPin: Device.Pins.D00,
        resetPin: Device.Pins.D01,
        width: 128,
        height: 64
    );

    graphics = new MicroGraphics(sT7565);
    graphics.CurrentFont = new Font8x8();

    return base.Initialize();
}

public override Task Run()
{
    graphics.Clear();
    graphics.DrawTriangle(10, 10, 50, 50, 10, 50, false);
    graphics.DrawRectangle(20, 15, 40, 20, true);
    graphics.DrawText(5, 5, "ST7565");
    graphics.Show();

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

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

ST7565 Meadow Pin
LEDA GND
GND GND
VCC 3V3
SDA MOSI
SCL SCK
A0 D00
RST D01
CS D02

SupportedColorModes

The Color mode supported by the display

Declaration
public ColorMode SupportedColorModes { get; }

Property Value

Type Description
ColorMode

Remarks

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

Code Example

MicroGraphics graphics;

public override Task Initialize()
{
    Resolver.Log.Info("Initializing...");

    var sT7565 = new St7565
    (
        spiBus: Device.CreateSpiBus(),
        chipSelectPin: Device.Pins.D02,
        dcPin: Device.Pins.D00,
        resetPin: Device.Pins.D01,
        width: 128,
        height: 64
    );

    graphics = new MicroGraphics(sT7565);
    graphics.CurrentFont = new Font8x8();

    return base.Initialize();
}

public override Task Run()
{
    graphics.Clear();
    graphics.DrawTriangle(10, 10, 50, 50, 10, 50, false);
    graphics.DrawRectangle(20, 15, 40, 20, true);
    graphics.DrawText(5, 5, "ST7565");
    graphics.Show();

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

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

ST7565 Meadow Pin
LEDA GND
GND GND
VCC 3V3
SDA MOSI
SCL SCK
A0 D00
RST D01
CS D02

Width

The display width in pixels

Declaration
public int Width { get; }

Property Value

Type Description
int

Remarks

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

Code Example

MicroGraphics graphics;

public override Task Initialize()
{
    Resolver.Log.Info("Initializing...");

    var sT7565 = new St7565
    (
        spiBus: Device.CreateSpiBus(),
        chipSelectPin: Device.Pins.D02,
        dcPin: Device.Pins.D00,
        resetPin: Device.Pins.D01,
        width: 128,
        height: 64
    );

    graphics = new MicroGraphics(sT7565);
    graphics.CurrentFont = new Font8x8();

    return base.Initialize();
}

public override Task Run()
{
    graphics.Clear();
    graphics.DrawTriangle(10, 10, 50, 50, 10, 50, false);
    graphics.DrawRectangle(20, 15, 40, 20, true);
    graphics.DrawText(5, 5, "ST7565");
    graphics.Show();

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

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

ST7565 Meadow Pin
LEDA GND
GND GND
VCC 3V3
SDA MOSI
SCL SCK
A0 D00
RST D01
CS D02

Methods

Clear(bool)

Clear the display buffer

Declaration
public void Clear(bool updateDisplay = false)

Parameters

Type Name Description
bool updateDisplay

Immediately update the display when true

Remarks

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

Code Example

MicroGraphics graphics;

public override Task Initialize()
{
    Resolver.Log.Info("Initializing...");

    var sT7565 = new St7565
    (
        spiBus: Device.CreateSpiBus(),
        chipSelectPin: Device.Pins.D02,
        dcPin: Device.Pins.D00,
        resetPin: Device.Pins.D01,
        width: 128,
        height: 64
    );

    graphics = new MicroGraphics(sT7565);
    graphics.CurrentFont = new Font8x8();

    return base.Initialize();
}

public override Task Run()
{
    graphics.Clear();
    graphics.DrawTriangle(10, 10, 50, 50, 10, 50, false);
    graphics.DrawRectangle(20, 15, 40, 20, true);
    graphics.DrawText(5, 5, "ST7565");
    graphics.Show();

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

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

ST7565 Meadow Pin
LEDA GND
GND GND
VCC 3V3
SDA MOSI
SCL SCK
A0 D00
RST D01
CS D02

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Declaration
public void Dispose()

Remarks

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

Code Example

MicroGraphics graphics;

public override Task Initialize()
{
    Resolver.Log.Info("Initializing...");

    var sT7565 = new St7565
    (
        spiBus: Device.CreateSpiBus(),
        chipSelectPin: Device.Pins.D02,
        dcPin: Device.Pins.D00,
        resetPin: Device.Pins.D01,
        width: 128,
        height: 64
    );

    graphics = new MicroGraphics(sT7565);
    graphics.CurrentFont = new Font8x8();

    return base.Initialize();
}

public override Task Run()
{
    graphics.Clear();
    graphics.DrawTriangle(10, 10, 50, 50, 10, 50, false);
    graphics.DrawRectangle(20, 15, 40, 20, true);
    graphics.DrawText(5, 5, "ST7565");
    graphics.Show();

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

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

ST7565 Meadow Pin
LEDA GND
GND GND
VCC 3V3
SDA MOSI
SCL SCK
A0 D00
RST D01
CS D02

Dispose(bool)

Dispose of the object

Declaration
protected virtual void Dispose(bool disposing)

Parameters

Type Name Description
bool disposing

Is disposing

Remarks

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

Code Example

MicroGraphics graphics;

public override Task Initialize()
{
    Resolver.Log.Info("Initializing...");

    var sT7565 = new St7565
    (
        spiBus: Device.CreateSpiBus(),
        chipSelectPin: Device.Pins.D02,
        dcPin: Device.Pins.D00,
        resetPin: Device.Pins.D01,
        width: 128,
        height: 64
    );

    graphics = new MicroGraphics(sT7565);
    graphics.CurrentFont = new Font8x8();

    return base.Initialize();
}

public override Task Run()
{
    graphics.Clear();
    graphics.DrawTriangle(10, 10, 50, 50, 10, 50, false);
    graphics.DrawRectangle(20, 15, 40, 20, true);
    graphics.DrawText(5, 5, "ST7565");
    graphics.Show();

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

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

ST7565 Meadow Pin
LEDA GND
GND GND
VCC 3V3
SDA MOSI
SCL SCK
A0 D00
RST D01
CS D02

DrawPixel(int, int, Color)

Draw pixel at a location

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

Parameters

Type Name Description
int x

Abscissa of the pixel to the set / reset

int y

Ordinate of the pixel to the set / reset

Color color

Any color = turn on pixel, black = turn off pixel

Remarks

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

Code Example

MicroGraphics graphics;

public override Task Initialize()
{
    Resolver.Log.Info("Initializing...");

    var sT7565 = new St7565
    (
        spiBus: Device.CreateSpiBus(),
        chipSelectPin: Device.Pins.D02,
        dcPin: Device.Pins.D00,
        resetPin: Device.Pins.D01,
        width: 128,
        height: 64
    );

    graphics = new MicroGraphics(sT7565);
    graphics.CurrentFont = new Font8x8();

    return base.Initialize();
}

public override Task Run()
{
    graphics.Clear();
    graphics.DrawTriangle(10, 10, 50, 50, 10, 50, false);
    graphics.DrawRectangle(20, 15, 40, 20, true);
    graphics.DrawText(5, 5, "ST7565");
    graphics.Show();

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

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

ST7565 Meadow Pin
LEDA GND
GND GND
VCC 3V3
SDA MOSI
SCL SCK
A0 D00
RST D01
CS D02

DrawPixel(int, int, bool)

Draw pixel at a location

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

Parameters

Type Name Description
int x

Abscissa of the pixel to the set / reset

int y

Ordinate of the pixel to the set / reset

bool enabled

True = turn on pixel, false = turn off pixel

Remarks

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

Code Example

MicroGraphics graphics;

public override Task Initialize()
{
    Resolver.Log.Info("Initializing...");

    var sT7565 = new St7565
    (
        spiBus: Device.CreateSpiBus(),
        chipSelectPin: Device.Pins.D02,
        dcPin: Device.Pins.D00,
        resetPin: Device.Pins.D01,
        width: 128,
        height: 64
    );

    graphics = new MicroGraphics(sT7565);
    graphics.CurrentFont = new Font8x8();

    return base.Initialize();
}

public override Task Run()
{
    graphics.Clear();
    graphics.DrawTriangle(10, 10, 50, 50, 10, 50, false);
    graphics.DrawRectangle(20, 15, 40, 20, true);
    graphics.DrawText(5, 5, "ST7565");
    graphics.Show();

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

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

ST7565 Meadow Pin
LEDA GND
GND GND
VCC 3V3
SDA MOSI
SCL SCK
A0 D00
RST D01
CS D02

Fill(Color, bool)

Fill display buffer with a color

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

Parameters

Type Name Description
Color clearColor

The fill color

bool updateDisplay

If true, update display

Remarks

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

Code Example

MicroGraphics graphics;

public override Task Initialize()
{
    Resolver.Log.Info("Initializing...");

    var sT7565 = new St7565
    (
        spiBus: Device.CreateSpiBus(),
        chipSelectPin: Device.Pins.D02,
        dcPin: Device.Pins.D00,
        resetPin: Device.Pins.D01,
        width: 128,
        height: 64
    );

    graphics = new MicroGraphics(sT7565);
    graphics.CurrentFont = new Font8x8();

    return base.Initialize();
}

public override Task Run()
{
    graphics.Clear();
    graphics.DrawTriangle(10, 10, 50, 50, 10, 50, false);
    graphics.DrawRectangle(20, 15, 40, 20, true);
    graphics.DrawText(5, 5, "ST7565");
    graphics.Show();

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

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

ST7565 Meadow Pin
LEDA GND
GND GND
VCC 3V3
SDA MOSI
SCL SCK
A0 D00
RST D01
CS D02

Fill(int, int, int, int, Color)

Fill with a color

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

Parameters

Type Name Description
int x

X start position in pixels

int y

Y start position in pixels

int width

Width in pixels

int height

Height in pixels

Color color

The fill color

Remarks

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

Code Example

MicroGraphics graphics;

public override Task Initialize()
{
    Resolver.Log.Info("Initializing...");

    var sT7565 = new St7565
    (
        spiBus: Device.CreateSpiBus(),
        chipSelectPin: Device.Pins.D02,
        dcPin: Device.Pins.D00,
        resetPin: Device.Pins.D01,
        width: 128,
        height: 64
    );

    graphics = new MicroGraphics(sT7565);
    graphics.CurrentFont = new Font8x8();

    return base.Initialize();
}

public override Task Run()
{
    graphics.Clear();
    graphics.DrawTriangle(10, 10, 50, 50, 10, 50, false);
    graphics.DrawRectangle(20, 15, 40, 20, true);
    graphics.DrawText(5, 5, "ST7565");
    graphics.Show();

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

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

ST7565 Meadow Pin
LEDA GND
GND GND
VCC 3V3
SDA MOSI
SCL SCK
A0 D00
RST D01
CS D02

InvertDisplay(bool)

Invert the entire display (true) or return to normal mode (false).

Declaration
public void InvertDisplay(bool cmd)

Parameters

Type Name Description
bool cmd

Remarks

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

Code Example

MicroGraphics graphics;

public override Task Initialize()
{
    Resolver.Log.Info("Initializing...");

    var sT7565 = new St7565
    (
        spiBus: Device.CreateSpiBus(),
        chipSelectPin: Device.Pins.D02,
        dcPin: Device.Pins.D00,
        resetPin: Device.Pins.D01,
        width: 128,
        height: 64
    );

    graphics = new MicroGraphics(sT7565);
    graphics.CurrentFont = new Font8x8();

    return base.Initialize();
}

public override Task Run()
{
    graphics.Clear();
    graphics.DrawTriangle(10, 10, 50, 50, 10, 50, false);
    graphics.DrawRectangle(20, 15, 40, 20, true);
    graphics.DrawText(5, 5, "ST7565");
    graphics.Show();

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

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

ST7565 Meadow Pin
LEDA GND
GND GND
VCC 3V3
SDA MOSI
SCL SCK
A0 D00
RST D01
CS D02

InvertPixel(int, int)

Invert a pixel at a location

Declaration
public void InvertPixel(int x, int y)

Parameters

Type Name Description
int x

Abscissa of the pixel to the set / reset

int y

Ordinate of the pixel to the set / reset

Remarks

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

Code Example

MicroGraphics graphics;

public override Task Initialize()
{
    Resolver.Log.Info("Initializing...");

    var sT7565 = new St7565
    (
        spiBus: Device.CreateSpiBus(),
        chipSelectPin: Device.Pins.D02,
        dcPin: Device.Pins.D00,
        resetPin: Device.Pins.D01,
        width: 128,
        height: 64
    );

    graphics = new MicroGraphics(sT7565);
    graphics.CurrentFont = new Font8x8();

    return base.Initialize();
}

public override Task Run()
{
    graphics.Clear();
    graphics.DrawTriangle(10, 10, 50, 50, 10, 50, false);
    graphics.DrawRectangle(20, 15, 40, 20, true);
    graphics.DrawText(5, 5, "ST7565");
    graphics.Show();

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

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

ST7565 Meadow Pin
LEDA GND
GND GND
VCC 3V3
SDA MOSI
SCL SCK
A0 D00
RST D01
CS D02

PowerSaveMode()

Set display into power saving mode

Declaration
public void PowerSaveMode()

Remarks

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

Code Example

MicroGraphics graphics;

public override Task Initialize()
{
    Resolver.Log.Info("Initializing...");

    var sT7565 = new St7565
    (
        spiBus: Device.CreateSpiBus(),
        chipSelectPin: Device.Pins.D02,
        dcPin: Device.Pins.D00,
        resetPin: Device.Pins.D01,
        width: 128,
        height: 64
    );

    graphics = new MicroGraphics(sT7565);
    graphics.CurrentFont = new Font8x8();

    return base.Initialize();
}

public override Task Run()
{
    graphics.Clear();
    graphics.DrawTriangle(10, 10, 50, 50, 10, 50, false);
    graphics.DrawRectangle(20, 15, 40, 20, true);
    graphics.DrawText(5, 5, "ST7565");
    graphics.Show();

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

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

ST7565 Meadow Pin
LEDA GND
GND GND
VCC 3V3
SDA MOSI
SCL SCK
A0 D00
RST D01
CS D02

SetContrast(byte)

Set the display contrast

Declaration
public void SetContrast(byte contrast)

Parameters

Type Name Description
byte contrast

The contrast value (0-63)

Remarks

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

Code Example

MicroGraphics graphics;

public override Task Initialize()
{
    Resolver.Log.Info("Initializing...");

    var sT7565 = new St7565
    (
        spiBus: Device.CreateSpiBus(),
        chipSelectPin: Device.Pins.D02,
        dcPin: Device.Pins.D00,
        resetPin: Device.Pins.D01,
        width: 128,
        height: 64
    );

    graphics = new MicroGraphics(sT7565);
    graphics.CurrentFont = new Font8x8();

    return base.Initialize();
}

public override Task Run()
{
    graphics.Clear();
    graphics.DrawTriangle(10, 10, 50, 50, 10, 50, false);
    graphics.DrawRectangle(20, 15, 40, 20, true);
    graphics.DrawText(5, 5, "ST7565");
    graphics.Show();

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

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

ST7565 Meadow Pin
LEDA GND
GND GND
VCC 3V3
SDA MOSI
SCL SCK
A0 D00
RST D01
CS D02

Show()

Send the internal pixel buffer to display

Declaration
public void Show()

Remarks

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

Code Example

MicroGraphics graphics;

public override Task Initialize()
{
    Resolver.Log.Info("Initializing...");

    var sT7565 = new St7565
    (
        spiBus: Device.CreateSpiBus(),
        chipSelectPin: Device.Pins.D02,
        dcPin: Device.Pins.D00,
        resetPin: Device.Pins.D01,
        width: 128,
        height: 64
    );

    graphics = new MicroGraphics(sT7565);
    graphics.CurrentFont = new Font8x8();

    return base.Initialize();
}

public override Task Run()
{
    graphics.Clear();
    graphics.DrawTriangle(10, 10, 50, 50, 10, 50, false);
    graphics.DrawRectangle(20, 15, 40, 20, true);
    graphics.DrawText(5, 5, "ST7565");
    graphics.Show();

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

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

ST7565 Meadow Pin
LEDA GND
GND GND
VCC 3V3
SDA MOSI
SCL SCK
A0 D00
RST D01
CS D02

Show(int, int, int, int)

Update a region of the display from the offscreen buffer

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

Parameters

Type Name Description
int left

Left bounds in pixels

int top

Top bounds in pixels

int right

Right bounds in pixels

int bottom

Bottom bounds in pixels

Remarks

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

Code Example

MicroGraphics graphics;

public override Task Initialize()
{
    Resolver.Log.Info("Initializing...");

    var sT7565 = new St7565
    (
        spiBus: Device.CreateSpiBus(),
        chipSelectPin: Device.Pins.D02,
        dcPin: Device.Pins.D00,
        resetPin: Device.Pins.D01,
        width: 128,
        height: 64
    );

    graphics = new MicroGraphics(sT7565);
    graphics.CurrentFont = new Font8x8();

    return base.Initialize();
}

public override Task Run()
{
    graphics.Clear();
    graphics.DrawTriangle(10, 10, 50, 50, 10, 50, false);
    graphics.DrawRectangle(20, 15, 40, 20, true);
    graphics.DrawText(5, 5, "ST7565");
    graphics.Show();

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

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

ST7565 Meadow Pin
LEDA GND
GND GND
VCC 3V3
SDA MOSI
SCL SCK
A0 D00
RST D01
CS D02

StartScrolling(ScrollDirection)

Start the display scrolling in the specified direction.

Declaration
public void StartScrolling(St7565.ScrollDirection direction)

Parameters

Type Name Description
St7565.ScrollDirection direction

Direction that the display should scroll

Remarks

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

Code Example

MicroGraphics graphics;

public override Task Initialize()
{
    Resolver.Log.Info("Initializing...");

    var sT7565 = new St7565
    (
        spiBus: Device.CreateSpiBus(),
        chipSelectPin: Device.Pins.D02,
        dcPin: Device.Pins.D00,
        resetPin: Device.Pins.D01,
        width: 128,
        height: 64
    );

    graphics = new MicroGraphics(sT7565);
    graphics.CurrentFont = new Font8x8();

    return base.Initialize();
}

public override Task Run()
{
    graphics.Clear();
    graphics.DrawTriangle(10, 10, 50, 50, 10, 50, false);
    graphics.DrawRectangle(20, 15, 40, 20, true);
    graphics.DrawText(5, 5, "ST7565");
    graphics.Show();

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

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

ST7565 Meadow Pin
LEDA GND
GND GND
VCC 3V3
SDA MOSI
SCL SCK
A0 D00
RST D01
CS D02

StartScrolling(ScrollDirection, byte, byte)

Start the display scrolling

Declaration
public void StartScrolling(St7565.ScrollDirection direction, byte startPage, byte endPage)

Parameters

Type Name Description
St7565.ScrollDirection direction

Direction that the display should scroll

byte startPage

Start page for the scroll

byte endPage

End page for the scroll

Remarks

In most cases setting startPage to 0x00 and endPage to 0xff will achieve an acceptable scrolling effect

StopScrolling()

Turn off scrolling

Declaration
public void StopScrolling()

Remarks

Datasheet states that scrolling must be turned off before changing the scroll direction in order to prevent RAM corruption

WriteBuffer(int, int, IPixelBuffer)

Write a buffer to the display offscreen buffer

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

Parameters

Type Name Description
int x

The x position in pixels to write the buffer

int y

The y position in pixels to write the buffer

IPixelBuffer displayBuffer

The buffer to write

Remarks

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

Code Example

MicroGraphics graphics;

public override Task Initialize()
{
    Resolver.Log.Info("Initializing...");

    var sT7565 = new St7565
    (
        spiBus: Device.CreateSpiBus(),
        chipSelectPin: Device.Pins.D02,
        dcPin: Device.Pins.D00,
        resetPin: Device.Pins.D01,
        width: 128,
        height: 64
    );

    graphics = new MicroGraphics(sT7565);
    graphics.CurrentFont = new Font8x8();

    return base.Initialize();
}

public override Task Run()
{
    graphics.Clear();
    graphics.DrawTriangle(10, 10, 50, 50, 10, 50, false);
    graphics.DrawRectangle(20, 15, 40, 20, true);
    graphics.DrawText(5, 5, "ST7565");
    graphics.Show();

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

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

ST7565 Meadow Pin
LEDA GND
GND GND
VCC 3V3
SDA MOSI
SCL SCK
A0 D00
RST D01
CS D02