ok, adc_read(), not set_analog_pin()... Forget about my last reply :)
Cheers, Seb 2012/2/3 Sebastien Lelong <[email protected]> > Hi Rob, > > Sorry, that doesn't make any sense to me, I must be missing something... > > With my last version of adc_channels.jal, channels up to 29 is handled. So > adc_read(31) doesn't match any case, how could this work ? (the fact my ADC > libs were highly resilient was a joke :)) > > Anyway I'll update with channels up to 31 (one could say I should check > this dynamically within template processing...) > > Cheers, > Seb > > > 2012/2/2 Rob Hamerling <[email protected]> > >> >> Hi Sbe, >> >> >> On 02/02/12 06:47 pm, Sebastien Lelong wrote: >> >> there's no reason adc_read(30) works... maybe it reads all channels on >>> default? >>> >> >> Well, adc_read(30) simply and unconditionally reads ADC channel 30, like >> it would do with any other channel number. When the channel doesn't exist, >> or the pin is not setup correctly the returned value will not be meaningful! >> When the FVRCON register is setup for temperature measurement the >> temperature module is coupled to channel 30 and thus a value representing >> the temperature is returned. When the temperature module is not activated >> the returned value of channel 30 is all binary 1's. >> Similarly when the FVR module is enabled its output is coupled to ADC >> channel 31 and a value representing the voltage can be read with >> adc_read(31). >> >> Regards, Rob. >> >> >> >>> Le 2 févr. 2012 16:49, "Rob Hamerling" <[email protected] >>> <mailto:[email protected]**>> a écrit : >>> >> >> FYI: I noticed that the 16f1527 has actually 32 ADC channels, of >>> which channel 30 is to read the builtin temperature and channel 31 >>> to read the Fixed Voltage Reference (after configuring register >>> FVRCON properly). And indeed: read_adc(30) and read_adc(31) do work >>> properly! >>> >>> >> -- >> R. Hamerling, Netherlands --- http://www.robh.nl >> >> -- >> 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 jallib+unsubscribe@** >> googlegroups.com <jallib%[email protected]>. >> For more options, visit this group at http://groups.google.com/** >> group/jallib?hl=en <http://groups.google.com/group/jallib?hl=en>. >> >> > > > -- > Sébastien Lelong > > > -- Sébastien Lelong -- 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.
