Hardware manual
Rev. 3.0, 09/98, page 159 of 361
Section 8 8-Bit Timers
8.1 Overview
The H8/338 Series includes an 8-bit timer module with two channels (TMR0 and TMR1). Each
channel has an 8-bit counter (TCNT) and two time constant registers (TCORA and TCORB) that
are constantly compared with the TCNT value to detect compare-match events. One application
of the 8-bit timer module is to generate a rectangular-wave output with an arbitrary duty cycle.
8.1.1 Features
The features of the 8-bit timer module are listed below.
•
Selection of seven clock sources
The counters can be driven by one of six internal clock signals or an external clock input
(enabling use as an external event counter).
•
Selection of three ways to clear the counters
The counters can be cleared on compare-match A or B, or by an external reset signal.
•
Timer output controlled by two time constants
The timer output signal in each channel is controlled by two independent time constants,
enabling the timer to generate output waveforms with an arbitrary duty factor.
•
Three independent interrupts
Compare-match A and B and overflow interrupts can be requested independently.