Datasheet

MC9S12E256 Data Sheet, Rev. 1.10
Freescale Semiconductor 421
Chapter 13
Timer (S12TIM16B4CV1) Block Description
13.1 Introduction
The basic timer consists of a 16-bit, software-programmable counter driven by a seven-stage
programmable prescaler.
This timer can be used for many purposes, including input waveform measurements while simultaneously
generating an output waveform. Pulse widths can vary from microseconds to many seconds.
This timer contains 4 complete input capture/output compare channels [IOC 7:4] and one pulse
accumulator. The input capture function is used to detect a selected transition edge and record the time.
The output compare function is used for generating output signals or for timer software delays.The 16-bit
pulse accumulator is used to operate as a simple event counter or a gated time accumulator.The pulse
accumulator shares timer channel 7 pin when in event mode.
A full access for the counter registers or the input capture/output compare registers should take place in
one clock cycle. Accessing high byte and low byte separately for all of these registers may not yield the
same result as accessing them in one word.
13.1.1 Features
The S12TIM16B4C includes these distinctive features:
Four input capture/output compare channels.
Clock prescaling.
16-bit counter.
16-bit pulse accumulator.
13.1.2 Modes of Operation
STOP: Timer is off since clocks are stopped.
FREEZE: Timer counter keeps running, unless TSFRZ in TSCR ($06) is set to one.
WAIT: Counters keeps running, unless TSWAI in TSCR ($06) is set to one.
NORMAL:Timer counter keeps running, unless TEN in TSCR ($06) is cleared.