MC9S12G128 Timer

Timer

Introduction:

The basic scalable timer consists of a 16-bit, software-programmable counter driven by a flexible
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 could contain up to 8 input capture/output compare channels with one pulse accumulator
available only on channel 7. 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 when the channel is available and 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.

Features:

  • Up to 8 channels available. (refer to device specification for exact
    number).
  • All channels have same input capture/output compare functionality.
  • Clock prescaling.
  • 16-bit counter.
  • 16-bit pulse accumulator on channel 7.

Block Diagrams:

MC9S12G128 Timer
MC9S12G128 Timer
MC9S12G128 Timer
MC9S12G128 Timer

Register Descriptions:

MC9S12G128 Timer
MC9S12G128 Timer

TIOS:

输入捕获/输出比较选择:

  • IOSx=0, 输入捕获;
  • IOSx=1, 输出比较;
  • 寄存器TIOS, TIOS_IOS[0-7];
    MC9S12G128 Timer

CFORC:

MC9S12G128 Timer

OC7M:

MC9S12G128 Timer
MC9S12G128 Timer

OC7D:

MC9S12G128 Timer

TCNT:

MC9S12G128 Timer
MC9S12G128 Timer

TSCR1:

MC9S12G128 Timer
MC9S12G128 Timer

TTOV:

MC9S12G128 Timer

TCTL1/2:

MC9S12G128 Timer
MC9S12G128 Timer

TCTL3/4:

MC9S12G128 Timer
MC9S12G128 Timer

TIE:

MC9S12G128 Timer

TSCR2:

MC9S12G128 Timer

TFLG1:

MC9S12G128 Timer

TFLG2:

MC9S12G128 Timer
MC9S12G128 Timer

TCxH/TCxL:

MC9S12G128 Timer

PACTL:

MC9S12G128 Timer
MC9S12G128 Timer

PAFLG:

MC9S12G128 Timer
MC9S12G128 Timer

PACNT:

MC9S12G128 Timer

OCPD:

MC9S12G128 Timer

PTPSR:

MC9S12G128 Timer
MC9S12G128 Timer

上一篇:Bootstrap中时间(时间控件)的设计


下一篇:Flink实战案例(二十四):自定义时间和窗口的操作符(五)window functions之增量聚合函数(二)AggregateFunction