Jump to content
Sign in to follow this  
don_erickson

Configuration Bit Problem?

Recommended Posts

Using a 16f87, IDE 5.9, BoostC 2.0.

 

#pragma DATA 0x2007, _CP_OFF & _CCP1_RB3 & _DEBUG_OFF & _WRT_ENABLE_OFF & _CPD_OFF & _LVP_OFF & _BODEN_OFF & _MCLR_OFF & _PWRTE_OFF & _WDT_OFF & _HS_OSC

 

causes the compiler to say:

 

timer34.c(31): error: failure

 

but if I leave out the _WRT_ENABLE_OFF part,

#pragma DATA 0x2007, _CP_OFF & _CCP1_RB3 & _DEBUG_OFF & _CPD_OFF & _LVP_OFF & _BODEN_OFF & _MCLR_OFF & _PWRTE_OFF & _WDT_OFF & _HS_OSC

 

the compiler has no objection.

 

_WRT_ENABLE_OFF is defined in p16f87.h, just like the others.

 

Is this a bug?

 

Don Erickson, don@erickson.net

Share this post


Link to post
Share on other sites

When you use BoostC compiler it uses pic*.h headers and not p*.h There is no _WRT_ENABLE_OFF in the system header for PIC16F87 (pic16f87.h):

 

...

#define _WRT_PROTECT_OFF 0x3FFF //No program memory write protection

#define _WRT_PROTECT_256 0x3DFF //First 256 program memory protected

#define _WRT_PROTECT_2048 0x3BFF //First 2048 program memory protected

#define _WRT_PROTECT_ALL 0x39FF //All of program memory protected

...

 

Regards,

Pavel

Share this post


Link to post
Share on other sites

Don,

 

_WRT_ENABLE_OFF is not valid for the PIC16F87 target, thats why is not in the header file :)

 

Regards

Dave

Share this post


Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...