Real-Time Clock Module; Operating Characteristics; Prescaler And Counter; Alarm - Motorola DragonBall MC68328 User Manual

Integrated processor
Table of Contents

Advertisement

SECTION 5

REAL-TIME CLOCK MODULE

The real-time clock (RTC) module provides a current time stamp of seconds, minutes, and
hours. The RTC operates on the low-frequency, 32 kHz (or 38.4 kHz) reference clock crys-
tal.
Timer features include:
• Full clock features - seconds, minutes, hours
• Minute countdown timer with interrupt
• Programmable alarm with interrupt
• Once-per-second, once-per-minute, and once-per-day interrupts
• 32.768 kHz or 38.4 kHz operation

5.1 OPERATING CHARACTERISTICS

Figure 5-1 is a block diagram of the RTC. This section describes the RTC operation.

5.1.1 Prescaler and Counter

The prescaler divides the 32.768 kHz reference clock down to 1 pulse per second. An alter-
nate reference frequency of 38.4 kHz is also supported. The counter portion of this device
consists of 3 groups that are toggled by a 1 Hz clock. The seconds and minutes counters
are 6 bits long while the hours counter is 5 bits long.
The time counters offer seconds, minutes, and hours data in 24-hour format. The prescaler
stages are tapped to support several features. Periodic interrupts at 1 Hz and 1 minute are
available as well as an interrupt at the midnight rollover of the hours counter.

5.1.2 Alarm

Users can set an alarm by accessing the 3 alarm fields and loading the hours, minutes and
seconds for the time that the alarm is to generate an interrupt. The interrupt is enabled when
the alarm bit in the interrupt-enable register is set. The alarm is actually posted when the
current time matches the time in the alarm register.

5.1.3 Minute Stopwatch

The minute stopwatch performs a countdown with a resolution of one minute. It can gener-
ate an interrupt after some length of time. Example: The LCD is to turn off after 5 minutes of
inactivity. The minute stopwatch is programmed for 5 minutes and enabled. At consecutive
MOTOROLA
MC68328 DRAGONBALL PROCESSOR USER'S MANUAL
5-1

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents