English
Language : 

MC68HC908GP32_08 Datasheet, PDF (195/266 Pages) Freescale Semiconductor, Inc – M68HC08 Microcontrollers
Chapter 16
Timebase Module (TBM)
16.1 Introduction
This section describes the timebase module (TBM). The TBM will generate periodic interrupts at user
selectable rates using a counter clocked by the external crystal clock. This TBM version uses 15 divider
stages, eight of which are user selectable.
16.2 Features
Features of the TBM module include:
• Software programmable 1-Hz, 4-Hz, 16-Hz, 256-Hz, 512-Hz, 1024-Hz, 2048-Hz, and 4096-Hz
periodic interrupt using external 32.768-kHz crystal
• Configurable for operation during stop mode to allow periodic wakeup from stop
16.3 Functional Description
NOTE
This module is designed for a 32.768-kHz oscillator.
This module can generate a periodic interrupt by dividing the crystal frequency, CGMXCLK. The counter
is initialized to all 0s when TBON bit is cleared. The counter, shown in Figure 16-1, starts counting when
the TBON bit is set. When the counter overflows at the tap selected by TBR2:TBR0, the TBIF bit gets set.
If the TBIE bit is set, an interrupt request is sent to the CPU. The TBIF flag is cleared by writing a 1 to the
TACK bit. The first time the TBIF flag is set after enabling the timebase module, the interrupt is generated
at approximately half of the overflow period. Subsequent events occur at the exact period.
MC68HC908GP32 Data Sheet, Rev. 10
Freescale Semiconductor
195