![](http://datasheet.mmic.net.cn/30000/M30800MC-XXXFP_datasheet_2359329/M30800MC-XXXFP_55.png)
Under
development
Preliminary Specifications REV.D
Specifications in this manual are tentative and subject to change.
Mitsubishi Microcomputers
M16C/80 group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
55
Protection
The protection function is provided so that the values in important registers cannot be changed in the event
that the program runs out of control. Figure 1.8.8 shows the protect register. The values in the processor
mode register 0 (address 000416), processor mode register 1 (address 000516), system clock control reg-
ister 0 (address 000616), system clock control register 1 (address 000716), main clock division register
(address 000C16), port P9 direction register (address 03C716) and function select register A3 (address
03B516) can only be changed when the respective bit in the protect register is set to “1”. Therefore, impor-
tant outputs can be allocated to port P9.
If, after “1” (write-enabled) has been written to the PRC2 (bit 2 at address 000A16), a value is written to any
address, the bit automatically reverts to “0” (write-inhibited). Change port P9 input/output and function
select register A3 immediately after setting "1" to PRC2. Interrupt and DMA transfer should not be inserted
between instructions. However, the PRC0 (bit 0 at address 000A16) and PRC1 (bit 1 at address 000A16) do
not automatically return to “0” after a value has been written to an address. The program must therefore be
written to return these bits to “0”.
Protect register
Symbol
Address
When reset
PRCR
000A16
XXXXX0002
Bit name
Bit symbol
b7
b6
b5
b4
b3
b2 b1
b0
0 : Write-inhibited
1 : Write-enabled
PRC1
PRC0
PRC2
Enables writing to processor mode
registers 0 and 1 (addresses 000416
and 000516)
Function
0 : Write-inhibited
1 : Write-enabled
Enables writing to system clock
control registers 0 and 1 (addresses
000616 and 000716
) and main clock
division register (address 000C16
)
Enables writing to port P9 direction
register (address 03C716) and
function select register A3 (address
03B516) (Note
)
0 : Write-inhibited
1 : Write-enabled
W
R
Nothing is assigned.
When write, set "0". When read, their contents are indeterminate.
Note: Writing a value to an address after “1” is written to this bit returns the bit
to “0”. Other bits do not automatically return to “0” and they must therefore
be reset by the program.
Figure 1.8.8. Protect register
Protection