Sampling time in a PIC

Status
Not open for further replies.

Wond3rboy

Member
Hi, i have been reading some posts here regarding the maximum sampling freq you can get with a PIC (usually when people are comparing AVR's and PIC's), and wanted to clear some thing up, isnt sampling an issue about reading the voltage at the input pin? If so it is not completely determined by the speed of the processor right? because the time taken for processing that information automatically varies the sampling interval? So sampling freq of a processor depends upon the type of task being carried out and of course the speed at which the processor is being run at?

Please elaborate.
 
Last edited:
The sampling time for a pic is typically around 12uS plus a couple for acquisition. If you allow a total time of 20uS then you can sample at 50kHz. The processor speed doesn't effect the sample period because it is divided down to produce the sampling clock. However the division is in binary steps and so if you are unlucky you may end up at half the ideal speed.

Mike.
 
Hi Mike,thanks for your reply, sorry i got the view across incorrectly, what i meant to say was not for the conversion time for a single analog sample (stated in the datasheet) but the whole process of sampling say a sine wave, with regard to to the nyquist rate, even if you can sample at a max say 50KHz, once you acquire a value from the AD module and store it, the storing takes time right? Which in turn limits the PIC's/ AVR's use in certain situations. Just asking to clear things up.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…