Thank you Charles Linquis and Mister E. Both of your suggestions were helpful. I have incorporated your suggestions in the program below, but I get an error when the compiler reaches the HSERIN command.
ERROR Line 38: Expected '['.
I have tried many different ways to confugure the HSERIN command, but always get this or sometimes additional errors. Any suggestions?
Thanks again for your help.
DEFINE ADC_BITS 10
DEFINE ADC_CLOCK 3
DEFINE ADC_SAMPLEUS 10
adcVar VAR WORD
TRISA = %11111111
ADCON1 = %10000010
DEFINE HSER_RCSTA 90h
DEFINE HSER_TXSTA 24h
DEFINE HSER_BAUD 9600
DEFINE HSER_CLOERR 1
PAUSE 005
main:
If PIR1.5 = 1 THEN
HSERIN[char]
HSEROUT [DEC adcvar, 10, 13]
ENDIF
ADCIN 0, adcVar
PAUSE 50
GOTO main




Bookmarks