Hi Rob,

funlw65 (?...) is right, you don't have to specify ADC_NCHANNEL because
analog pins are independent. When using ADC_NCHANNEL is such case, you'll
get an error like "You can't specify the number of ADC channel with
ADC_NCHANNEL, you have to use set_analog_pin(...)". Quite explicit.

The problem is, because of a bug in adc_clock.jal, you didn't see this
message, and see the one you reported. So I fixed adc_clock.jal. Please
update svn and give another try. Let me know the results, I'll also write a
test.

Attached is a compilable sample. I took 16f88_adc_highres.jal to write, and
removed serial stuff, since it doesn't seem to support it.


Cheers,
Seb
--
Sébastien Lelong
http://www.sirloon.net
http://sirbot.org


2009/8/20 Rob Hamerling <[email protected]>

>
>
> Hi Seb,
>
> I've tried to understand how to work with the ADC by reading the blog,
> some of the samples and the html docs. But I'm afraid it is rather foggy.
>
> I want to build a single channel dimmer with a 12F683: a potmeter on
> GP4/AN3 and PWM output on GP2/CCP1. Should be simple!
>
> It is not clear to me if I have to specify adc_nchannel is 1 or 4. I
> suspect I need 4 (since I use AN3), but how to 'get back'
> GP0/AN0..GP2/AN2 for other work?
>
> I cannot get rid of a compile error:
>
> k:/jallib/include/peripheral/adc/adc_clock.jal:149: "jallib_adcs" not
> defined
>
> I've browsed the ADC libs but I could not find a reference to the
> 12F683. It is supposed to be supported?
>
> It would be nice if you could provide me with an elementary setup!
>
> Regards, Rob.
>
> --
> Rob Hamerling, Vianen, NL (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 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en
-~----------~----~----~----~------~----~------~--~---

Attachment: 12f683_adc_highres.jal
Description: Binary data

Reply via email to