View previous topic :: View next topic |
Author |
Message |
TomX
Joined: 13 Sep 2005 Posts: 2
|
Compiler, pic16f688, FCMEN fuse |
Posted: Tue Sep 13, 2005 12:23 pm |
|
|
We are using the PIC16F688 with the CCS compiler. On this chip, we want to disable the automatic clock switchover from external to internal during clock failure. This is done with the FCMEN parameter in the config string. Examples we saw show NOFCMEN as the thing you put in config string.
After programming the chip, it shows that FCMEN is still active.
Any ideas on what we are doing wrong?
thanks,
TomX |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Sep 13, 2005 12:25 pm |
|
|
Post your compiler version. This will be a number like 3.191, or 3.233,
etc. |
|
|
TomX
Joined: 13 Sep 2005 Posts: 2
|
|
Posted: Tue Sep 13, 2005 12:29 pm |
|
|
We are using IDE 3.43 and compiler 3.207 |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Sep 13, 2005 12:59 pm |
|
|
I tested PCM vs. 3.233 with the simple test program below, and it fails.
The .LST file always shows FCMEN (and the config bits also show it).
I compiled it for the 16F687 and 16F88, and it works OK.
I think the problem is probably in the settings in the Devices.dat file.
Since you have PCW or PCWH, you can use the Device Editor to fix this.
Look at this screen-shot of the Device Editor.
http://www.ccsinfo.com/pix/Device%20Editor.gif
In the upper right corner, it shows the fuses. You should load the
16F688 file and check the settings for FCMEN and NOFCMEN.
Check if the MASK and the VALUE are correct. If not, then change them.
Code: | #include <16F688.H>
#fuses XT, NOFCMEN
#use delay(clock = 4000000)
//=======================
main(void)
{
while(1);
} |
|
|
|
|