|
|
View previous topic :: View next topic |
Author |
Message |
Gareth
Joined: 18 Oct 2005 Posts: 3
|
Issues with 16F785 and FUSES |
Posted: Tue Oct 18, 2005 4:46 pm |
|
|
I am having trouble simply setting the fuses correctly for this device.
I have had to modify to the compiler data as the fuse settings were quite wrong. More of the fuses are set correctly when compiling, but not FCMEN (can't disable) and can't select INTRC_IO, the database settings (in device editor) are correct......any help would be much appreciated.
In addition....the device programs ok, but will not run at all. (simple pin toggle pgm)
________________________________________________________ |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Oct 18, 2005 4:56 pm |
|
|
Post the simple program, including all #fuses, #use, and #include statements.
Also post your compiler version. This will be a number like 3.191,
or 3.236, etc. You can find it at the top of the .LST file, which is
in your project directory. |
|
|
Gareth
Joined: 18 Oct 2005 Posts: 3
|
|
Posted: Wed Oct 19, 2005 12:44 am |
|
|
#include <16F785.h>
#fuses INTRC_IO, PUT, NOWDT,NOPROTECT, NOBROWNOUT, NOIESO, NOFCMEN, NOMCLR
#use delay(clock=4000000)
main() {
}
///////////////////////////////
The above does not disable FCMEN (0x2007:11).
I have resolved the other issues. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Wed Oct 19, 2005 7:37 am |
|
|
You didn't post your compiler version.
I tried to compile your program with PCM vs. 3.236 and it wouldn't
compile. The reason is because it doesn't accept the NOFCMEN and
NOIESO fuses.
Here's the top of the 16F785.H file for PCM vs. 3.236.
It doesn't list those fuses. I think you need to send an email
to CCS support and tell them that.
Quote: | //////// Standard Header file for the PIC16F785 device ////////////////
#device PIC16F785
#nolist
//////// Program memory: 2048x14 Data RAM: 127 Stack: 8
//////// I/O: 18 Analog Pins: 12
//////// Data EEPROM: 256
//////// C Scratch area: 20 ID Location: 2000
//////// Fuses: LP,XT,HS,EC_IO,NOWDT,WDT,NOPUT,PUT,PROTECT,NOPROTECT,MCLR
//////// Fuses: NOMCLR,BROWNOUT,NOBROWNOUT,INTRC,INTRC_IO,RC,RC_IO,BORV45
//////// Fuses: BORV42,BORV27,BORV25 |
|
|
|
Gareth
Joined: 18 Oct 2005 Posts: 3
|
|
Posted: Wed Oct 19, 2005 7:59 am |
|
|
Hi
The reason it does not compile is because the compiler database has the wrong settings for this device. I have corrected this in Device Editor, but still the FCMEN does not work 0x2007: MASK 0x800. The NOIESO is working correctly through correcting these settings.
Compiler is latest 3.236, but have also tried 3.227. |
|
|
|
|
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
|