View previous topic :: View next topic |
Author |
Message |
Will Reeve
Joined: 30 Oct 2003 Posts: 209 Location: Norfolk, England
|
Configuration bits (words) manual setting? PIC18F6310 bug. |
Posted: Tue Jan 03, 2006 6:32 am |
|
|
Help! I think I've asked this question ages ago for another part which CCS eventually fixed...but
PIC18LF6310 running at 5v, the compiler:
Code: | Configuration Fuses:
Word 1: 0906 INTRC NOIESO NOFCMEN RESERVED
Word 2: 1E19 NOBROWNOUT NOWDT BORV21 NOPUT WDT32768
Word 3: 81C0 BW16 CCP2C1 NOWAIT NOLPT1OSC MCLR RESERVED
Word 4: 0001 STVREN DEBUG RESERVED NOXINST
Word 5: 0001 NOPROTECT
Word 6: 0000
Word 7: 0001 NOEBTR |
the part doesn't have a lower word 1 configuration byte! Hence it reports 0x00 and the compiler expects 0x06! How can I force the compiler to set the lower word 1 byte to 0x00? I've emailed CCS but you guys usually fix things faster! |
|
|
Ttelmah Guest
|
|
Posted: Tue Jan 03, 2006 11:22 am |
|
|
I presume you are actually programming from the compiler?. Otherwise just change the configuration bytes in your programmer.
If you have device editor, the error is caused by the fuses BROWNOUT_SW, and BROWNOUT_NOSL, which have the value in the last column, set to '1', putting them in the first byte, instead of '2'. They therefore don't get masked off by the 'NOBROWNOUT' fuse. Changing this last column value, gives the right result.
You might try a #ROM definition, just setting the word to the required value.
Best Wishes |
|
|
Will Reeve
Joined: 30 Oct 2003 Posts: 209 Location: Norfolk, England
|
|
Posted: Tue Jan 03, 2006 3:02 pm |
|
|
Hi Ttelmah,
I am using the ICD-U debugger, not even got so far as to get a program finished, it's at the "flash LED" stage to see if the hardware is working!
I've dug into the device editor as suggested and all is now well. It's a shame CCS didn't bother to get back to me as I feel I "pay" them with my maintenance agreement! If you were local I would buy you a pint!
Keep well,
Will |
|
|
Ttelmah Guest
|
|
Posted: Tue Jan 03, 2006 3:58 pm |
|
|
With the number of offers like this I've had recently, I'll be able to stock a bar soon. :-)
They will probably just update the definitions in the next release. Nice for the 'future', but the device editor is a much quicker fix!...
Best Wishes |
|
|
|