First page Back Continue Last page Overview Graphics

Input Capture: “ a 16-bit binary stop watch” --P&B


Notes:

The HC12 has 8 capture channels. To specify whether a channel is to be used for input caputer or output compare, a mask is written to the Timer Input Capture / Output Compare Select Register (TIOS).

Associated with each channel is a register into which the counter value is written when an event occurs. Because the counter is a 16 bits wide, these registers must also contain 16 bits. For example, TC0, the register corresponding to channel zero, stores counter bits 15 through 8 of the counter in bits 7 through 0, respectively, at location 0x0090 and counter bits 7 through 0 in bits 7 through 0, respectively, at location 0x0091.