/*
 * lcdtest2.c
 *
 * Test lcd.lib and delays.lib
 * 
 * Shows the operation of lcd_goto to position cursor
 *
 * 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 < 128; i++) {
            lcd_putc(i);
	    lcd_goto(0,5);
	    lcd_printdec(i);
	    lcd_goto(0,10);
            lcd_printhex(i);
            lcd_goto(1,2);  /* goto row 1 col 5 */
	    lcd_printbin(i);
      delay_s(1);
      lcd_clear();
    }
  }
}
