![Hitachi H8/3152 Hardware Manual Download Page 71](http://html.mh-extra.com/html/hitachi/h8-3152/h8-3152_hardware-manual_140481071.webp)
67
Opcode
Mnemonic
FC20
MOV.B
#H'20, R4L
7905FF00
MOV.W
#H'FF00, R5
79066010
MOV.W
#H'6010, R6
790040FC
MOV.W
#H'40FC, R0
6A88FFFC MOV.B
R0H, @TCSR
6A80FFF8
MOV.B
R0L, @ECR
7B5C598F
EEPMOV
EWE
interrupt
Application program area
*2
SP
SP+1
SP+2
SP+3
(CCR)
CCR
PCH
*1
PCL
*1
Stack area
PC marked with *1 points to address marked with *2
Figure 5.6 Memory Contents for Checking EEPROM Writing Procedure
5.3.3
Reloading TCNT by TCWA Function
When the operation timing is controlled by software, for example, in a serial transfer routine using
I/O ports, the operation timing may be shifted by UDF interrupts. To avoid this, either confirm
that the TCNT value is not in the neighborhood of H'00 before executing such a routine or reload
the initial value to TCNT using the TCWA function. In the latter case, the UDF interrupt interval
can be extended to a specified time. Figure 5.7 shows the TCNT reloading operation.
H'FF
H'00
Set value
TCWA, TCSR,
and TCNT write
UDF
interrupt
TCNT
reloading
UDF
interrupt
Time
TCNT value
Figure 5.7 TCNT Reloading