Monochrome Graphic Display Source Code Driver Project
Section 03. Sample Screen Files and Sample Projects

03. Sample Screen Files and Sample Projects

a) General Notes

Sample display-model.h screen files are included for several screens. If using a matching screen they can be used directly or if using a different screen type they can be used as a basis for your new screen. See later in this manual for details on creating your own version for a new screen model.

Sample projects are included with the driver for specific devices and compilers. The example schematics at the end of this manual detail the circuit each sample project is designed to work with. You may use the sample projects with the circuit shown or if desired use them as a starting block for your own project with a different device or compiler. To use them copy all of the files in the chosen sample project directory into the same directory as the driver files and then open and run using the development environment / compiler the project was designed with.

b) Sample Screen Files Included

Sample display_model files are included for each of the following screens:-

BATRON BTHQ128064 AVE FETF

White on Blue 128 x 64 pixel LCD screen.

Uses driver SED1565D0B

Parallel interface

Available from Farnell InOne Stock Code 122-0418

BATRON BTHQ128064 AVD COG

Black on white 128 x 64 pixel LCD screen.

Uses driver S1D10605D04B

Parallel interface

Available from Farnell InOne Stock Code 944-9396

BATRON BTHQ240064AVB-EMN-06-LED White-COG

240 x 64 pixel LCD screen.

Uses 2x driver S1D10605D04B

SPI bus transmit only serial interface

Available from Farnell InOne Stock Code 944-9434

BATRON BTHQ100032V

100 x 32 pixel LCD screen.

Uses 2x driver SED1520

Parallel interface

Available from Farnell InOne Stock Code 944-9329

See later in this manual for details on creating your own version for a new screen model.

c) Sample Bitmap Files Included

Sample Font Table Bitmaps

font_05x05.bmp

font_05x07.bmp

font_06x10.bmp

font_07x13.bmp

font_23x26.bmp

Sample General Bitmaps

ec_logo_64x37.bmp

Embedded-code.com logo 64 x 37 pixels

ec_logo_128x64.bmp

Embedded-code.com logo 128 x 64 pixels

graph_pixel.bmp

Single pixel bitmap used by the sample graph display function

graph_xy.bmp

128 x 64 pixel graph background used by the sample graph display function

d) Sample Projects Functions

The 2 switch inputs provide the following functions:-

Switch 1

Each press cycles through the following:

Displays the embedded-code.com logo

Displays the embedded-code.com logo with all pixels inverted

Displays the standard fonts included with the driver

Displays the standard fonts included with the driver with all pixels inverted

Display a simple graph

Switch 2

Hold to cycle the contrast value from min to max.

The projects may be used as a starting point to write a new application or just as a reference for including the driver in your own project.

d) Sample Projects Included

Microchip C18 Compiler

Compiler:

Microchip C18 MPLAB C Compiler for PIC18 family of 8 bit microcontrollers

Device:

PIC18F4620

Notes:

The C18 project uses a modified version off the Microchip standard linker script for the PIC18F4620. This is required as the C18 compiler does not support data buffers over 256 bytes without a modification to the linker script to define a larger bank of microcontroller ram. The optional DISPLAY_USE_LOCAL_RAM_BUFFER define requires a large ram buffer if included, but if using the screen as the display ram buffer (DISPLAY_USE_LOCAL_RAM_BUFFER is commented out) then this special linker script doesn’t need to be used. Check the USING_3V3_POWER define in main.h for your hardware.

You will see in the sample linker script that several consecutive gpr banks have been removed and instead replaced with:-

DATABANK NAME= display_local_buffer_ram_section START=0×400 END=0xBFF

where ‘0x#00’ is the start address of the first removed bank and ‘0x#FF ‘ is the end address of the last removed bank. If modifying other device linker scripts ensure that you also check the bank used by the stack and change it to another bank if it conflicts.

Microchip C30 Compiler

Compiler:

Microchip C30 MPLAB C Compiler for PIC24 family of 16 bit microcontrollers and dsPIC digital signal controllers

Device:

PIC24FJ128GA010

Notes:

Remove the default ‘rom’ from the Bitmap Converter PC application ‘C Constant Declaration String’ as this compiler does not use the special qualifier ‘rom’.

Microchip C32 Compiler

Compiler:

Microchip C32 MPLAB C Compiler for PIC32 family of 32 bit microcontrollers

Device:

PIC32MX360F512L

Notes:

Remove the default ‘rom’ from the Bitmap Converter PC application ‘C Constant Declaration String’ as this compiler does not use the special qualifier ‘rom’.