SDD1289 Controllers

See below for an example of using the SDD1289 GLCD. This section contains the relevant information for this type of device.

The Great Cow BASIC constants for control of the connectivity are shown in the table below. The only connectivity option the serial mode where connection between the microcontroller and the GLCD to control the data bus is managed the data in and data out lines.

To use the SDD1289 drivers simply include the following:

    #include <glcd.h>
    #DEFINE GLCD_TYPE GLCD_TYPE_SDD1289

The Great Cow BASIC constants for control display characteristics are shown in the table below.

Constants Controls Default

GLCD_TYPE

GLCD_TYPE_SDD1289

 

GLCD_WIDTH

The width parameter of the GLCD

 

GLCD_HEIGHT

The height parameter of the GLCD

 

GLCDFontWidth

Specifies the font width of the Great Cow BASIC font set.

6

The Great Cow BASIC commands supported for this GLCD are shown in the table below.

Command Purpose Example

GLCDCLS

Clear screen of GLCD

GLCDCLS

GLCDPrint

Print string of characters on GLCD using GCB font set

GLCDPrint( Xposition, Yposition, Stringvariable )

GLCDDrawChar

Print character on GLCD using GCB font set

GLCDDrawChar( Xposition, Yposition, CharCode )

GLCDDrawString

Print characters on GLCD using GCB font set

GLCDDrawString( Xposition, Yposition, Stringvariable )

Box

Draw a box on the GLCD to a specific size

Box ( Xposition1, Yposition1, Xposition2, Yposition2, [Optional In LineColour as 0 or 1]

FilledBox

Draw a box on the GLCD to a specific size that is filled with the foreground colour.

FilledBox (Xposition1, Yposition1, Xposition2, Yposition2, [Optional In LineColour 0 or 1] )

Line

Draw a line on the GLCD to a specific length that is filled with the specific attribute.

Line ( Xposition1, Yposition1, Xposition2, Yposition2, [Optional In LineColour 0 or 1] )

PSet

Set a pixel on the GLCD at a specific position that is set with the specific attribute.

PSet(Xposition, Yposition, Pixel Colour 0 or 1)

GLCDWriteByte

Set a byte value to the controller, see the datasheet for usage.

GLCDWriteByte ( LCDByte)

GLCDReadByte

Read a byte value from the controller, see the datasheet for usage.

bytevariable = GLCDReadByte

For a SDD1289 datasheet, please refer here.

This example shows how to drive a SDD1289 based Graphic LCD module with the built in commands of Great Cow BASIC.

Example:

    ;Chip Settings
    #chip 16F1937,32
    #config Osc = INT, VCAPEN_OFF, MCLRE_ON, PLLEN_ON, CLKOUTEN_OFF

    #include <glcd.h>

    'Defines for SDD1289
    #define GLCD_TYPE GLCD_TYPE_SDD1289
    'Pin mappings for SDD1289
    #define GLCD_DC porta.0
    #define GLCD_CS porta.1
    #define GLCD_RESET porta.2
    #define GLCD_DI porta.3
    #define GLCD_DO porta.4
    #define GLCD_SCK porta.5

    GLCDPrint(0, 0, "Test of the SDD1289 Device")
    end

For more help, see Graphical LCD Demonstration, GLCDCLS, GLCDDrawChar, GLCDPrint, GLCDReadByte, GLCDWriteByte, Pset

Supported in <GLCD.H>