/********************************************************************** * LCD test program **********************************************************************/ #include #include "lcd4.h" #define _XTAL_FREQ 10000000 __CONFIG(HS & WDTDIS & PWRTEN & UNPROTECT); /***** EEPROM Setting *****/ __EEPROM_DATA(0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00); __EEPROM_DATA(0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00); __EEPROM_DATA(0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00); __EEPROM_DATA(0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00); __EEPROM_DATA(0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00); __EEPROM_DATA(0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00); __EEPROM_DATA(0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00); __EEPROM_DATA(0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f); void main(void){ int i,j; Init_LCD4(); for(i=0; i<16; i++){ Putc_LCD4(0x0,1); } while(1){ for(i=0; i<8; i++){ CGRAM(0, i*8); for(j=0; j<25; j++){ __delay_ms(10); } } for(i=6; i>0; i--){ CGRAM(0, i*8); for(j=0; j<25; j++){ __delay_ms(10); } } } }