View previous topic :: View next topic |
Author |
Message |
Nick Guest
|
how do I tell CCS to set the pic to use an external clock? |
Posted: Wed Sep 01, 2004 1:20 pm |
|
|
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
|
|
Posted: Wed Sep 01, 2004 1:53 pm |
|
|
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
|
|
Posted: Wed Sep 01, 2004 2:18 pm |
|
|
ya, that was pretty dumb of me.
pic16f767 |
|
|
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
|
Posted: Wed Sep 01, 2004 2:44 pm |
|
|
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
|
|
Posted: Wed Sep 01, 2004 4:44 pm |
|
|
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
|
|
Posted: Wed Sep 01, 2004 8:18 pm |
|
|
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
|
|
Posted: Wed Sep 01, 2004 9:32 pm |
|
|
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
|
|
Posted: Wed Sep 01, 2004 10:37 pm |
|
|
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
|
|
Posted: Thu Sep 02, 2004 8:47 am |
|
|
Just curious... is it possible to program the Configuration word with a command, something like #rom?
Ronald |
|
|
|