|
|||||||||||
Technical Support Support Resources
Product Information |
C51: Indirectly Accessing 8051 SFRsQUESTIONWhy can't I create a C pointer to the SFRs on the 8051? ANSWERC pointers cannot be used to access the 8051's SFRs (special function registers). The reason is because the 8051's SFRs are mapped into the upper 128 bytes of the Directly Addressable On-chip Memory. This area cannot be accessed indirectly, so you cannot use pointers to indirectly access the SFRs. If you attempt to indirectly access address 0x90 (normally port 1), you will access idata byte 0x90 instead of P1. Refer to the Intel 8-bit Microcontrollers User's Manual or the manual specific to your 8051 derivative for more information on how the internal data area and the special function register memory is used. SEE ALSOLast Reviewed: Thursday, February 25, 2021 | ||||||||||
|
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.