| View previous topic :: View next topic |
| Author |
Message |
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Wed Apr 13, 2011 2:32 pm |
|
|
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
|
|
Posted: Thu Apr 14, 2011 1:41 am |
|
|
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
|
|
Posted: Thu Apr 14, 2011 1:56 am |
|
|
| 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
|
|
Posted: Thu Apr 14, 2011 1:04 pm |
|
|
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);
} |
|
|
 |
|