|
|
View previous topic :: View next topic |
Author |
Message |
warren.woolseyiii
Joined: 19 Jul 2013 Posts: 10
|
External Oscillator and PLL with dsPIC33FJ64GS606 |
Posted: Fri Jul 19, 2013 4:44 pm |
|
|
Hi there, so I am simply trying to establish the primary oscillator as an external oscillator running at 2.4575 Mhz and using a PLL of 1 for the time being. Basically, the code compiles and I can load it through the debugger, but when I run the program it never executes down to the main. I can't set a break point anywhere above the main (using the CCS IDE) so I am assuming the fuses I set up are wrong. Any help, especially with the fuses, would be greatly appreciated!
Here is my code:
Code: |
#include <33FJ64GS606.h> //Library for the dsPIC MCU on the board
#device ICD=3 //Using the ICD U64
#fuses EC, NOWDT, PR_PLL, IESO, CKSFSM //External Oscillator, No Watchdog Timer, Primary Oscillator with PLL, Internal External Switchover enabled, Clock Switching enabled
#use delay(oscillator=2.4575Mhz, clock=2.4575Mhz)
#define TOGGLE PIN_F5
void main() {
while (1) {
output_high(TOGGLE);
delay_ms(1000);
output_low(TOGGLE);
}
} |
|
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19539
|
|
Posted: Sat Jul 20, 2013 4:54 am |
|
|
It's not possible....
Look at the data sheet. What possible frequency output range, does the PLL support?. Look at figure 9-2 in the data sheet. Can the PLL generate 2.4575Mhz?....
From your clock, with /2 as a prescaler (minimum), the PLL will be fed with 1.22875Mhz. Then to meet the allowable output range, *82, to *162 would have to be used, giving output clock rates down to 12.5946MHz, up to 99.52Mhz.
Best Wishes |
|
|
|
|
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
|