alan
Joined: 12 Nov 2012 Posts: 357 Location: South Africa
|
#FUSES NOOSCIO |
Posted: Tue May 13, 2014 5:05 am |
|
|
dsPIC33EP32MC202
CCS 5.024
I am going crazy here.
If you include #FUSES NOOSCIO and use the FRC what do you get out at the OSC2 pin? The Fosc or Fcy?
I have setup the Fosc as 80Mhz, gone through the registers, which looks right to me.
But I am getting a frequency of 40MHz out of the OSC2 pin. Also by using the code below the Tcy are 50ns corresponding to 40MHz instead of the 25ns expected.
Code: |
while (TRUE) {
output_high(LED);
output_low(LED);
output_high(LED);
output_low(LED);
output_high(LED);
output_low(LED);
output_high(LED);
output_low(LED);
output_high(LED);
output_low(LED);
|
I have the following fuses
Code: |
#FUSES NOWDT //No Watch Dog Timer
#FUSES NOIESO //Internal External Switch Over mode disabled
#FUSES NOOSCIO //OSC2 is general purpose output
#FUSES NOCKSNOFSM //Clock Switching is disabled, fail Safe clock monitor is disabled
#FUSES NOWINDIS //Watch Dog Timer in Window mode
#FUSES NOJTAG //JTAG disabled
#use delay(internal=80MHz)
|
I also tried using the
Code: |
setup_oscillator(OSC_INTERNAL,80000000);
| with no difference in the outputs.
Regards |
|