CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

ADC internal clock sampling frequency

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
rigomm



Joined: 17 Mar 2010
Posts: 13

View user's profile Send private message

ADC internal clock sampling frequency
PostPosted: Thu Aug 05, 2010 7:40 am     Reply with quote

Hello.
I´m using the dspic30f3012 configured to use the Fast RC oscillator and the 16 PLL. Everything works fine but...

I´m trying to figure out what is the "ADC internal clock"
I know that there are several clock sources for the ADC module. I have used the external clock but now I´m using the directive:
Code:

setup_adc( ADC_CLOCK_INTERNAL );

How can I calculate the sampling rate?
What or where is that ADC_Internal clock?, is a special clock for the ADC, what is the frequency.
I read the data sheet and search in this forum and many others but I couldn't find answers.

I measured the conversion time for my program and the TAD is 208ns!!!


As mentioned above, the main clock is (7,37MHz*16=117.92MHz) FRC.

How con I calculate the sampling rate, where come from this 208ns?

Thank you for any help or hint!
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Aug 05, 2010 11:37 am     Reply with quote

Look in the dsPIC30 Reference manual for the 10 Bit A/D converter.
It's Section 17 on this page:
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2574
rigomm



Joined: 17 Mar 2010
Posts: 13

View user's profile Send private message

Solved...but
PostPosted: Thu Aug 05, 2010 10:44 pm     Reply with quote

PCM programmer, than you for your time to reply my message! Very Happy

Actually I had already read this file that you kindly addressed to, but I didn't find what I was looking for.
and those documents are intended for a 10bits converter, but anyway, just by adding 2 TAD more it will works for a 12 bits ADC.

However I didn't find any hint about the sampling rate using the internal ADC clock on these pages.
But I found the answer in this other file.
http://techtrain.microchip.com/webseminars/documents/dsPIC12bADC_p1_121604.pdf

Th internal AD clock has a nominal rate of 47KSPS with a nominal Time of conversion of 21us, according to that file.
I hope it helps to somebody else looking for the same data.

By the way, I measured that and I have a conversion time of 32us, so I have 11us more from I don't know where. Rolling Eyes
Anyway, I'm keep searching.
Thanks!
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Aug 05, 2010 10:51 pm     Reply with quote

Look in the Electrical Specifications section in your PIC data sheet.

Look for this parameter in the A/D CONVERSION TIMING REQUIREMENTS table:
Code:

tRC      A/D Internal RC Oscillator Period

It will give the typical oscillator period, in ns. (Also the min and max).

I don't have the data sheet for your PIC with me, but it will probably
have that spec in it.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group