If I understood correctly:
I did NOT compile or test this, it serves as an idea as to what to do, rather than exampleCode:@ DEVICE PIC12F683,FCMEN_OFF @ DEVICE PIC12F683,IESO_OFF @ DEVICE PIC12F683,BOD_OFF @ DEVICE PIC12F683,CPD_OFF @ DEVICE PIC12F683,PROTECT_OFF @ DEVICE PIC12F683,MCLR_OFF @ DEVICE PIC12F683,WDT_OFF @ DEVICE PIC12F683,INTRC_OSC_NOCLKOUT OSCCON = %01100000 TRISIO = %00001111 GPIO = %00000000 WPU = %00000000 OPTION_REG = %10000000 ANSEL = %00000001 VRCON = %10101100 DEFINE ADC_BITS 8 DEFINE ADC_CLOCK 3 DEFINE ADC_SAMPLEUS 50 adpot var byte dummy var byte start: dummy = adpot ADCIN 0,adpot if adpot = dummy then start serout 5,1200,[adpot] pauseus 200 goto start END




Bookmarks