English
Language : 

HD404639R Datasheet, PDF (91/135 Pages) Renesas Technology Corp – 4-Bit Single-Chip Microcomputer
HD404639R Series
Notes on Use:
• Initialization after writing to registers: If port mode register A (PMRA: $004) is written to in transmit
clock wait state or in transfer state, the serial interface must be initialized by writing to serial mode
register 1A (SM1A: $005) and serial mode register 2A (SM2A: $01B) again.
• Serial 1 interrupt request flag (IFS1: $003, bit 2) and serial 2 interrupt request flag (IFS2: $023, bit 2)
set: For serial interface 1, if the state is changed from transfer state to another by writing to serial mode
register 1A (SM1A: $005) or executing the STS instruction during the first low pulse of the transmit
clock, the serial 1 interrupt request flag (IFS1: $003, bit 2) is not set. In the same way for serial interface
2, if the state is changed from transfer state to another by writing to serial mode register 2A (SM2A:
$01B) or by executing the STS instruction during the first low pulse of the transmit clock, the serial 2
interrupt request flag is not set. To set the serial 1 interrupt request flag, a serial mode register 1A write
or STS instruction execution must be programmed to be executed after confirming that the SCK1 pin is
at 1, that is, after executing the input instruction to port R4. To set the serial 2 interrupt request flag, a
serial mode register 2A write or SM2A instruction execution must be programmed to be executed after
confirming that the SCK2 pin is at 1, that is, after executing the input instruction to port R5.
Registers for Serial Interface
When serial interface operation is selected, serial data is read and written by the following registers.
For serial interface 1
• Serial mode register 1A (SM1A: $005)
• Serial mode register 1B (SM1B: $028)
• Serial data register 1 (SR1L: $006, SR1U: $007)
• Port mode register A (PMRA: $004)
• Miscellaneous register (MIS: $00C)
For serial interface 2
• Serial mode register 2A (SM2A: $01B)
• Serial mode register 2B (SM2B: $01C)
• Serial data register 2 (SR2L: $01D, SR2U: $01E)
• Port mode register A (PMRA: $004)
Serial Mode Register 1A (SM1A: $005): This register has the following functions (figure 70).
• R41/SCK1 pin function selection
• Serial interface 1 transmit clock selection
• Serial interface 1 prescaler division ratio selection
• Serial interface 1 initialization
Serial mode register 1A is a 4-bit write-only register. It is reset to $0 by MCU reset.
89