Advance Information MC68HC908MR16/MC68HC908MR32 — Rev. 4.0
244 Timer Interface B (TIMB) MOTOROLA
Timer Interface B (TIMB)
ELSxB and ELSxA — Edge/Level Select Bits
When channel x is an input capture channel, these read/write bits
control the active edge-sensing logic on channel x.
When channel x is an output compare channel, ELSxB and ELSxA
control the channel x output behavior when an output compare
occurs.
When ELSxB and ELSxA are both clear, channel x is not connected
to port E, and pin PTEx/TCHxB is available as a genera l-purpose I/O
pin. However, channel x is at a state determined by these bits and
becomes transparent to the respective pin when PWM, input capture,
or output compare mode is enabled. Table 12-2 shows how ELSxB
and ELSxA work. Reset clears the ELSxB and ELSxA bits.
NOTE: Before enabling a TIMB channel register for input capture operation,
make sure that the PTEx/TBCHx pin is stable for at least two bus clocks.
TOVx — Toggle-On-Overflow Bit
When channel x is an output compare channel, this read/write bit
controls the behavior of the channel x outp ut wh en th e TIMB count er
overflows. When channel x is an input capture channel, TOVx has no
effect. Reset clears the TOVx bit.
1 = Channel x pin toggles on TIMB counter overflow.
0 = Channel x pin does not toggle on TIMB counter overflow.
Table 12-2. Mode, Edge, and Level Selection
MSxB:MSxA ELSxB:ELSxA Mode Configuration
X0 00 Output preset Pin under port control; initialize timer output l evel high
X1 00 Pin under port control; initialize timer output l evel low
00 01
Input capture
Capture on rising edge only
00 10 Capture on falling edge only
00 11 Capture on rising or falling edge
01 01 Output compare
or PWM
Toggle output on compare
01 10 Clear output on compare
01 11 Set output on compare
1X 01 Buffered output
compare
or buffered
PWM
Toggle output on compare
1X 10 Clear output on compare
1X 11 Set output on compare