BoostC issue, access 16-bit SFR as INT

Status
Not open for further replies.

Mike - K8LH

Well-Known Member
Gentlemen, what am I doin' wrong? I see a definition for ccpr1 in the '2620 header file but I can't seem to access it as an INT. I get an error when trying to assign an integer variable to it;

Code:
  unsigned int match = 2400;

...
  ccpr1 = match;     // update CCPR1 "compare" registers
  match <<= 1;       // match value for next cycle
 
Hi Mike,

ccpr1 is defined as a char in the header file and so I added,
Code:
volatile int ccpr1w @CCPR1L;
to my main code so I could access it as a word.

I'm not sure why they didn't make it an int in the header.

Mike.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…