On Jan 7, 7:10 pm, "Wayne <[email protected]>" <[email protected]>
wrote:
>
> Make sure you don't call
>    enable_digital_io()
> after this adc_init(), since this disables the use of ADC.
>

Right, I meant to say, I'm not sure how to do it with JALLIB.

-- Eur's routine to read the A/D
var word analog

procedure get_analog is
   ADCON0_NDONE = true
   while ADCON0_NDONE loop end loop
   analog = word(ADRESH) << 8
   analog = analog + word(ADRESL)
end procedure

ADCON0 = 0b01_000_001
ADCON1 = 0b10_00_1110

forever loop
   get_analog()
   -- display on lcd
end loop

William
-- 
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en.


Reply via email to