20.07.2015 Views

M16C/62 Group DATASHEET

M16C/62 Group DATASHEET

M16C/62 Group DATASHEET

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ProtectionMitsubishi microcomputers<strong>M16C</strong> / <strong>62</strong> <strong>Group</strong>SINGLE-CHIP 16-BIT CMOS MICROCOMPUTERProtectionThe protection function is provided so that the values in important registers cannot be changed in the eventthat the program runs out of control. Figure 1.13.6 shows the protect register. The values in the processormode register 0 (address 000416), processor mode register 1 (address 000516), system clock control register0 (address 000616), system clock control register 1 (address 000716), port P9 direction register (address03F316) , SI/O3 control register (address 03<strong>62</strong>16) and SI/O4 control register (address 036616) canonly be changed when the respective bit in the protect register is set to “1”. Therefore, important outputscan be allocated to port P9.If, after “1” (write-enabled) has been written to the port P9 direction register and SI/Oi control register(i=3,4) write-enable bit (bit 2 at address 000A16), a value is written to any address, the bit automaticallyreverts to “0” (write-inhibited). However, the system clock control registers 0 and 1 write-enable bit (bit 0 at000A16) and processor mode register 0 and 1 write-enable bit (bit 1 at 000A16) do not automatically returnto “0” after a value has been written to an address. The program must therefore be written to return thesebits to “0”.Protect registerb7 b6 b5 b4 b3 b2 b1 b0Symbol Address When resetPRCR 000A16 XXXXX0002Figure 1.13.6. Protect registerBit symbolBit nameFunctionEnables writing to system clockPRC0 control registers 0 and 1 (addresses0 : Write-inhibited1 : Write-enabled000616 and 000716)PRC1PRC2Enables writing to processor moderegisters 0 and 1 (addresses 000416and 000516)Enables writing to port P9 directionregister (address 03F316) and SI/Oicontrol register (i=3,4) (addresses03<strong>62</strong>16 and 036616) (Note)0 : Write-inhibited1 : Write-enabled0 : Write-inhibited1 : Write-enabledNothing is assigned.In an attempt to write to these bits, write “0”. The value, if read, turns out to beindeterminate.R WNote: Writing a value to an address after “1” is written to this bit returns the bitto “0” . Other bits do not automatically return to “0” and they must thereforebe reset by the program.49

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!