by Michael Horan

PicBasic Pro Code for the Magical, Miracle Box.

Back to SoftPot Report.

define OSC 20
define HSER_RCSTA 90h
DEFINE HSER_TXSTA 20h
DEFINE HSER_BAUD 31250


define ADC_BITS 10
DEFINE ADC_CLOCK 3
DEFINE ADC_SAMPLEUS 50


TRISA = %11111111
ADCON1 = %10000000


ADCvar var byte


grn var portb.7


main:
high grn
adcin 0, adcvar


    hserout [$C0,adcvar]


low grn
goto main