Arizona Picdem 17 User Manual

Page of 92
 2001 Microchip Technology Inc.
DS39024B-page 55
LCD.C
 Description
DelayFor18TCY();
E_PIN = 1;
// Clock nibble into 
LCD
DelayFor18TCY();
E_PIN = 0;
#ifdef UPPER
// Upper nibble 
interface
DATA_PORT &= 0x0f;
DATA_PORT |= ((data<<4)&0xf0);
#else
// Lower nibble 
interface
DATA_PORT &= 0xf0;
DATA_PORT |= (data&0x0f);
#endif
DelayFor18TCY();
E_PIN = 1;
// Clock nibble into 
LCD
DelayFor18TCY();
E_PIN = 0;
#ifdef UPPER
// Upper nibble 
interface
TRIS_DATA_PORT |= 0xf0;
#else
// Lower nibble 
interface
TRIS_DATA_PORT |= 0x0f;
#endif
#endif
return;
}