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 CCS Technical Support

dspic33EP with external clock source

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



Joined: 09 Feb 2007
Posts: 56

View user's profile Send private message

dspic33EP with external clock source
PostPosted: Wed Sep 04, 2024 9:31 am     Reply with quote

Hello,
We need to clock a dspic33pe from an external clock source and I am looking for suggestions on the fuse settings. We have a 20MHz external clock and we plan to connect this to the OSC1 pin. The question is how do I set the EC (external clock) mode but also use the internal PLL to give the 140MHz for the internal instruction clock. Will the following work?

#FUSES EC
#FUSES PR_PLL //??

Thanks
gaugeguy



Joined: 05 Apr 2011
Posts: 303

View user's profile Send private message

PostPosted: Wed Sep 04, 2024 9:51 am     Reply with quote

I don't have that part, but probably use the setup_oscillator function and let it set the fuses.
setup_oscillator(OSC_CLOCK, 20M, 140M);
Ttelmah



Joined: 11 Mar 2010
Posts: 19495

View user's profile Send private message

PostPosted: Wed Sep 04, 2024 10:04 am     Reply with quote

You don't.
The key is that the PLL operation is not done in fuses. It has to be setup
by the code at the start of the boot. So the #use delay has to specify the
oscillator and required clock frequencies, and this then programs the PLL
Code:

#use delay(OSCILLATOR=20MHz, CLOCK=140MHz)


OSCILLATOR keyword says the clock is coming from an external oscillator.
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