Download User`s Manual

Transcript
Chapter 4 Software in MEM Mode
4.3.1
Permission for Mail Reception
The MKY40 has two mail receive buffers, MRB0 (Mail Receive Buffer
0) and MRB1 (Mail Receive Buffer 1) shown in “4.1.1 Memory Map”.
The MRB0 and MRB1 consist of 256 bytes each (Fig. 4.19).
The MR0CR (Mail Receive 0 Control Register) permits the MRB0 to
receive mail. The MR1CR (Mail Receive Control 1 Register) permits
the MRB1 to receive mail (Fig. 4.20).
When the user system program writes “1” to bit 6 (RDY: ReaDY) of the
MR0CR, the MRB0 is permitted to receive mail. The RDY bit returns
to “0” upon mail reception.
When the RDY bit of the MR0CR is
“1”, mail reception can be inhibited by
writing “0” to this bit. However, writing “0” to this bit during mail reception is ignored and mail reception
cannot be inhibited.
When the START bit of the SCR (System Control Register) is “1”, the
MRB0 is write-protected.
If the
MRB0 is read when the RDY bit of
the MR0CR is “1”, data is always
“00H”.
When the user system program writes “1” to bit 6 (RDY) of the MR1CR, the MRB1 is permitted to receive
mail. The RDY bit returns to “0” upon mail reception.
When the RDY bit of the MR1CR is “1”, mail reception can be inhibited by writing “0” to this bit. However, writing “0” to this bit during mail reception is ignored and mail reception cannot be inhibited.
When the START bit of the SCR is “1”, the MRB1 is write-protected. If the MRB1 is read when the RDY
bit of the MR1CR is “1”, data is always “00H”.
Dataset received by mail is stored in the buffer with the RDY bit at “1”. When both the RDY bits of the
MR0CR and MR1CR are “1”, received dataset is stored in the MRB0.
4 - 33