dspic33fj128mc506 and PLL
Posted: 27 Jul 2011 16:06
Hi...
I have a problem, I wanna run my dspic at 80MHZ(40 MIPS) so I set it like this picture:
I'm using a 8Mhz crystal and I think there's nothing to do anymore, so my code is here:
It should give me a signal with 10MHz of frequency(Because I think there are 4 intructions there), but It gives me a signal with 6.25MHz, when I run it with a 10MHz crystal It gives me a signal with 7.82MHz and It can't start up, I need to start It up with 8MHz and then to change for a 10MHz. I don't know why this happend because It should start up with internal oscillator as I set.
Could Somebody help me?
Thank you!
I have a problem, I wanna run my dspic at 80MHZ(40 MIPS) so I set it like this picture:
I'm using a 8Mhz crystal and I think there's nothing to do anymore, so my code is here:
Code: Select all
void main()
{
setup();
TRISB.F6 = 0;
while(1)
{
PORTB.F6 = 1;
PORTB.F6 = 0;
}
}
It should give me a signal with 10MHz of frequency(Because I think there are 4 intructions there), but It gives me a signal with 6.25MHz, when I run it with a 10MHz crystal It gives me a signal with 7.82MHz and It can't start up, I need to start It up with 8MHz and then to change for a 10MHz. I don't know why this happend because It should start up with internal oscillator as I set.
Could Somebody help me?
Thank you!