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

how do I tell CCS to set the pic to use an external clock?

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







how do I tell CCS to set the pic to use an external clock?
PostPosted: Wed Sep 01, 2004 1:20 pm     Reply with quote

My pic is using the internal clock and I want it to use the external. How do I go about doing that?

Nick
rnielsen



Joined: 23 Sep 2003
Posts: 852
Location: Utah

View user's profile Send private message

PostPosted: Wed Sep 01, 2004 1:53 pm     Reply with quote

Well, it would be nice to know ..which.. PIC you are trying to use. We only have a few different ones to pick from.
Nick
Guest







PostPosted: Wed Sep 01, 2004 2:18 pm     Reply with quote

ya, that was pretty dumb of me.

pic16f767
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Wed Sep 01, 2004 2:44 pm     Reply with quote

If you mean the processor clock it is in the #fuses:

Code:
#fuses EC,WDT    // EC mode uses an External Clock, Watchdog

_________________
The search for better is endless. Instead simply find very good and get the job done.
rnielsen



Joined: 23 Sep 2003
Posts: 852
Location: Utah

View user's profile Send private message

PostPosted: Wed Sep 01, 2004 4:44 pm     Reply with quote

If you want to see what fuses are available just select View on the menu bar within the compiler and then select Valid Fuses. Select the correct PIC and it will show them.

I believe the correct fuse statement would be:

#fuses EC_IO, // and any others that would be appropriate

This (EC_IO) makes OSC1 your clock input and also makes pin RA6 an I/O. Don't use this if you are going to use a crystal, only if you have an external clock source.

Ronald
Nick
Guest







PostPosted: Wed Sep 01, 2004 8:18 pm     Reply with quote

I found out my old version doesnt have that fuse I have 3.1, darn it.

Nick
bdavis



Joined: 31 May 2004
Posts: 86
Location: Colorado Springs, CO

View user's profile Send private message

PostPosted: Wed Sep 01, 2004 9:32 pm     Reply with quote

If you have EC, you could use that also, and the OSC2 should be OSC1 divide by 4 output, but you don't get the IO pin usage on OSC2 that you would get with EC_IO. Does it show EC as a valid OSC fuse?
Nick
Guest







PostPosted: Wed Sep 01, 2004 10:37 pm     Reply with quote

no it doesnt show any of those fuse just the standard f76 ones. I'm going to get the update.

Nick
rnielsen



Joined: 23 Sep 2003
Posts: 852
Location: Utah

View user's profile Send private message

PostPosted: Thu Sep 02, 2004 8:47 am     Reply with quote

Just curious... is it possible to program the Configuration word with a command, something like #rom?

Ronald
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