in what way does it not work ?
where and what are your config settings
advalLow and advalHigh only need to be bytes
advalLow VAR byte ' make it available to use in PBP
advalHigh VAR byte ' make it available to use in PBP
since ADRESH and ADRESHL are sequential in memory for that chip its possible to save a bit of typing by :-
Code:@my_adresult =ADRESHL my_adresult var word ext ;............. ADCIN 0, adval ' Read channel 0 to dummy adval adval = my_adresult
Bookmarks