background image

7

VT82885

Real Time Clock

VIA Technologies, Inc.

The 114 general purpose nonvolatile RAM
bytes are not dedicated to any special func-
tion within the VT82885. They can be used
by the processor program as nonvolatile
memory and are fully available during the
update cycles.

INTERRUPTS

The RTC plus RAM includes three separate,
fully automatic sources of interrupt for a pro-
cessor. The alarm interrupt can be pro-
grammed to occur at rates from once per
second to once per day. The peridoic inter-
rupt can be selected for rates from 500 ms
to 122 

µ

s. The update-ended interrupt can

be used to indicate to the program that an
update cycle is complete. Each of these
independent interrupt conditions is de-
scribed in greater detail in other sections of
this text.

The processor program can select which
interrupts, if any, are going to be used.
Three bits in Register B enable the inter-
rupts. Writing a logic 1 to an interrupt-enable
bit permits that interrupt to be initi-ated when
the event occurs. A zero in an interrupt-
enable bit prohibits the IRQ# pin from being
asserted from the interrupt condition. If an
interrupt flag is already set when the
interrupt is enabled, IRQ# is im-mediately
set at an active level, although the interrupt
initiating the event may have occurred much
earlier. As a result, there are cases where
the program should clear such earlier
initiated interrupts before first ena-bling new
interrupts.

When an interrupt event occurs, the relating
flag bit is set to logic 1 in Register C. These
flag bits are set independent of the state of
the corresponding enable bit in Register B.
The flag bit can be used in a polling mode
without enabling the corresponding enable
bits. The interrupt flag bit is a status bit
which software can interrogate as neces-
sary. When the flag is set, an indication is
given to software that an interrupt event has
occurred since the flag bit was last read.;
however, care should be taken when using
the flag bits as they are cleared each time
Register C is read. Double latching is in-
cluded with Register C so that bits which are
set remain stable throughout the read cycle.
All bits which are set (high) are cleared when
read and new interrupts which are pending

during the read cycle are held until after the
cycle is completed. One, two, or three bits
can be set when reading Register C. Each
utilized flag bit should be examined when
read to ensure that no interrupts are lost.

The second flag bit usage method is with
fully enabled interrupts. When an interrupt
flag bit is set and the corresponding inter-
rupt enable bit is also set, the IRQ# pin is
asserted low. IRQ# is asserted as long as at
least one of three interrupt sources has its
flag and enable bits both set. The IRQF bit in
Register C is a one whenever the IRQ# pin
is being driven low. Determination that the
RTC initiated an interrupt is accom-plished
by reading Register C. A logic one in bit 7
(IRQF bit) indicates that one or more
interrupts have been initiated by the
VT82885. The act of reading Register C
clears all active flag bits and the IRQF bit.

OSCILLATOR CONTROL BITS

The VT82885’s internal oscillator can be
turned on and off as required. A pattern of
010 in bits 4 through 6 of Register A will turn
the oscillator on and enable the countdown
chain. A pattern of 11X will turn the oscilla-
tor on, but holds the countdown chain of the
oscillator in reset. All other combinations of
bits 4 through 6 keep the oscillator off.

SQUARE WAVE OUTPUT SELECTION

Thirteen of the 15 divider taps are made
available to a 1-of-15 selector, as shown in
the block diagram of Figure 1. The first
purpose of selecting a divider tap is to
generate a square wave output signal on the
SQW pin. The PS0-RS3 bits in Register A
establish the square wave output frequency.
These frequencies are listed in Table 1. The
SQW frequency selection shares its 1-of-15
selector with the periodic interrupt genera-
tor. Once the frequency is selected, the
output of the SQW pin can be turned on and
off under program control with the square
wave enable bit (SQWE)

PERIODIC INTERRUPT SELECTION

The periodic interrupt will cause the IRQ#
pin to go to an active state from once every
500 ms to once every 122 

µ

s. This function

is separate from the alarm interrupt which
can be output from once per second to once
per day. The periodic interrupt rate is se-

Содержание VT82885

Страница 1: ...SCRIPTION The VT82885 Real Time Clock is designed to be a direct replacement for the DS12885 The VT82885 is identical in form fit and function to the DS12885 It has 114 bytes of general purpose RAM Access to this RAM space is determined by the logic level presented on AD6 during the address portion of an access cycle An external crystal and battery are the only components required to maintain time...

Страница 2: ...ion will continue to operate and all of the RAM time calen dar and alarm memory locations remain nonvolatile regardless of the level of the VCC input When VCC is applied to the VT82885 and reaches a level of greater than 4 25 volts the device becomes ac cessible after 100 ms provided that the oscillator is running and the oscillator countdown chain is not in reset see Register A This time period a...

Страница 3: ...ut on the VCC pin VBAT Battery input for any standard 3 volt lithium cell or energy source Battery vol tage must be held between 2 5 and 3 4 volts for proper operation A maximum load of 5 µA at 25 C in the absence of VCC power should be used to size the external energy source SQW Square Wave Output The SQW pin can output a signal from one of 13 taps provided by the internal divider stages of the R...

Страница 4: ...ithin the VT82885 RD Read Strobe The RD pin identifies the time period when the VT82885 drives the bus with read data The RD signal is the same definition as the Output Enable OE signal on a typical memory WR Write Strobe The WR pin is used to indicate a write cycle CS Chip Select Input The Chip Select signal must be asserted low for a bus cycle in the VT82885 to be accessed CS must be kept in the...

Страница 5: ... read except the following 1 Registers C and D are read only 2 Bit 7 of Register A is read only 3 The high order bit of the seconds byte is read only The contents of four registers A B C and D are described in the Register section FIGURE 2 ADDRESS MAP VT82885 TIME CALENDAR AND ALARM LOCATIONS The time and calendar information is obtained by reading the appropriate memory bytes The time calendar an...

Страница 6: ...r data is low Sev eral methods of avoiding any possible incor rect time and calendar reads are covered later in this text The three alarm bytes can be used in two ways First when the alarm time is written in the appropriate hours minutes and seconds alarm locations the alarm interrupt is initi ated at the specified time each day if the alarm enable bit is high The second use condition is to insert...

Страница 7: ...which are set remain stable throughout the read cycle All bits which are set high are cleared when read and new interrupts which are pending during the read cycle are held until after the cycle is completed One two or three bits can be set when reading Register C Each utilized flag bit should be examined when read to ensure that no interrupts are lost The second flag bit usage method is with fully...

Страница 8: ...al time clock that avoid any possibility of accessing inconsistent time and calendar data The first method uses the update ended interrupt If enabled an interrupt occurs after every up date cycle that indicates that over 999 ms are available to read valid time and date information If this interrupt is used the IRQF bit in Regis ter C should be cleared before leaving the interrupt routine A second ...

Страница 9: ...IE SQWE DM 24 12 DSE SET When the SET bit is a zero the update transfer functions normally by advancing the counts once per second When the SET bit is written to a one any update transfer is inhibited and the program can initialize the time and calendar bytes without an update occurring in the midst of initializing SET is a read write bit that is not modified by RE SET or internal functions of the...

Страница 10: ...ts are cleared after Register C is read by the program or when the RESET pin is low PF The Periodic Interrupt Flag PF is a read only bit whcih is set to a one when an edge is detected on the selected tap of the divider chain The RS3 through RS0 bits establish the periodic rate PF is set to a one independent of the state of the PIE bit When both PF and PIE are ones the IRQ signal is active and will...

Страница 11: ...TER SYMBOL MIN TYP MAX UNITS NOTES Power Supply Voltage VCC 4 5 5 0 5 5 V 1 Input Logic 1 VIH 2 2 VCC 0 3 V 1 Input Logic 0 VIL 0 3 0 8 V 1 DC ELECTRICAL CHARACTERISTICS 0 C TO 70 C VCC 4 5 TO 5 5V PARAMETER SYMBOL MIN TYP MAX UNITS NOTES Power Supply Current ICC1 5 10 mA 2 Input Leakage IIL 1 0 1 0 µA 3 I O Leakage ILO 1 0 1 0 µA 4 Input Current IMOT 1 0 500 µA 3 Output 2 4V IOH 1 0 mA 1 5 Output...

Страница 12: ...Rise tASD 25 ns Pulse Width AS ALE High PWASH 60 ns Delay Time AS alE to DS E Rise tASED 40 ns Output Data Delay Time from DS E or RD tDDR 20 120 ns DataSetup Time tDSW 100 ns Reset Pulse Width tRWL 5 µs IRQ Release from DS tIRDS 2 µs IRQ Release from RESET tIRR 2 µs Delay Time before Update Cycle tBUC 244 µs Periodic Interrupt Time Interval tPI See Table 1 Time of Update Cycle tUC 1708 µs NOTES 1...

Страница 13: ...13 VT82885 Real Time Clock VIA Technologies Inc D U T 5 VOLTS 1 1 KΩ 50 pF 680Ω VT82885 BUS TIMING FOR WRITE CYCLE ...

Страница 14: ...14 VT82885 Real Time Clock VIA Technologies Inc AS RD WR CS AD0 AD7 PWEL tASD tASD PWASH tCYC tCS tASED PWEH tDSW tAHL tASL tCH tDHW VT82885 BUS TIMING FOR READ CYCLE ...

Страница 15: ...5 Real Time Clock VIA Technologies Inc AS RD WR CS AD0 AD7 PWEL tASD tASD PWASH tCYC tCS tASED PWEH tDDR tAHL tASL tDHR tCH VT82885 IRQ RELEASE DELAY TIMING RD RESET IRQ tRDS tIRR tRWL POWER DOWN POWER UP TIMING ...

Страница 16: ...CC slew from 4 5V to 0V CS at VIH tF 300 µs VCC slew from 0V to 4 5V CS at VIH tR 100 µs CS at VIH after Power Up tREC 20 200 ms tA 25 C PARAMETER SYMBOL MIN TYP MAX UNITS NOTES Expected Data Retention tDR 10 years NOTE The real time clock will keep time to an accuracy of 1 minute per month during data retention time for the period of tDR WARNING Under no circumstances are negative undershots of a...

Отзывы: