IR
From Acroname:
Reference:Report
Code:(Example)
DEFINE OSC 4
DEFINE ADC_BITS 10
DEFINE ADC_CLOCK 3
DEFINE ADC_SAMPLEUS 50ADCvar VAR WORD
TRISA = %11111111
ADCON1 = %10000010
OUTPUT PORTC.4main:
ADCIN 0, ADCvar ' Read channel 0 to adval
if (ADCvar > 200) then
high portc.4 'else
low portc.4endif
Serout2 PORTC.6, 16468, [DEC ADCvar, 13, 10] ' print it to serial out,
' with linefeed and carriage return (10, 13)goto main