I am not sure what I might have done wrong, so if you have any ideas, let me know, before I submit this as a bug.
#define OFF 0x00
WDTE = OFF;
I looked for redefinitions of the variable, and even changed the variable name with the same result. All of my other SBITs seem correct so far.
Register at 0xD9 (PCA0MD if it's SiLabs chip) is not bit addressable - only every eighth SFR is (at 0x80, 0x88, 0x90, 0x98 etc.). You need to
#define WDTE 0x40
and then use it like that:
PCA0MD &= !WDTE // clear
PCA0MD |= WDTE // set
There's a typo ('!' versus '~'). Should be 'bitwise not':
PCA0MD &= ~WDTE; // clear
Sorry, my fault! :-)
Hey great thnx! I was starting to think that would be the case as I tried embedding ASM and it addressed something else completely. I looked through the SiLabs document for my chip though and could not find the bit/byte addressable info for D9.
Oh - wait some graph is coming to mind now - let me see if I can find that one.