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 CCS Technical Support

Issues with 16F785 and FUSES

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



Joined: 18 Oct 2005
Posts: 3

View user's profile Send private message

Issues with 16F785 and FUSES
PostPosted: Tue Oct 18, 2005 4:46 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Oct 18, 2005 4:56 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Wed Oct 19, 2005 12:44 am     Reply with quote

#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

View user's profile Send private message

PostPosted: Wed Oct 19, 2005 7:37 am     Reply with quote

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

View user's profile Send private message

PostPosted: Wed Oct 19, 2005 7:59 am     Reply with quote

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.
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