mc9s08dz32 Freescale Semiconductor, Inc, mc9s08dz32 Datasheet - Page 314

no-image

mc9s08dz32

Manufacturer Part Number
mc9s08dz32
Description
Hcs08 Microcontrollers 8-bit Can Microcontrollers
Manufacturer
Freescale Semiconductor, Inc
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
mc9s08dz32ACLC
Manufacturer:
OMRON
Quantity:
20 000
Part Number:
mc9s08dz32ACLC
Manufacturer:
FREESCALE
Quantity:
4 354
Part Number:
mc9s08dz32ACLC
Manufacturer:
Freescale Semiconductor
Quantity:
10 000
Part Number:
mc9s08dz32ACLC
Manufacturer:
FREESCALE
Quantity:
4 354
Part Number:
mc9s08dz32ACLF
Manufacturer:
FREESCALE
Quantity:
870
Part Number:
mc9s08dz32ACLF
Manufacturer:
FREESCALE
Quantity:
5 000
Part Number:
mc9s08dz32ACLF
Manufacturer:
Freescale Semiconductor
Quantity:
10 000
Part Number:
mc9s08dz32ACLF
Manufacturer:
FREESCALE
Quantity:
20 000
Company:
Part Number:
mc9s08dz32ACLF
Quantity:
300
Part Number:
mc9s08dz32ACLH
Manufacturer:
FREESCALE
Quantity:
201
Chapter 15 Real-Time Counter (S08RTCV1)
The RTC modulo register (RTCMOD) allows the compare value to be set to any value from 0x00 to 0xFF.
When the counter is active, the counter increments at the selected rate until the count matches the modulo
value. When these values match, the counter resets to 0x00 and continues counting. The real-time interrupt
flag (RTIF) is set whenever a match occurs. The flag sets on the transition from the modulo value to 0x00.
Writing to RTCMOD resets the prescaler and the RTCCNT counters to 0x00.
The RTC allows for an interrupt to be generated whenever RTIF is set. To enable the real-time interrupt,
set the real-time interrupt enable bit (RTIE) in RTCSC. RTIF is cleared by writing a 1 to RTIF.
15.4.1
This section shows an example of the RTC operation as the counter reaches a matching value from the
modulo register.
In the example of
to RTCPS = %0010 or divide-by-4. The modulo value in the RTCMOD register is set to 0x55. When the
counter, RTCCNT, reaches the modulo value of 0x55, the counter overflows to 0x00 and continues
counting. The real-time interrupt flag, RTIF, sets when the counter value changes from 0x55 to 0x00. A
real-time interrupt is generated when RTIF is set, if RTIE =
15.5
This section provides example code to give some basic direction to a user on how to initialize and configure
the RTC module. The example software is implemented in C language.
The example below shows how to implement time of day with the RTC using the 1-kHz clock source to
achieve the lowest possible power consumption. Since the 1-kHz clock source is not as accurate as a
crystal, software can be added for any adjustments. For accuracy without adjustments at the expense of
additional power consumption, the external clock (ERCLK) or the internal clock (IRCLK) can be selected
with appropriate prescaler and modulo values.
314
Internal
1-kHz
RTC clock
(RTCPS=%0010)
RTCCNT
RTIF
RTCMOD
Initialization/Application Information
RTC Operation Example
Figure
0x52
15-6, the selected clock source is the internal clock source. The prescaler is set
Figure 15-6. RTC counter overflow example
MC9S08DZ60 Series Data Sheet, Rev. 3
0x53
0x54
0x55
1.’b00the clock ofthe clock of flip-flop is
0x55
0x00
Freescale Semiconductor
0x01

Related parts for mc9s08dz32