2.4 Mode Control Register (MDCR)
Another control register in the register field in page 0 is the mode control register (MDCR). The
inputs at the mode pins are latched in this register on the rising edge of the signal. The mode
control register can be read by the CPU, but not written. Table 3-2 lists the attributes of this
register.
Table 2-2 Mode Control Register
Name Abbreviation Read/Write Address
Mode control register MDCR Read only H'FFFA
The bit configuration of this register is shown below.
* Initialized according to MD2 to MD0.
Bits 7 and 6—Reserved: These bits cannot be modified and are always read as “1.”
Bits 5 to 3—Reserved: These bits cannot be modified and are always read as “0.”
Bits 2 to 0—Mode Select 2 to 0 (MDS2 to MDS0): These bits indicate the values of the mode
pins (MD2 to MD0) latched on the rising edge of the signal. MDS2 corresponds to MD2, MDS1
to MD1, and MDS0 to MD0. These bits can be read but not written.
Coding Example: To test whether the MCU is operating in mode 1:
CMP:G.B #H'C1, @H'FFFA
The comparison is with H'C1 instead of H'01 because bits 7 and 6 are always read as “1.”
Bit 76543210
—————MDS2 MDS1 MDS0
Initial value 11000***
Read/Write —————R R R
29
Downloaded from Elcodis.com electronic components distributor