SW006010 Microchip Technology, SW006010 Datasheet - Page 72

no-image

SW006010

Manufacturer Part Number
SW006010
Description
MPLAB 17C SOFTWARE
Manufacturer
Microchip Technology
Datasheets

Specifications of SW006010

Tool Function
Compiler
Tool Type
Compiler
Processor Series
PIC17C
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
MPLAB®
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
MPLAB
apRNOVS^-page 68
C17 C Compiler Libraries
OpenXLCD
Device:
Function:
Include:
Prototype:
Arguments:
Remarks:
PIC17C4X, PIC17C756
Configures the I/O pins and initializes the Hitachi HD44780 LCD
controller.
xlcd.h
void OpenXLCD (static unsigned char lcdtype);
lcdtype
The value of lcdtype can be one of the following values
(defined in
Function Set defines
FOUR_BIT
EIGHT_BIT 8-bit data interface mode
LINE_5X7
LINE_5X10 5x10 characters display
LINES_5X7 5x7 characters, multiple line display
This function configures the I/O pins used to control the Hitachi
HD44780 LCD controller. It also initializes this controller.The I/O
pin definitions that must be made to ensure that the external
LCD operates correctly are:
Control I/O pin definitions
RW_PIN
TRIS_RW
RS_PIN
TRIS_RS
E_PIN
TRIS_E
where
Data Port definitions
DATA_PORT
TRIS_DATA_PORT DDRx
The control pins can be on any port and are not required to be
on the same port. The data interface must be defined as either
4-bit or 8-bit. The 8-bit interface is defined when a
BIT8
included, then the 4-bit interface is included. When in 8-bit data
interface mode, all 8 pins must be on the same port. When in
4-bit data interface mode, the 4 pins must be either the high or
low nibble of a single port. When in 4-bit interface mode, the
high nibble is specified by including
header file
commenting this line out.
After these definitions have been made, the user must compile
xlcd.c
CXX Compiler User’s Guide (DS51217) for information on the
compilers and to the MPASM™ User's Guide with MPLINK™
and MPLIB™ (DS33014) for information on linking.
This function also requires three external routines to be
provided by the user for specific delays:
DelayFor18TCY()
DelayPORXLCD() 15 ms delay
DelayXLCD()
is included in the header file
x
into an object to be linked. Please refer to the MPLAB
is the PORT,
xlcd.h
xlcd.h
4-bit data interface mode
5x7 characters, single line display
PORTxbits.Rx?
DDRxbits.Rx?
PORTxbits.Rx?
DDRxbits.Rx?
PORTxbits.Rx?
DDRxbits.Rx?
):
. Otherwise, the lower nibble is specified by
PORTx
18 Tcy delay
5 ms delay
?
is the pin number
xlcd.h
#define UPPER
 2002 Microchip Technology Inc.
. If no define is
#define
in the

Related parts for SW006010