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

External Oscillator and PLL with dsPIC33FJ64GS606

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



Joined: 19 Jul 2013
Posts: 10

View user's profile Send private message

External Oscillator and PLL with dsPIC33FJ64GS606
PostPosted: Fri Jul 19, 2013 4:44 pm     Reply with quote

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: 19568

View user's profile Send private message

PostPosted: Sat Jul 20, 2013 4:54 am     Reply with quote

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
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