Renesas F-ZTAT H8 Series Hardware Manual page 257

8-bit single-chip microcomputer
Hide thumbs Also See for F-ZTAT H8 Series:
Table of Contents

Advertisement

16-Bit Output Compare Register (OCRF)
8-Bit Output Compare Register (OCRFH)
8-Bit Output Compare Register (OCRFL)
Bit
15
Initial value
1
Read/Write
R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W
OCRF is a 16-bit read/write output compare register consisting of two 8-bit read/write registers
OCRFH and OCRFL. It can be used as a 16-bit output compare register, with OCRFH as the
upper 8 bits and OCRFL as the lower 8 bits of the register, or OCRFH and OCRFL can be used as
independent 8-bit registers.
OCRFH and OCRFL can be read and written by the CPU, but in 16-bit mode, data transfer with
the CPU takes place via a temporary register (TEMP). For details see section 9.5.3, Interface with
the CPU.
Upon reset, OCRFH and OCRFL are each initialized to H'FF.
• 16-bit mode (OCRF)
16-bit mode is selected by clearing bit CKSH2 to 0 in timer control register F (TCRF). The
OCRF contents are always compared with the 16-bit timer counter (TCF). When the contents
match, the compare match flag (CMFH) in TCSRF is set to 1. Also, IRRTFH in interrupt
request register 2 (IRR2) is set to 1. If bit IENTFH in interrupt enable register 2 (IENR2) is set
to 1, a CPU interrupt is requested.
Output for pin TMOFH can be toggled by compare match. The output level can also be set to
high or low by bit TOLH of timer control register F (TCRF).
• 8-bit mode (OCRFH, OCRFL)
Setting bit CKSH2 in TCRF to 1 results in two 8-bit registers, OCRFH and OCRFL.
The OCRFH contents are always compared with TCFH, and the OCRFL contents are always
compared with TCFL. When the contents match, the compare match flag (CMFH or CMFL) in
TCSRF is set to 1. Also, bit IRRTFH (IRRTFL) in interrupt request register 2 (IRR2) set to 1.
If bit IENTFH (IENTFL) in interrupt enable register 2 (IENR2) is set to 1 at this time, a CPU
interrupt is requested.
The output at pin TMOFH (TMOFL) can be toggled by compare match. The output level can
also be set to high or low by bit TOLH (TOLL) of the timer control register (TCRF).
14
13
12
11
1
1
1
1
OCRFH
OCRF
10
9
8
7
1
1
1
1
→←
Rev.3.00 Jul. 19, 2007 page 231 of 532
6
5
4
3
1
1
1
1
OCRFL
REJ09B0397-0300
9. Timers
2
1
0
1
1
1

Advertisement

Table of Contents
loading

Table of Contents