program ADC_UART_16F877
'16F877
'Clock: 8MHz
dim ADCResult as word
main:
UART1_Init(9600) 'Initialize UART at 9600bps
while true
ADCResult = ADC_Read(0) >> 2 'Read analog value from channel 0 and convert to 8-bit
UART1_Write(ADCResult) 'Write to serial port
delay_ms(100)
wend
end.
by Aaron Carman
by Duane Benson
by Duane Benson