View previous topic :: View next topic |
Author |
Message |
JV625
Joined: 25 Jun 2009 Posts: 16
|
Updated CCS Software, 20MHz Circuit Runs at 6.63MHz? |
Posted: Thu Dec 23, 2010 11:26 pm |
|
|
Hi Everyone,
I haven't used my ICD-40U or CCS compiler (PCWH) in a while, but I downloaded the update today and tried to debug a program that needs to run at 20+MHz on a 18F2450.
My circuit uses a 18F2450 with a 20MHz external oscillator, but when I tried to run code that I had with #use delay (clock=20000000) the printf statements would output gibberish.
I noticed in the debugger that it says "Ready MCU at 6.63MHz" and when I set the #use delay (clock=) to 6630000 the printf statements worked properly.
The only problem is, it seems like the program runs too slow.
Any idea how to debug it at a full 20MHz or if I perhaps have some setting wrong? I never saw this 6.63MHz thing before in the prior version.
Thanks! |
|
|
newguy
Joined: 24 Jun 2004 Posts: 1908
|
|
Posted: Fri Dec 24, 2010 11:17 am |
|
|
Did your supply voltage (Vcc) change as well? I don't think that all of the LF parts do this, but many do - as the supply voltage drops, the maximum processor speed drops too. |
|
|
JV625
Joined: 25 Jun 2009 Posts: 16
|
|
Posted: Fri Dec 24, 2010 4:21 pm |
|
|
Not that I know of, and so far I've tried it with two different circuit boards and power supplies ... one at 6V and one at 5V.
Additionally, I am noticing that the fuses I set in the code will change the speed, but only between 5MHz and 6.63MHz.
If I use
#fuses HS
I get "Ready MCU at 4.98MHz"
If I use
#fuses HSPLL or no oscillator setting
I get "Ready MCU at 6.63MHz"
If I use
#fuses XT
I get an error message pop-up that says "Could not start target: The target was not halted after reset Check the target oscillator and MCLR. Make sure the target clock match the clock fuses and that the target is oscillating. Use View | Valid fuses to find the correct fuses."
Nothing seems to get me to 20MHz in this mode -- though one of the circuit boards, prior to my clearing it, was running an older program quite successfully at 20MHz. |
|
|
|