/* * lcdtest3.c * * Test lcd.lib and delays.lib * * Shows the operation of lcd_scroll_left and lcd_scroll_right * commands * * Prints out the first 32 characters of the ASCII character set. Only * the first 16 show on my LCD, so I scroll left by 16 * characters. Then I scroll back right by 16 characters. * * Connect the LCD to port A pin 1 (i.e. physical pin 18 on a 16C84) * * Mark Crosbie 9/20/98 */ #define LCDPIN 1 void main(void) { char i; set_bit(STATUS, RP0); // select the register bank 1 clear_bit(TRISA, LCDPIN); // Port A is output clear_bit(STATUS, RP0); delay_s(1); lcd_clear(); delay_s(1); while(1) { for(i=32; i < 64; i++) { lcd_putc(i); } delay_s(1); for(i=0; i < 16; i++) { lcd_scroll_left(1); delay_ms(200); } delay_s(2); for(i=0; i < 16; i++) { lcd_scroll_right(1); delay_ms(200); } delay_s(2); lcd_clear(); } }