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 support@ccsinfo.com

Updated CCS Software, 20MHz Circuit Runs at 6.63MHz?

 
Post new topic   Reply to topic    CCS Forum Index -> CCS ICD / Mach X / Load-n-Go
View previous topic :: View next topic  
Author Message
JV625



Joined: 25 Jun 2009
Posts: 16

View user's profile Send private message

Updated CCS Software, 20MHz Circuit Runs at 6.63MHz?
PostPosted: Thu Dec 23, 2010 11:26 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Fri Dec 24, 2010 11:17 am     Reply with quote

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

View user's profile Send private message

PostPosted: Fri Dec 24, 2010 4:21 pm     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> CCS ICD / Mach X / Load-n-Go 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