| |||||
Technical Support Support Resources
Product Information | C51: ACCESSING BITS ON P5 OF PHILIPS 552Information in this article applies to:
SYMPTOMSI'm using a Philips 552 and accessing port 5. However, I'm not sure that P5 is bit addressable. Is it? If not, how can I access individual bits of this port? CAUSEP5 of the 552 is not bit-addressable. Only those SFRs whose address ends in 0 or 8 are bit-addressable. For example, SFRs at addresses 0x90 and 0xC8 are bit addressable while an SFR at address 0x94 is not. RESOLUTIONUse the bitwise AND and OR operators of the C language to set and clear individual bits in P5. For example: P5 |= 1 << 6; // Set Bit 6 in P5 P5 &= ~(1 << 5); // Clear Bit 5 in P5 FORUM THREADSThe following Discussion Forum threads may provide information related to this topic. Last Reviewed: Tuesday, June 15, 2004 | ||||
| |||||