.........
AllDigital ---- ok all digital
ADCON1 = 0x0e ---- ok RA0 is an analog pin
Define SIMULATION_WAITMS_VALUE = 1 'SIMULATION ONLY
Define LCD_BITS = 8 ---- ok, 8 bit LCD interface
Define LCD_DREG = PORTA ---- Hmmmm......Port A - all 8 bits go out to the LCD. Wait a minute, didn't you just set RA0 to be an analog input? Hmmmm....
Define LCD_DBIT = 0
Define LCD_RSREG = PORTB
Define LCD_RSBIT = 0
Define LCD_RWREG = PORTB
Define LCD_RWBIT = 1
Define LCD_EREG = PORTB
Define LCD_EBIT = 2
Define LCD_READ_BUSY_FLAG = 1
Lcdinit
Dim an0 As Word
loop:
Adcin 0, an0
Lcdcmdout LcdClear
Lcdout "Analog input AN0"
Lcdcmdout LcdLine2Home
Lcdout "Value: ", #an0
Toggle RB4
WaitMs 250
Goto loop