Kontron PB-TIM2 User Manual

Page 14

Advertising
background image

Chapter 2 Functional Description

PB-TIM2 User’s Manual

Measure

period

Count up

Stop on

B

Enable

counting

Up =

count

enable

v = stop

counting

Clear

counter/

output

On Bv

Counter

register

Measure

freq.

Count up

Stop on

B

Enable

counting

1v =

count

enable

2v = stop

counting

Clear

counter/

output

On 2nd

Bv

Counter

register

Generate

freq.

Count-

down

Load at 0

Half

period

Enable

counting

Ring

counting

Clear

counter/

output/

Ring

mode

Toggle at

0

1/2

PWM

Count-

down

Stop at

0/ load

on A

Half

cycle

Enable

counting

Load on

edge

Clear

counter/

output

Passive

if 0

Edge

sampling

Count up

Enable

counting

Clear

counter/

output

On A

edge

Counter

register

Pulse

duration

Count up

Thresh-

old

Enable

counting

Up =

count

enable

Clear

counter/

output

On

match

Counter

register

With reference to table 2.3.1, a ‘v’ on its own represents an edge; 1v indicates the first edge and 2v represents the second
edge.

2.3.1 Hardware Single Shot (Retrigerable)

In this mode, the timer always counts down, the pulse duration is stored in the comparator register and the output acts as
zero detection with input (A) used to load/reload the timer with the preset/comparator register.

2.3.2 Hardware Single Shot

This mode is the same as the one described in 2.3.1 above except that the software starts the period directly by writing the
bits ENABLE and LOAD in the Channel Control Register.

2.3.3 TIC Generation

The period is stored in the preload/comparator register and upon zero detection, the timer is reloaded and an event IRQ is
generated (IRQ plus flag).

Page 2-4

© 1996 PEP Modular Computers

July 30, 1997

Advertising