--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
I used A/D on a 33F and a 24H (they're virtually identical). Here's what the
ADC doc says:
====================
The 10-bit ADC configuration (AD12B = 0) has the following key features:
. Successive Approximation (SAR) conversion
. Conversion speeds of up to 1.1 Msps
. Up to 32 analog input pins
. External voltage reference input pins
. Simultaneous sampling of up to four analog input pins
. Automatic Channel Scan mode
. Selectable conversion trigger source
. Selectable Buffer Fill modes
. DMA support, including Peripheral Indirect Addressing
. Four result alignment options (signed/unsigned, fractional/integer)
. Operation during CPU Sleep and Idle modes
The 12-bit ADC configuration (AD12B = 1) supports all the features
described, except:
. In the 12-bit configuration, conversion speeds of up to 500 ksps are
supported
. There is only one Sample/Hold amplifier in the 12-bit configuration, so
simultaneous
sampling of multiple channels is not supported
====================
Do you need to sample multiple channels simultaneously?
Vitaliy
Do you need features like 50 rejection or 60Hz rejection or simulataneous
50/60Hz rejection? If you need any of them, probably it is better to use
external sigma-delta filtering with built-in support for these features.
But yours is 12bit, probably these features are not required. We typically
do 15/16bit and use 24bit sigma-delta converters from ADI and TI.
It is challenging to get 1KHz sampling for true 16bit.
--
Xiaofan http://mcuee.blogspot.com
> Hi all,
> I need to sample 32 analog (4-20mA) at 1 KHz. The required resolution is
> 12 bit.
> Have anyone experience with the 12 bit A/D converter included in some
> PIC, like 18F4558 or dsPIC30F3014?
> Or it's better to use some external A/D?
> TIA
> Nicola
Are you wanting to sample at 1KHz or sample a 1KHz signal ? If sampling at
1KHz you may need to check the datasheets for the PICs; I believe some of
them say that sample rates below 10KHz introduce significant error due to the
S/H capacitor leakage. I think this is mentioned in the dsPIC30F family
reference, but my exposure to other PICs is rather limited.
Regards,
Pete Restall
> Are you wanting to sample at 1KHz or sample a 1KHz signal ? If sampling at
> 1KHz you may need to check the datasheets for the PICs; I believe some of
> them say that sample rates below 10KHz introduce significant error due to the
> S/H capacitor leakage. I think this is mentioned in the dsPIC30F family
> reference, but my exposure to other PICs is rather limited.
>
> Regards,
>
> Pete Restall
Just found that section in the datasheet actually; table 22-39 for the
30F2010. It refers to the internal clock rate of the ADC (Tad) rather than
the sample rate - there's nothing to stop you sampling at low speeds with a
fast Tad time. Makes sense really.
Check out Microchip's product selector - just bash in your criteria and see
what is shows:
http://www.microchip.com/maps/microcontroller.aspx
You did not list either a 33F or 24H in your OP, so there was no way for me
to know that you read the datashets.
> I want your opinion because for many thing is more valuable ;-)
My opinion on what? "Garbage in, garbage out" -- if you want good answers,
you've got to ask the right questions. :)
>> Do you need to sample multiple channels simultaneously?
>
> It is a good point; maybe it would not be a problem because I must
> anyway share the channels on more than 1 pic (4*8 = 32 maybe) so at
> 100ksps the timing is enough "simultaneous".
Well then, use any PIC that has enough channels. :-)
Vitaliy
He says he needs to sample at 1KHz, but it's not clear whether that means
each signal individually or all 32 signals at 1KHz total. This is one
reason I didn't bother reply, since this ambiguity is self-evident. If this
guy can't even write a comprehensible question, he's way over his head
playing with 'puter thingies.
********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014. Gold level PIC consultants since 2000.
> If sampling at 1KHz you may need to check the datasheets for the PICs;
> I believe some of them say that sample rates below 10KHz introduce
> significant error due to the S/H capacitor leakage. I think this is
> mentioned in the dsPIC30F family reference, but my exposure to other
> PICs is rather limited.
Really? How would the sample rate (as opposed to the conversion time)
affect the effect of the S/H leakage? Or is the sample rate linked to
the conversion time?
Gerhard
Very unlikely.
> How would the sample rate (as opposed to the conversion time)
> affect the effect of the S/H leakage? Or is the sample rate linked to
> the conversion time?
I think this is simply a pile of BS by someone who is repeating heresay,
didn't read the datasheet well, or doesn't understand about acquisition time
versus converion time. I would disregard this as nonsense.
********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014. Gold level PIC consultants since 2000.
> If this guy can't even write a comprehensible question, he's way over his head
> playing with 'puter thingies.
>
This is a free insult to myself.
My english is bad but I'm an honest and esteemed professional.
Maybe someone remember the problems of Jinx with his 18F1320.
I want to say if this 12 bit A/D is working well, like stated in the
datasheet or if somebody encontered some strange problem!
Thanks
Nicola
>> How would the sample rate (as opposed to the conversion time)
>> affect the effect of the S/H leakage? Or is the sample rate linked to
>> the conversion time?
>
> I think this is simply a pile of BS by someone who is repeating heresay,
> didn't read the datasheet well, or doesn't understand about acquisition time
> versus converion time. I would disregard this as nonsense.
It was bad memory and not having the datasheet immediately to hand - but I did
post a correction not long after when I'd got the datasheet in front of me.
And I did wonder if I'd get flak for the first post...I thought my follow-up
would stifle the flames but it was obviously missed...oops (and apologies) !
Regards,
Pete Restall
My God, you're right! <:-O
:-)))
Slow changing voltage? Like temp sensors, or battery level meters?
I don't know -- it's your project! :)
> My english is bad but I'm an honest and esteemed professional.
I have no doubt that you are. English is my second language too, but I think
in this case it's not about proper syntax or spelling as much as it is about
providing enough detail about what it is you're trying to accomplish.
"Garbage in, garbage out" was not meant as an insult, BTW. It's a common
expression among programmers, which means "bad input = bad output". It
looked like you did not like my reply, so I tried to explain why I thought
you didn't like it, and what you can do about it.
Best regards,
Vitaliy