Jump to content

Bug Or Typo In 16f818.h, You Decide


Recommended Posts

Hello,

 

In the file p16f818.h there are two entries for 0x0002 for INTCON. The second one is T0IF which does NOT exist in PIC16F818.TDF or in the 16F818 datasheet. There is also a duplicate entry for 0x0005, T0IE.

Is there is a reason to have both?

 

Also, for whatever reason, the compiler does NOT like it if I use the second entries instead of the TMR versions. They both should be replaced by 0x0002 or 0x0005 before the compiler ever sees them.

 

It is reporting the following:

gbtest.c(11): error: unknown identifier "T0IE"

gbtest.c(11): error: invalid operand T0IE

gbtest.c(11): error: failed to generate expression

gbtest.c(11): error: invalid operand '~(1 <<( T0IE ))'

gbtest.c(11): error: failed to generate expression

 

Considering that T0IE is a define in an include file, the compiler should NEVER be able to report the error....

 

Gary

Link to post
Share on other sites

Gary,

 

Which compiler do you use ?

 

There is potential for a little confusion here, BoostC compiler uses a different set of files to C2C-plus compiler.

 

BoostC headers start with "PIC", while C2C headers start with "P".

 

Make sure that you are looking in the correct header file.

 

Regards

Dave

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...
×
×
  • Create New...