|
|
View previous topic :: View next topic |
Author |
Message |
Xavier Guest
|
Configuration Bits ICD option and #fuse statement |
Posted: Mon Jun 09, 2003 5:23 pm |
|
|
Hello,
I'm using MPLAB with ICD to programm my PIC16F877 and
CCS PCM V3.118
The pb is that with ICD option (under MPLAB) if I check "Configuration Bits" and then I programm my PIC all is fine.
If I uncheck "Configuration Bits" it does'nt work !!!
This is a fuse statement problem !
ICD Option Configuration Bits is :
Device : PIC16F877
Oscillator : HS
WatchDog Timer : Off/Disable
Power Up Timer : Off/Disable
Brown Out Detect : Off/Disable
Low voltage Programming : Disable
Code Protect Data EE. : code protection Off
Flash Memory Write : Memory written to by EECON
Code Protect : Code Protection Off
My fuse statement in my code is :
...
#include "16F877.h"
#fuses HS,NOWDT,NOPUT,NOBROWNOUT,NOLVP,WRT,NOCPD,NOPROTECT
...
What is #fuse staement for Memory written to by EECON ?
Any idea ?
Thanks in advance
Xavier
___________________________
This message was ported from CCS's old forum
Original Post ID: 144515131 |
|
|
Charlie U Guest
|
Re: Configuration Bits ICD option and #fuse statement |
Posted: Tue Jun 10, 2003 5:43 am |
|
|
:=Hello,
:=I'm using MPLAB with ICD to programm my PIC16F877 and
:=CCS PCM V3.118
:=The pb is that with ICD option (under MPLAB) if I check "Configuration Bits" and then I programm my PIC all is fine.
:=If I uncheck "Configuration Bits" it does'nt work !!!
:=
:=This is a fuse statement problem !
:=
:=ICD Option Configuration Bits is :
:=Device : PIC16F877
:=Oscillator : HS
:=WatchDog Timer : Off/Disable
:=Power Up Timer : Off/Disable
:=Brown Out Detect : Off/Disable
:=Low voltage Programming : Disable
:=Code Protect Data EE. : code protection Off
:=Flash Memory Write : Memory written to by EECON
:=Code Protect : Code Protection Off
:=
:=My fuse statement in my code is :
:=...
:=#include "16F877.h"
:=#fuses HS,NOWDT,NOPUT,NOBROWNOUT,NOLVP,WRT,NOCPD,NOPROTECT
:=...
:=
:=What is #fuse staement for Memory written to by EECON ?
:=
:=Any idea ?
:=Thanks in advance
:=Xavier
Fuse information can be found is several places. Since you mentions PCM, I assume you don't have the PCW IDE. In PCW there is a menu item under View call Valid Fuses. The fuse keywords are also listed in the 16F877.h file. There is also the device editor that lists the fuses.
The #fuses keywords for program memory write are WRT and NOWRT.
___________________________
This message was ported from CCS's old forum
Original Post ID: 144515144 |
|
|
Xavier Guest
|
Re: Configuration Bits ICD option and #fuse statement |
Posted: Tue Jun 10, 2003 6:39 am |
|
|
Thanks for the informations
But I still don't understand why I can't programm the PIC if I uncheck "Configuration Bits" in ICD option !!!
I certainly forgot something in #fuse statement but what ?
Any idea ?
Thanks in advance
Xavier
___________________________
This message was ported from CCS's old forum
Original Post ID: 144515145 |
|
|
Charlie U Guest
|
Re: Configuration Bits ICD option and #fuse statement |
Posted: Tue Jun 10, 2003 3:41 pm |
|
|
:=Thanks for the informations
:=But I still don't understand why I can't programm the PIC if I uncheck "Configuration Bits" in ICD option !!!
:=
:=I certainly forgot something in #fuse statement but what ?
:=
:=Any idea ?
:=Thanks in advance
:=Xavier
Are you saying that you can't write to program memory with the ICD if you don't check the "Configuration Bits" or are you saying that the program will not run. If it's the latter (the program won't run) it's because the configuration bits are required to set up the basic configuration of the processor.
If you erase the part and don't program the configuration bits the default configuration is: RC oscillator, Watch Dog enabled, Power up Timer disabled, Brown out reset enabled, Low Voltage programming enabled, Data EEPROM protection off, Program memory writes are allowed, In-Circuit Debugger mode disabled and code protection off. I don't have your original post handy, but as I recall, this is quite a bit different than your desired configuration.
Check the 16F877 data sheet in section 12-1 for info on the config. bits.
Hope this helps.
___________________________
This message was ported from CCS's old forum
Original Post ID: 144515154 |
|
|
|
|
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
|