This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

P89C669 & I2C

P89C669 user manual page 71 indicate
I2CON (91h) is bit addressable.!

How can declare to compiler?

My custom header file for P89C669 ;

sfr I2CON = 0x91;

sbit I2EN = I2CON^6;
sbit STA = I2CON^5;
sbit STO = I2CON^4;
sbit SI = I2CON^3;
sbit AA = I2CON^2;
sbit CRSEL = I2CON^0;

When compiled

REG669.H(246): error A17: INVALID BASE IN BIT ADDRESS EXPRESSION

Parents
  • P89C669 user manual page 71 indicate I2CON (91h) is bit addressable.!

    How does it indicate that?

    Pleas note that just because individual bits in a given SFR have names assigned to them in the documentation, that doesn't mean the SFR itself is bit-addressable. An SFR at address 0x91 quite certainly isn't. So you'll have to construct your own bit mangling routines to use it, like it's done on all those CPUs out there that don't have bit-addressables at all.

Reply
  • P89C669 user manual page 71 indicate I2CON (91h) is bit addressable.!

    How does it indicate that?

    Pleas note that just because individual bits in a given SFR have names assigned to them in the documentation, that doesn't mean the SFR itself is bit-addressable. An SFR at address 0x91 quite certainly isn't. So you'll have to construct your own bit mangling routines to use it, like it's done on all those CPUs out there that don't have bit-addressables at all.

Children