Rtc counter real time

Páginas: 7 (1632 palabras) Publicado: 5 de marzo de 2010
Chapter 12
Real-Time Counter (RTC)

12.1Introduction

The Real-Time Counter (RTC) module consists of one 8-bit counter, one 8-bit comparator, several binary-based and decimal-based prescaler dividers, two clock sources, and one programmable periodic interrupt. This module can be used for time-of-day, calendar or any task scheduling functions. It can also serve as a cyclic wakeup from lowpower modes without the need of external components.

NOTE
• For details on low-power mode operation, refer to Table 3-5 in Chapter 3, “Modes of Operation”.

• Use pin mux control registers from Section 2.3, “Pin Mux Controls” to assign RTC signals to the MCF51CN128 package pins.

• Most pin functions default to GPIO and must be software configured before using RTC.

12.1.1FeaturesFeatures of the RTC module include:
• 8-bit up-counter
— 8-bit modulo match limit
— Software controllable periodic interrupt on match

• Three software selectable clock sources for input to prescaler with selectable binary-based and decimal-based divider values
— 1-kHz internal low-power oscillator (LPO)
— External clock (ERCLK)
— 32-kHz internal clock(IRCLK)

12.1.2Modes of Operation

This section defines the operation in stop, wait and background debug modes.

12.1.2.1Wait Mode

The RTC continues to run in wait mode if enabled before executing the appropriate instruction. Therefore, the RTC can bring the MCU out of wait mode if the real-time interrupt is enabled. For lowest possible current consumption, the RTC should be stopped bysoftware if not needed as an interrupt source during wait mode.
12.1.2.2Stop Modes

The RTC continues to run in stop2 or stop3 mode if the RTC is enabled before executing the STOP instruction. Therefore, the RTC can bring the MCU out of stop modes with no external components, if the real-time interrupt is enabled.

The LPO clock can be used in stop2 and stop3 modes. ERCLK and IRCLK clocks areonly available in stop3 mode.

Power consumption is lower when all clock sources are disabled, but in that case, the real-time interrupt
cannot wakeup the MCU from stop modes.

12.1.2.3Active Background Mode

The RTC suspends all counting during active background mode until the microcontroller returns to normal user operating mode. Counting resumes from the suspended value as long as theRTCMOD register is not written and the RTCPS and RTCLKS bits are not altered.

12.1.3Block Diagram The block diagram for the RTC module is shown in Figure 12-1.

[pic]
Figure 12-1. Real-Time Counter (RTC) Block Diagram

12.2External Signal Description

The RTC does not include any off-chip signals.

12.3Register Definition
The RTC includes a status and control register, an 8-bit counterregister, and an 8-bit modulo register.

Refer to the direct-page register summary in Chapter 4, “Memory” for the absolute address assignments for all RTC registers.This section refers to registers and control bits only by their names and relative address offsets.

Table 12-1 is a summary of RTC registers.

Table 12-1. RTC Register Summary
[pic]
MCF51CN128 Reference Manual, Rev. 612.3.1RTC Status and Control Register (RTCSC)
RTCSC contains the real-time interrupt status flag (RTIF), the clock select bits (RTCLKS), the real-time interrupt enable bit (RTIE), and the prescaler select bits (RTCPS).

[pic]

Figure 12-2. RTC Status and Control Register (RTCSC)

|Field |Description|
|7 |Real-Time Interrupt Flag This status bit indicates the RTC counter register reached the value in the RTC |
|RTIF |modulo register. Writing a logic 0 has no effect. Writing a logic 1 clears the bit and the real-time interrupt|
| |request. Reset clears RTIF. 0 RTC counter has not reached the value in the RTC...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Real Time Ethernet
  • Supporting real time trafic
  • REAL TIME MARKETING
  • Chat En Real Time
  • Caracteristicas Generales Real Time Vx Works
  • Como convrtit un kernel de linux real time
  • Brochure Real Time
  • Real time analyst

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS