next up previous contents index
Next: 4.1.2 Other Features available Up: 4.1 MCS51 variants Previous: 4.1 MCS51 variants   Contents   Index

4.1.1 pdata access by SFR

With the upcome of devices with internal xdata and flash memory devices using port P2 as dedicated I/O port is becoming more popular. Switching the high byte for pdata access which was formerly done by port P2 is then achieved by a Special Function Register. In well-established MCS51 tradition the address of this sfr is where the chip designers decided to put it. Needless to say that they didn't agree on a common name either. So that the startup code can correctly initialize xdata variables, you should define an sfr with the name _XPAGE at the appropriate location if the default, port P2, is not used for this. Some examples are:

sfr at 0x92 _XPAGE; /* Cypress EZ-USB family */

sfr at 0xaf _XPAGE; /* some Silicon Labs (Cygnal) chips */

sfr at 0xaa _XPAGE; /* some Silicon Labs (Cygnal) chips */
For more exotic implementations further customizations may be needed. See section 3.11 for other possibilities.


next up previous contents index
Next: 4.1.2 Other Features available Up: 4.1 MCS51 variants Previous: 4.1 MCS51 variants   Contents   Index
Erik Petrich 2006-05-02