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

Clock Frequency of PIC 18F452

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



Joined: 14 Mar 2007
Posts: 12

View user's profile Send private message ICQ Number

Clock Frequency of PIC 18F452
PostPosted: Fri Mar 16, 2007 7:28 am     Reply with quote

Hi there,

I'm having problems with the clock speed of PIC 18F452.

I configure my C code with

#fuses HS
#use delay(clock=10000000)
since I want to use a crystal of frequency 10 MHz.

However my simulation program (Proteus) does not seem to be accomodating with this change eventhough I use a 10 MHz crystal in the simulation.

Are there any suggestions ?

Thnx
Ttelmah
Guest







PostPosted: Fri Mar 16, 2007 7:45 am     Reply with quote

Sounds like Proteus problem.
There are a number like ths...
Simulators are not perfect.
What is actually giving problems?.
Have you tried exiting/restarting Proteus?.

Best Wishes
rberek



Joined: 10 Jan 2005
Posts: 207
Location: Ottawa, Canada

View user's profile Send private message

PostPosted: Fri Mar 16, 2007 7:57 am     Reply with quote

What do you mean "does not seem to be accommodating with this change"?

It sounds like you are dropping a different crystal into the schematic you drew in Proteus and are expecting that to change the operating frequency of the PIC you also placed in the schematic.

You change the simulation frequency of the PIC in Proteus by right clicking on the PIC to get the Device Properties and then by selecting the frequency you want it to run at. NOT by drawing in a different crystal. You do not even have to have a crystal in the schematic. The simulation of the PIC's behaviour is purely a digital one.

Every Proteus problem I've ever seen described on this board seems to be of the RTFM variety.

r.b.
sokrates



Joined: 14 Mar 2007
Posts: 12

View user's profile Send private message ICQ Number

So ..
PostPosted: Fri Mar 16, 2007 8:13 am     Reply with quote

So the crystal option in Proteus is just an accessory?

In reality, the PIC will accomodate my crystal frequency, right?

The question is, is there any configurable mode of PIC that either selects the internal osc. or the crystal frequency?

Thanks for the advice...
rberek



Joined: 10 Jan 2005
Posts: 207
Location: Ottawa, Canada

View user's profile Send private message

PostPosted: Fri Mar 16, 2007 8:25 am     Reply with quote

Well, the schematic is also used to generate a board layout, so you'd draw in a crystal and the remaining circuit if you also wanted to continue on and lay things out. But you do not need to draw in the crystal to simulate.

As this is a digital simulation, the PIC's oscillator circuitry is not simulated and is merely assigned as a property.

Quote:
The question is, is there any configurable mode of PIC that either selects the internal osc. or the crystal frequency?


Each PIC, in real life, has several clocking options that can be selected with the fuses. Proteus does not simulate these as far as I know. The datasheets will tell you which options can be selected for use in the real world.
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