'Here is another sample of AD convert
'the result shows on LCD
'load cell output feed to portA.3
' Sep 25, 2006
'*****************************

DEFINE OSC 4

W1 VAR WORD

include "modedefs.bas"

PAUSE 1000 'LCD takes a second to start

TRISA = 255 'PORTA all inputs
ADCON1 = 0 'PORTA Analog I/O
ADCON0.7 = 1 'Right justified.


' Initialize USART
TRISC = %10111111 'Set TX (PortC.6) to out, rest in
TXSTA = %00100000 'Enable transmit and asynchronous mode

SEROUT PORTC.6,N9600,["Citrus Counter ",254,2]
PAUSE 1000

SEROUT PORTC.6,N9600,[254,1] ' Clear screen

LOOP1:
ADCIN 3, W1
SEROUT PORTC.6,N9600,[#W1,13]
GOTO LOOP1
END
'************************************************* ******