void lcd_UserInfoDispaly(void)
{
int i;
lcd_goto(0x00);
lcd_puts("ABCDEF"); //Display string in LCD*/
lcd_goto(0x42);
lcd_puts("ABCDEF TEST"); //Display char in LCD
lcd_goto(0x14);
lcd_puts("AAA-001"); //Display char in LCD
lcd_goto(0x58);
lcd_puts("Ver1.00"); //Display char in LCD
for(i=100;i>0;i--){
DelayMs(500);
}
lcd_clear();
lcd_goto(0x00);
lcd_puts("Frequency:"); //Display string in LCD*/
lcd_goto(0x0B);
lcd_puts("Volt:"); //Display string in LCD*/
lcd_goto(0x47);
lcd_puts("Hz"); //Display string in LCD*/
lcd_goto(0x4E);
lcd_puts("V"); //Display string in LCD*/
lcd_goto(0x50);
lcd_puts("Design:ABCDEF/HI"); //Display string in LCD*/
}
/*
* LCD interface example
* Uses routines from delay.c
* This code will interface to a standard LCD controller
* like the Hitachi HD44780. It uses it in 8 bit mode, with
* the hardware connected as follows (the standard 14 pin
* LCD connector is used):
*
* PORTB bits 0-7 are connected to the LCD data bits 0-7
* PORTC bit 0 is connected to the LCD RS input (register select)
* PORTC bit 2 is connected to the LCD EN bit (enable)
*
* To use these routines, set up the port I/O (TRISB, TRISC) then
* call lcd_init(), then other routines as required.
*
*/
lcd_write(0x38); // 8 bit mode, 1/16 duty, 5x7 font
lcd_write(0x08); // display off
lcd_write(0x0F); // display on, blink curson on
lcd_write(0x06); // entry mode
}
/*
* Delay functions
* See delay.h for details
*
* Make sure this code is compiled with full optimization!!!
*/
/*
* Delay functions for HI-TECH C on the PIC
*
* Functions available:
* DelayUs(x) Delay specified number of microseconds
* DelayMs(x) Delay specified number of milliseconds
*
* Note that there are range limits: x must not exceed 255 - for xtal
* frequencies > 12MHz the range for DelayUs is even smaller.
* To use DelayUs it is only necessary to include this file; to use
* DelayMs you must include delay.c in your project.
*
*/
/* Set the crystal frequency in the CPP predefined symbols list in
HPDPIC, or on the PICC commmand line, e.g.
picc -DXTAL_FREQ=4MHZ
or
picc -DXTAL_FREQ=100KHZ
Note that this is the crystal frequency, the CPU clock is
divided by 4.
* MAKE SURE this code is compiled with full optimization!!!
*/
#ifndef XTAL_FREQ
#define XTAL_FREQ 4MHZ /* Crystal frequency in MHz */
#endif
#define MHZ *1000L /* number of kHz in a MHz */
#define KHZ *1 /* number of kHz in a kHz */