Hitachi H8/3152 Hardware Manual page 57

Single-chip microcomputer h8/3150 series
Table of Contents

Advertisement

4.2
Register Descriptions
4.2.1
RNG Control Status Register (RCSR)
RCSR is an 8-bit register whose bit 6 is readable and writable while the other bits are read-only.
RCSR has a GE bit and an RRDY bit; the GE bit controls the RNG operation and the RRDY bit
indicates whether a random number has been written to RNRR. The initial RCSR value is H'3F.
Bit:
Initial value:
Read/Write:
Bit 7—Random Number Ready (RRDY): Indicates whether a random number generated by the
RNG has been written to RNRR. This bit is read-only and cannot be written to.
Writing 0 to the GE bit clears the RRDY bit to 0, and the RRDY bit holds the value.
Writing 1 to the GE bit starts random number generation in the RNG, and when the generated
random number is written to RNRR, the RRDY bit is set to 1.
Reading RNRR while the RNG is active (GE = 1) starts generating and writing a new random
number to RNRR; therefore, the RRDY bit is cleared to 0.
Bit 7: RRDY
Description
0
[Clearing condition]
1
[Setting condition]
When a generated random number is written to RNRR
Bit 6—Generation Enabled (GE): Enables or disables the RNG operation.
Writing 1 to the GE bit starts the RNG operation, and the generated 16-bit random number is
written to RNRR.
Writing 0 to the GE bit stops the RNG operation. The data read from RNRR after the GE bit is
cleared to 0 must not be used as a random number.
52
7
6
RRDY
GE
0
0
R
R/W
When 0 is written to the GE bit
When RNRR is read while the GE bit is 1
5
4
3
1
1
1
R
R
R
2
1
0
1
1
1
R
R
R
(Initial value)

Advertisement

Table of Contents
loading

Table of Contents