Arizona 17 User Manual

Page of 92
PICDEM™ 17 Demonstration Board User’s Guide
DS39024B-page 42
 2001 Microchip Technology Inc.
5.7
 
XLCD.C
 Source Code Listing
#include <p17cxx.h>
#include “xlcd.h”
/
*******************************************************************
*
*   PICmicro C Libraries V2.10                                      
*   Written and Tested using MPLABC V2.10                           
*******************************************************************
**
*   Filename:   
 xlcd.c                                        
*   Date:
14 April 1998                                   
*   File Version:
2.10                                            
*******************************************************************
**
*   Functions:                                                      
*
void OpenXLCD(unsigned char lcdtype)                
*
void SetCGRamAddr(unsigned char CGaddr)             
*
void SetDDRamAddr(unsigned char DDaddr)             
*
unsigned char BusyXLCD(void)                        
*
unsigned char ReadAddrXLCD(void)                    
*
char ReadDataXLCD(void)                             
*
void WriteCmdXLCD(unsigned char cmd)                
*
void WriteDataXLCD(char data)                       
*
void putsXLCD(char *buffer)                         
*
void putrsXLCD(const rom char *buffer)              
*******************************************************************
**
*   Revision History:                                               
*      V1.00 - Beta release of Peripheral Libraries for V1.21       
*      V2.00 - Release of Peripheral Libraries for V2.00            
*      V2.10 - Release of Peripheral Libraries for V2.10            
*******************************************************************
**
*   Notes:                                                          
*      - ROM usage varies depending on specified device             
*******************************************************************
*/
/
*******************************************************************
*
* Function Name:
putsXLCD                                    
* Return Value:
void                                        
* Parameters:
buffer: pointer to string                   
* Description:
This routine writes a string of bytes to the
*
Hitachi HD44780 LCD controller. The user    
*
must check to see if the LCD controller is 
*
busy before calling this routine. The data 
*
is written to the character generator RAM or
*
the display data RAM depending on what the 
*
previous SetxxRamAddr routine was called.   
*******************************************************************
*/
void putsXLCD(static char *buffer)
{