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

Bit-addressable register

Hi all,

When I do this:

P7_SFR         DEFR    0FFD0H
DP7_SFR        DEFR    0FFD2H

HWWDOG_PORT    EQU     P7_SFR
HWWDOG_DIRPORT EQU     DP7_SFR
HWWDOG_BIT     EQU     6

HWWDOG_PULSEBIT DEFB   HWWDOG_PORT.HWWDOG_BIT ; P7, bit 6

I get an error:
*** ERROR #69, LINE #898, NOT A BITADDRESSABLE BASE
on the last HWWDOG_PULSEBIT line.

I tried using SET instead of EQU (for defining HWWDOG_PORT) but no difference. When I replace HWWDOG_PORT with P7_SFR, it does work.

In C I could do a simple #define but why doesn't this work?

Regards,
Joost Leeuwesteijn

0