Register Descriptions; Free-Running Counter (Twcnt); Input Capture Register (Twicr) - Renesas H8S/2437 Hardware Manual

Renesas 16-bit single-chip microcomputer h8s family / h8s / 2600 series
Table of Contents

Advertisement

14.3

Register Descriptions

The duty measurement circuit has the following registers.

• Free-running counter (TWCNT)

• Input capture register (TWICR)

• Duty measurement control register 1 (TWCR1)
• Duty measurement control register 2 (TWCR2)
14.3.1
Free-Running Counter (TWCNT)
TWCNT is an 8-bit readable/writable up-counter. The free-running count operation is performed
by setting the FRC bit in TWCR1 to 1. When the START bit in TWCR2 is set to 1, TWCNT is
cleared and duty measurement is started. For details on duty measurement operation, see section
14.4, Operation. The clock source is selected by bits CKS2 to CKS0 in TWCR1. When TWCNT
overflows from H'FF to H'00, the OVF bit in TWCR2 is set to 1. TWCNT is initialized to H'00.
14.3.2
Input Capture Register (TWICR)
TWICR is an 8-bit read-only register. When the falling edge of the external event signal is
detected during duty measurement, the current TWCNT value is transferred. For details on duty
measurement operation, see section 14.4, Operation. TWICR is initialized to H'00.
Rev. 1.00, 09/03, page 402 of 704

Advertisement

Table of Contents
loading

Table of Contents