PIC12f bit configuration error

Status
Not open for further replies.

Arrowspace

Banned
Joined
Jan 23, 2015
Messages
186
Helped
3
Reputation
6
Reaction score
3
Trophy points
18
Activity points
0
Code:
__config(cp_off  & boren_off & wdte_off & pwrte_on & fosc_hs );


 

It just means it didn't know what those names refer to. I do not use hi-tec but is it possible the names should be in upper case or maybe start with an underscore?
There should be a header file (.h or .inc) for your processor which lists all the valid names.

Brian.
 

Code:
#define _LEGACY_HEADERS
#include<htc.h>
#include<pic.h>

__CONFIG(CP_OFF  & BOREN_OFF & WDTE_OFF & PWRTE_ON & FOSC_HS );




This also not working
 

Firstly, what is the specific PIC12F for which are you attempting to compile? The Hi-Tech PICC compiler may not support it.

Have you ensure the specific PIC is properly selected within the IDE, MPLAB or MPLAB X?

Also, you are currently using PICC v9.65, which is a bit long in the tooth, I suspect the last version released was PICC v9.83, you might consider updating the compiler toolset.

Lastly, only the following header is required and should be included:

Code:
#include<htc.h>

Not:

Code:
#include<pic.h>

If not used the predefined macro:

Code:
#define _LEGACY_HEADERS

Therefore, I as I'm not familiar with it and is not listed in the actual documentation, I'm uncertain as to its function or relevancy in this case.



BigDog
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…