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
Posted: Wed Sep 04, 2024 9:51 am
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: 19529
Posted: Wed Sep 04, 2024 10:04 am
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.
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