Picdem™ 17 demonstration board user’s guide – Arizona Picdem 17 User Manual

Page 46

Advertising
background image

PICDEM™ 17 Demonstration Board User’s Guide

DS39024B-page 40

2001 Microchip Technology Inc.

#define RS_PIN PORTFbits.RF7

// Port for RS

#define TRIS_RS DDRFbits.RF7

// TRIS for RS

#define E_PIN PORTGbits.RG1

// PORT for E

#define TRIS_E DDRGbits.RG1

// TRIS for E

// Display ON/OFF Control defines

#define DON

0b00001111

// Display on

#define DOFF

0b00001011

// Display off

#define CURSOR_ON

0b00001111

// Cursor on

#define CURSOR_OFF

0b00001101

// Cursor off

#define BLINK_ON

0b00001111

// Cursor Blink

#define BLINK_OFF

0b00001110

// Cursor No Blink

// Cursor or Display Shift defines

#define SHIFT_CUR_LEFT

0b00010011

// Cursor shifts to

the left

#define SHIFT_CUR_RIGHT

0b00010111

// Cursor shifts to

the right

#define SHIFT_DISP_LEFT

0b00011011

// Display shifts to

the left

#define SHIFT_DISP_RIGHT 0b00011111

// Display shifts to

the right

// Function Set defines

#define FOUR_BIT

0b00101111

// 4-bit Interface

#define EIGHT_BIT

0b00111111

// 8-bit Interface

#define LINE_5X7

0b00110011

// 5x7 characters,

single line

#define LINE_5X10

0b00110111

// 5x10 characters

#define LINES_5X7

0b00111111

// 5x7 characters,

multiple line

// Other Functions

#define CLS

0b00000001

// Clear display,

Set DDRAM to 0

#define HOME

0b00000010

// Set DDRAM to 0

void OpenXLCD(static unsigned char);

// Configures I/O

pins for

// external LCD

void SetCGRamAddr(static unsigned char);

// Sets the charac-

ter generator

// address

void SetDDRamAddr(static unsigned char);

// Sets the display

data address

unsigned char BusyXLCD(void);

// Returns the busy

status of the

// LCD

unsigned char ReadAddrXLCD(void);

// Reads the current

address

char ReadDataXLCD(void);

// Reads a byte of

data

void WriteCmdXLCD(static unsigned char);

// Writes a command

to the LCD

void WriteDataXLCD(static char);

// Writes a data byte

to the LCD

#define putcXLCD WriteDataXLCD

// a putc is a write

void putsXLCD(static char *);

// Writes a string of

characters

Advertising