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

12F1822 1KHz reset?
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Apr 13, 2011 2:32 pm     Reply with quote

To manually set the fuses, you can do it with a #rom statement.
Comment out your #fuses statement and add the #rom line shown below:
Code:
#include <12F1822.h>
//#FUSES INTRC_IO, NOMCLR, NOCPD, NOWDT, NOBROWNOUT, NOPUT, NOPROTECT, NOFCMEN, NOIESO
#rom 0x8007 = {0x09A4, 0x1EFF}

Config Word 1 = 0x09A4
Config Word 2 = 0x1EFF

Those are the values that I get when I compile your program with
compiler vs. 4.119. So, hopefully they are correct. Try it.
mvanvliet



Joined: 02 Jun 2009
Posts: 123
Location: The Netherlands

View user's profile Send private message

PostPosted: Thu Apr 14, 2011 1:41 am     Reply with quote

I've received an email from CCS that it's solved in the next compiler release.

Quote:
The problem you reported has been fixed and will be in the next compiler release.

If your download rights expired between the time you reported the problem and the new release then e-mail us your reference number so we can extend the download time.


But I don't get a new .dat or .h file...disappointing.
mvanvliet



Joined: 02 Jun 2009
Posts: 123
Location: The Netherlands

View user's profile Send private message

PostPosted: Thu Apr 14, 2011 1:56 am     Reply with quote

PCM programmer wrote:

Config Word 1 = 0x09A4
Config Word 2 = 0x1EFF

Those are the values that I get when I compile your program with
compiler vs. 4.119. So, hopefully they are correct. Try it.


They are correct, but I'm missing the STVREN (stack overflow) fuse, but that fuse isn't in my 1822.h file. So WORD2 must be 1CFF. But when I compile "#rom 0x8007= {0x09A4, 0x1CFF}", my .lst says:

Code:
Configuration Fuses:
   Word  1: 3FE7   NOWDT NOCPD NOPROTECT MCLR PUT RC BROWNOUT IESO FCMEN

ROM data:
008007: 09A4 1CFF


And when I load the .hex file in the software of my 2 programmers (CCSLOAD & Galep), they both use the 3FE7 for the fuses. Not the value which I add manually.

In V4.119 the Word 1: 3FE7 from the listing file is probably gone.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Apr 14, 2011 1:04 pm     Reply with quote

Try doing this. I think the trick is to force the compiler to not put any
of its (defective) fuse words into the HEX file. You can do this with the
#fuses NONE statement. Then, only your #rom statement values will
be put into the HEX file. I tested the program shown below with vs.
4.106 and the HEX file looks good to me. Try it.
Code:

#include <12F1822.H>
#FUSES NONE
#rom 0x8007 = {0x09A4, 0x1CFF}
#use delay(clock=4000000)

//====================================
void main()
{

while(1);
}
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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