PUL BE she . MOTOROLA ewcCS1400186/0 a SEMICONDUCTOR So TECHNICAL DATA MCCS146818B MCCS156818B Advance Information Real Time Clock plus SRAM Real Time Clock plus SRAM Module CMOS MCCS146818BP MCCS156818BP MCCS146818BFN MCCS156818BDW P SUFFIX FN SUFFIX DW SUFFIX PLASTIC PLASTIC SOG CASE 709 CASE 776 CASE 751F MCCS146818BM MCCS146818B1M MCCS156818BM MCCS156818B1M M SUFFIX MODULE CASE 905 MCCS is a trademark of Motorola, Inc. IBM, PC/AT are trademarks of International Business Machines Corp. Intel is a registered trademark of Intel, Inc. This document contains information on a new product. Specifications and information herein are subject to change without notice. MOTOROLA REV 2 | (Replaces MCCS146818B/D Rev 1 and MCCS146818B1M/D Rev 1.) MOTOROLA INC., 1992TABLE OF CONTENTS Paragraph Page Number Title Number SECTION 1 INTRODUCTION SECTION 2 ELECTRICAL CHARACTERISTICS 2.1 MAXIMUM RATINGS (Voltage referenced to VSS) ...........0. cece eee eee 7 2.2 THERMAL CHARACTERISTICS ............0 00 cece cece ccc eee e eee eeeee 7 2.3 DC ELECTRICAL CHARACTERISTICS (VBATT = 3.0 V, VDD = 0 V, Ta = 25C, Stand-by Mode) .................0. 8 2.4 DC ELECTRICAL CHARACTERISTICS (VDD = 4.75 to 5.25 V, TA = 0 to 70C, Voltages Referenced to VSS) ........ 8 2.5 BUS TIMING (Vpp = 4.5 to 5.5 V, CL = 130 pF, Ta = Oto 70C) ................ 9 2.6 SWITCHING CHARACTERISTICS (Vpp = 4.5 to 5.5 V, TA = Oto 70C) ......... 9 SECTION 3 PIN DESCRIPTIONS SECTION 4 REGISTER DESCRIPTIONS 4.1 INTRODUCTION 2.2.2.2... 62 e cece e cree been nnennees 18 4.2 REGISTER A READ/WRITE ($0A) ............. 000 cece eee eee eens 18 4.3 REGISTER B READ/WRITE ($0B) ...........0..0.. 0.000 ccc eee eee 20 4.4 REGISTER C READ ONLY ($0C) ............ 00. c eee eee eens 21 4.5 REGISTER D READ ONLY ($0D) ............ 0.0 c cece eee eee eens 22 SECTION 5 FUNCTIONAL DESCRIPTION 5.1 ADDRESS MAP .......... 0.00 ccc cent enn n eee teen eenees 23 5.2 TIME, CALENDAR, AND ALARM LOCATIONS ...............0 000 eee eee 23 5.3 STATIC CMOS SRAM .......... 00000. e eee enna 24 5.4 POWER DOWN CONSIDERATIONS ........00.0 0000.0. c cece eens 25 5.5 UPDATE CYCLE .... ccc cee teen enue nennnes 25 5.6 DIVIDER STAGES .... 0.0 ccc n ene e een enes 26 5.7 SQUARE-WAVE OUTPUT SELECTION .......... 00. cece cece eens 26 5.8 INTERRUPTS . 0.0... cece een tent ene n enn nenee 27 5.9 PERIODIC INTERRUPT SELECTION .......... 0.0... c cece cee ee eee ene 28 2 MCCS146818B e MCCS156818B REAL TIME CLOCK FAMILY MOTOROLATABLE OF CONTENTS (Continued) Paragraph Page Number Title Number SECTION 6 APPLICATION INFORMATION 6.1 MCCS1X6818B APPLICATIONS ..........00 00.000 cece ees 29 6.2 MODULE APPLICATIONS ......0..0. 00. ccc cc ccc eee cee teeter eee tenes 31 SECTION 7 PACKAGE DIMENSIONS 7.1 P SUFFIX, PLASTIC DIP (Case 709-02) ........ 0. ccc cece teens 33 7.2 FN SUFFIX, PQCC (Case 776-02) ...... 0... ccc teens 34 7.3 DW SUFFIX, SOG (Case 751F-03) ..... 0... ccc ee eee eens 35 7.4 MODULE (Case 905-01) 2.0... ccc ene ee nents 35 SECTION 8 ORDERING INFORMATION MOTOROLA MCCS146818B MCCS156818B REAL TIME CLOCK FAMILY 3LIST OF ILLUSTRATIONS Figure Number Title 1.1 Block Diagram ........ 0. . cece teen ee eee eens 2.1 Read/Write Timing for Motorola Bus Cycle .....................0-5. 2.2 Intel Bus Read Cycle 20... cette ene ees 2.3 Intel Bus Write Cycle ..... 0.0.20 eee nes 2.4 IRQ Release Delay ........ 0... ccc ccc eee e nnn eees 2.5 Power-Up Timing ......... 0... ccc ccc eee ent t nett eens 3.1 Pin AssignmentS ........ 00... cece eee ee eee eee eens 3.2 Oscillator Input Configurations ............... 0.20 3.3 Crystal Equivalent Circuit ..... 0.0.02. eects 5.1 Address Map ..... 0... cece ern e ete nennees 5.2 Update Ended and Periodic Relationships ......................005 6.1 IBM/INTEL Application Circuit Multiplexed Bus IBM PC/AT Intel 80X86 Multiplexed Bus Microprocessors ..................:- 6.2 18B Interfaced with Motorola Compatible Multiplexed Bus ........... 6.3 IBM/INTEL Application Circuit Multiplexed Bus IBM PC/AT Intel 80X86 Multiplexed Bus Microprocessors ..................-- LIST OF TABLES Table Number Title 4.1 Divider Configurations ............ 0... c ccc cece 4.2 Periodic Interrupt and Square Wave Output Frequency .............. 5.1 Time, Calendar, and Alarm Data Modes ....................0.0000. 4 MCCS146818B MCCS156818B REAL TIME CLOCK FAMILY Page Number MOTOROLASECTION 1 INTRODUCTION The MCCS146818B and MCCS156818B Real-Time Clock family, referred to in this document as the 18B, is compatible with the DS1285/1287/1287A line. The MCCS146818BM/B1M and MCCS156818BM/B1M devices include a crystal and lithium cell battery encapsulated into a module. These devices include the unique MOTEL concept for use with both Motorola and Intel microprocessor timing cycles. These devices combine five important features: 1) a complete time-of-day clock with alarm and a one hundred year calendar, 2) a programmable interrupt for alarm and timing functions, 3) a square wave generation circuit, 4) 114 bytes of ultra low power SRAM, and 5) the modules need no external parts. The MCCS146818B family interfaces with 1-MHz. processor buses and the MCCS156818B family with 2-MHz processor buses, while consuming very little power, allowing the module battery to last a long period of time. The real time clock plus SRAM has two distinct uses. First, it is a CMOS part that includes all the common battery backed-up functions such as SRAM, time, and calendar. Second, the devices may be used with a CMOS microprocessor to relieve the processor of the timekeeping workload, and to extend the available SRAM of the MPU. In addition the module includes a 32.768-kHz crystal and lithium cell encapsulated into the module. The only difference between the two RTCMs is that the 18B1M is able to erase (set to $FF) all of the built-in general-purpose SRAM by momentarily grounding the RCLR, while the device is in standby mode. This feature is not available on the 18BM. General Features e Pin compatible with DS1285 e Counts seconds, minutes, hours, days, day of the week, date of month and year with leap year compensation e Binary or BCD data representation e 12/24 hour mode e Daylight savings time option e Multiplexed bus for pin efficiency e Interfaced with software as 128 bytes of SRAM 14 bytes of clock and control registers 114 bytes of general-purpose SRAM e Programmable square wave signal e Three interrupts are separately software maskable and testable Time-of-day alarm Timed interrupt, once per second to once per day End of clock update cycle e Operating temperature range 0 to 70C e Digital inputs/outputs are TTL, NMOS, and CMOS compatible e Application information included in Section 6.0 MOTOROLA MCCS146818B MCCS156818B REAL TIME CLOCK FAMILY 5Module Features Ultra long battery life (see Section 6.2 Item 3) Drop-in replacement for IBM PC/AT computer clock calendar (BM only) Pin for pin compatible with DS1287A/DS1287 18B1M equipped with SRAM clear function No external parts required 1 minute per month accuracy at room temperature mm bb LL 32 KH osc! ~~ = 4 E82 gn Lt 8g oO osc VRT RSO-RS3 _ POWER PERIODIC INTERRUPT/SQUARE WAVE 5 p CYCLE SELECTOR (1 OF 13 SELECTOR) AND ~~ SENSE Vpp > circulT ENABLE | SQUARE WAVE OUT aby f+ | REGISTERS A, B, C, D RESET al 4 BYTES bs 1Hz em SQW D oO i RW >} ' AS-7>4 BUS CLOCK, ALARM, INTERFACE CLOCK/ CALENDAR SRAM CALENDAR (10 BYTES) ADO-AD? ) UPDATE MOT BCD/ RCLR* > BINARY ; x_ _ > < G) > __ RD (READ OUTPUT ENABLE) y t (DS PIN) N. ___(2} > <___(3)_ @ *- WR (WRITE ENABLE} (RW PIN) _/f X > CS (CHIP SELECT) \ \ ~ ADO-AD7 { ADDRESS 4 (ADDRESS/DATA BUS) ~ VALID 4 Figure 2.2. Intel Bus Read Cycle < @7)| ALE (ADDRESS LATCH ENABLE) _,, ie" (AS PIN) J | VLOW < RD (READ OUTPUT ENABLE) (DS PIN) . @- WR (WRITE ENABLE) \ 7 (RAW PIN) K ; @ @ CS (CHIP SELECT) \ \\\ \ Lf / / / / / @) @ < 8) G1) > < >> ()) ADO-AD? ADDRESS WRITE DATA }_- (ADDRESS/DATA BUS) VALID VALID _J Figure 2.3. Intel Bus Write Cycle MCCS146818B MCCS156818B REAL TIME CLOCK FAMILY 11so / \ VOW 4 < tIRDS RR @) @) x jw NOTE: VHIGH = VDD 2.0 V, VLow = 0.8 V for Vpp = 5.0 V+ 10% Figure 2.4. IRQ Release Delay Vpp PIN \ OV <__ tRLH __ RESET PIN | TN / a, > /<-. tRWL Figure 2.5. Power-Up Timing 12 MCCS146818B MCCS156818B REAL TIME CLOCK FAMILY MOTOROLASECTION 3 PIN DESCRIPTIONS mot [] 1 @ 28{] Vop osci [] 2 27{] SQW mor [] 1 24[) Vop osce [] 3 26{] NC osci [] 2 23{] Saw ne [| 4 25{] NC osc [] 3 22{] NC apo [| 5 24]] RCLR Apo [} 4 21{] RCLR ADO ) ACER aot [] 6 231] VBaTT apt [| 5 201] Vearr AD D Vaart ane [} 7 22 [] IRQ av2 [] 6 19]] AD2 1 ia apa [} 8 21] RESET aps 7 ell AD3 RESET apa {I 9 20 {] 0s AD4 1] DS apa [] 8 17] Ds ADS []10 19[] Vsg AD5 Vsg ~ aos [] 9 16] Vss Ne TR aoe []11 18f] aos [10 15[) RW 1213 14 15 16 17 18 ap? [}12 17[] As apz {11 141] as S25 B8i8ee ne L113 16{] cS Vss f "2 13H os NC = No Connection VSS l 4 8 ! NC MCCS146818BP MCCS146818BFN MCCS156818BDW MCCS156818BP CASE 776 CASE 751F CASE 709 Pacc SOG PLASTIC DIP mor [] 4 241] Yop mor [| 4 241] Vpp 23{] SQW 23[] SQW apo [| 4 21[] RCLR Apo [] 4 apt [| 5 aot (5 ao2 [| 6 19] iRQ ao2 [| 6 19[] ind aps [| 7 18{] RESET aps (| 7 18 [] RESET apa [| 8 17{] ps apa [] 8 17[] Ds aps [] 9 aps [] 9 ape []10 151] RW ape [] 10 151] RAW ao7 {11 141] as ao (11 141] as vgg [12 13{] Vgg [12 13[] &S MCCS146818B1M MCCS146818BM MCCS156818B1M MCCS156818BM CASE 905 CASE 905 MODULE MODULE Figure 3.1. Pin Assignments MOTOROLA MCCS146818B e MCCS156818B REAL TIME CLOCK FAMILY 13PDIP* Pin # Pacc Pin # SOG Pin # Pin Name Description MOTOROLA/INTEL MOT This input pin is used to select different bus timing structures. When Vpp or a logic high is applied to this pin, the 18B responds to a Motorola microprocessor bus cycle. If a logic low or Vgg is applied to this pin, the Intel bus cycle is used. This pin should be hard-wired to Vpp or Vsg and should not change states during normal operation. See pin descriptions for R/W, DS, and AS for more information. This pin has an internal 20 kQ pulldown resistor. 2,3 3,4 2,3 OSCILLATOR/ CRYSTAL OSC1, OSC2 These input/output pins serve a single function in two different ways. First, the user may attach a 32.768 kHz quartz crystal with a load capacitance of 6-8 pF to these pins to supply the on-board oscillator with a frequency reference. Second, OSC1 may be used to supply the 188 an off-chip 32.768 kHz signal to run the internal counters. This signal may be supplied from an external oscillator or other source. Figure 3.2 shows the schematic for both these configurations. Figure 3.3 shows the crystal equivalent circuit. External trimming capacitors are required and the voltage requirements are 0 V < Vin < Vpp. The fixed input capacitor shown in Figure 3.2 may be replaced by a 5-15 pF tunable capacitor when higher accuracy is desired. Oscillator startup time is layout dependent. Not available on module version. Tuning measurements should NOT be taken from these pins. The SQW pin should be enabled and set up to output an 8.192 kHz signal via Registers A and B. Any frequency accuracy measurements should be made at the SQW pin. Measurements should be accurate to 3 decimal places. in the layout, traces MUST be kept as short as possible. No other traces should be routed under the oscillator. A ground ring around the oscillator circuit will improve noise rejection. 4-11 5-10, 12,14 5-12 ADDRESS/DATA ADO-AD7 These input/output pins are the media for which data and information is passed to and from the system microprocessor or other host. These pins are multiplexed and supply the 18B with both address and data. An address is applied to these pins, and then an address select is applied to the AS pin (see the AS pin description). After the address is applied the SRAM or clock location may be read from or written to depending on the other control signals applied to the 18B. During a read cycle the data is valid after the DS or RD signal is applied. The delay is defined by tDDR in the timing characteristics. The bus returns to a high impedance state after DS is removed. During a write cycle the data must be stable before the DS goes iow or WR signal goes high. This parameter is also supplied in the ac characteristics of this data sheet. The address must be valid just prior to the fall of AS. These pins have an active pulldown of approximately 100 kQ in standby mode. Module pin assignments are the same as for the PDIP unless otherwise noted in the Description column. 14 MCCS146818B * MCCS156818B REAL TIME CLOCK FAMILY MOTOROLAPDIP* Pin # PQacc Pin # SOG Pin # Pin Name Description 13 16 16 CHIP SELECT cs This input pin is used by the hosts address decoding scheme to select or enable this device. This signal must be stable over the entire cycle. If unused, this input should be grounded. If grounded, the application must always use AS and DS in pairs, as any AS latches a new address into the internal address latch. For instance, if the CS pin is grounded and an AS occurs, an address is latched into the internal address buffer and internal decoding takes place to select the proper SRAM or clock location. At this point, a DS should be applied to act upon the data in that SRAM or clock location. DS can not be continually pulsed to access the same or next address. When Vpp is below VBaTT x 1.25, the 18B internally inhibits access cycles by internally disabling the CS input. This action protects both the 18B clock data and SRAM data from a spurious write during a power cycle. This pin has an active pulldown of approximately 100 kQ. 14 17 17 ADDRESS STROBE AS This input pin is used to demultiplex the address/data bus. When an address is supplied to the 18B, this pin is pulsed, latching the address into internal latches. After this occurs, the data may then be transferred to or from the 18B via the address/data bus. This pin has an active pulldown of approximately 100 kQ. See Application Information for more information. 15 19 18 READ/WRITE RW The MOTEL circuit treats the R/W input pin in one of two ways. When a Motorola type processor is connected, R/W is a level sensitive input that indicates whether the current cycle is a read or write cycle. A read cycle is indicated with a high level on R/W while DS is high, a write cycle is a low on R/W during DS. The second interpretation of R/W is as negative write pulses, WR, froman Intel processor. The MOTEL circuit in this mode gives RW the same meaning as a write (W) pulse on many generic SRAMs. This pin has an active pulldown of approximately 100 k2Q2. 17 21 20 DATA STROBE DS This input pin has two interpretations via the MOT circuit. When emanating from a Motorola type processor, DS is a positive pulse during the latter portion of the bus cycle, and is variously called DS (data strobe), E (enable), and 62 (2 clock or phase 2 clock). During read cycles, DS signifies the time that the 18B is to drive the bidirectional bus. In write cycles, the trailing edge of DS causes the 18B to latch the written data. See Application Information, item 2, for more information. The second MOT interpretation of DS is that of RD emanating from the Intel processor. In this case, DS identifies the time period when the 18B drives the bus with read data. This interpretation of DS is also the same, and an output-enable signal on a typical memory. This pin has an active pulldown of approximately 100 kQ. *Module pin assignments are the same as for the PDIP unless otherwise noted in the Description column. MOTOROLA MCCS146818B e MCCS156818B REAL TIME CLOCK FAMILY 15PDIP* Pin # PQcc Pin # SOG Pin # Pin Name Description 18 22 21 This input pin does not affect the clock, calendar or SRAM functions of the 18B. On power up, the RESET pin should be held low for the specified item, tRLH, in order for the power supply to stabilize during the power cycle. When RESET is low the following occurs: a) Periodic interrupt enable (PIE) bit is cleared to zero. b) Alarm interrupt enable (AIE) bit is cleared to zero. c) Update ended interrupt flag (UF) bit is cleared to zero. d) Interrupt request status flag (IRQF) bit is cleared to zero. e) Periodic interrupt flag (PF) is cleared to zero. f) The device is not accessible. g) Alarm interrupt flag (AF) bit is cleared to zero. h) IRQ pin is in a high impedance state. i) Square wave output enable (SQWE) is cleared to zero. j) Update ended interrupt enable (UIE) is cleared to zero. This connection allows the 18B to go in and out of power fail without affecting any of the control registers. RESET function is not available when Vpp < (1.25 x VBatT). This pin has an active pulldown of approximately 100 kQ. 19 23 22 INTERRUPT REQUEST IRQ This output pin is an active-iow open-drain to ground output of the 18B that may be used as an interrupt input to a processor. This IRQ output remains low as long as the status bit (bits 7-4 of Register C) causing the interrupt is present and the corresponding interrupt enable bit (bits 64 of Register B) is set. To clear the IRQ pin, the processor program normally reads Register C. The RESET pin also clears pending interrupts. When no interrupt conditions are present, the IRQ level is in the high impedance state. Multiple interrupting devices may thus be connected to an IRQ bus with one pullup at the processor. IRQ is disabled during Stand-by Mode. 20 24 23 BACKUP POWER VBATT This input pin supplies the 18B with power while the system is in Stand-by Mode. This input is designed for a 3.0 volt lithium cell. This voltage needs to be held between 2.2 and 3 volts for proper operation. The nominal write protect trip point voltage at which access to the 18B is prohibited, is set by internal circuitry as 1.25 x VBATT- Amaximum load of 700 nA at 25C in the absence of Vpp should be used to size the battery or other source. See DC CHARACTERISTICS table. This device is optimized for a lithium cell. If a Ni-Cad is used the application must not allow the charging voltage at VBATT to exceed the VBATTx1.25criteria. Ifthe voltage atthe VBATT pinistoogreat, the device's internal power switching circuit disallows access to the device. Not available on module version. 21 25 24 SRAM CLEAR RCLR This input pin is used to set to logic high ($FF) all 114 bytes of general-purpose SRAM, but does not affect the RAM associated with the clock and calendar functions or registers. In order to clear the SRAM, RCLR must be forced to an input logic low (Vs) during battery backup mode, when Vpp is not applied. This can be done by placing ajumper from RCLR to Vss while the device is powered down. This pin has an internal 20 kQ pullup. Not available on 18BM version. This pin must be left open in normal operation. *Module pin assignments are the same as for the PDIP unless otherwise noted in the Description column. 16 MCCS146818B MCCS156818B REAL TIME CLOCK FAMILY MOTOROLAPDIP* | PQCC | SOG Pin# | Pin# | Pin# Pin Name Description 23 27 27 SQUARE WAVE This output pin can output a signal from one of the 13 taps SQW provided by the 15 internally-divided stages. The frequency of the SQW may be altered by programming Register A, as shown in Table 4.2. The SQW signal may be turned on by setting the SQWE (square wave enable) bit in Register B to a 1, logic high. 24 28 28 POWER DC power, + 5 Vdc, is provided to the 18B via this pin. This pin VpD supplies power only during normal operation. During stand-by mode, power is supplied via the VBATT pin. 12,16 | 15,20 |14,19 | POWER These pins supply the 18B with system ground. One ground is Vss convenient to ground the back-up battery; however, this ground may also be used as a system ground along with the battery ground. Both pins should be grounded for optimum performance. Pin 16 not available on module version. 22 1,11, |4,13, | NO-CONNECT These pins are not connected to any internal device. Pin 22 not 13, 18, | 15, 25, | NC available on module version. 26 26 *Module pin assignments are the same as for the PDIP unless otherwise noted in the Description column. 32.768 kHz OPTIONAL Wop -1.0) 2 osci (OPEN) UF BIT N REGISTER C tpl > tp] + 2 >}<_ tpj +22. > PF BIT IN REGISTER C tp, = Periodic Interrupt Time Interval (500 ms, 125 ms, 62.5 ms, etc. per Table 2) tuc = Update Cycle Time (1984 us) tpuc = Delay Time Before Update Cycle (244 us) Figure 5.2. Update Ended and Periodic Relationships 5.6 DIVIDER STAGES The 18B has 13 binary-divider stages following the time base as shown in the block diagram. The output of the dividers is a 1 Hz signal to the update system logic. The dividers are controlled by three divider bits (DV2, DV1, DVO) in Register A. The only time base for this device is 32.768 kHz. The divider chain may be held at reset, which allows precision setting of the time. When the divider is changed from reset to an operation time base, the first update system is one second later. 5.7 SQUARE-WAVE OUTPUT SELECTION 26 Thirteen divider taps are made available to a 1-of-13 selector as shown in the block diagram. The first purpose of selecting a divider tap is to generate a square wave output signal at the SQW pin. The RSO-RS3 bits in Register A establish the square wave frequency as listed in Table 4.2. The SQW frequency selection shares the 1-of-13 selector with the periodic interrupts. MCCS146818B MCCS156818B REAL TIME CLOCK FAMILY MOTOROLA5.8 Once the frequency is selected, the output of the SQW pin may be turned on and off under program control with the square wave output selection bit (SQWE bit) in Register B. The 18B then generates a symmetrical waveform at the time of execution. The square wave output pin has a number of potential uses. For example, it can serve as a frequency standard for internal use or as a frequency synthesizer, or could be used to generate one or more audio tones under program control. INTERRUPTS The RTC plus SRAM includes three separate fully automatic sources of interrupts to the processor. The alarm interrupt may be programmed to occur at rates from once-per-second to one-per-day. The periodic interrupt may be selected for rates from half-a-second to 122 us. The update-ended interrupt may be used to indicate to the program that an update cycle is completed. Each of these independent interrupt conditions is described in greater detail in other sections of this data sheet. The processor program selects which interrupts, if any, it wishes to receive. Three bits in Register B enable the three interrupts. Writing a 1 to an interrupt-enable bit allows the interrupt to be initiated when the event occurs. A 0 in the interrupt-enable bit prohibits the IRQ pin from being asserted due to the interrupt cause. If an interrupt flag is already set when the interrupt becomes enabled, the IRQ pin is immediately activated, though the interrupt causing the event may have occurred much earlier. Thus, there are cases where the programs should clear such earlier interrupts before first enabling new interrupts. When an interrupt event occurs, a flag bit is set to a 1 in Register C. Each of the three interrupt sources has separate flag bits in Register C, which are set independent of the state of the corresponding enable bits in Register B. The flag bit may be used with or without enabling the corresponding enable bits. In the software scanned or polling case, the program does not enable the interrupt. The interrupt flag bit becomes a status bit, which the software interrogates when it wishes. When the software detects that the flag is set, itis an indication to the software that the interrupt event occurred since the bit was last read. However, there is one precaution. The flag bits in Register C are cleared (record of the interrupt event is erased) when Register C is read. Double latching is included with Register C so the bits that are set are stable through the read cycle. All bits that are high when read by the program are cleared, and new interrupts (on any bits) are held after the read cycle. One, two, or three flag bits may be found to be set when Register C is used. The program should inspect all utilized flag bits every time register C is read to insure that no interrupts are lost. The second flag bit usage method is with fully enabled interrupts. When an interrupt flag bit is also set, the IRQ pin is asserted low. IRQ is asserted as long as one of the three interrupted sources has its flag and enables bits set. The IROQF bit in Register C is a 1 whenever the IRQ pin is being driven low. MOTOROLA MCCS146818B MCCS156818B REAL TIME CLOCK FAMILY 275.9 28 The processor program can determine that the RTC initiated the interrupt by reading Register C. A1 in bit 7 (IRQF bit) indicates that one or more interrupts have been initiated by the part. The act of reading Register C clears all the then active flag bits, plus the IRQF bit. When the program finds IROF set, it should look at each of the individual flag bits in the same byte which have the corresponding interrupt-mask bit set and service each interrupt which is set. Again, more than one interrupt-flag may be set. PERIODIC INTERRUPT SELECTION The periodic interrupt allows the IRQ pin to be triggered from once every 500 ms to once every 122 us. The periodic interrupt is separate from the alarm interrupt, which may be output from once per second to once per day. Table 4.2 shows that the periodic interrupt rate is selected with the same Register A bits that select the square wave frequency. Changing one also changes the other. But each function may be separately enabled so that a program could switch between the two features or use both. The SQW pin is enabled by the SQWE bit in Register B. Similarly the periodic interrupt is enabled by the PIE bit in Register B. Periodic interrupt is usable by practically all real time systems. It can be used to scan for all forms of inputs from contact closure to serial receive bits or bytes. It can be used in multiplexing displays or with software counters to measure inputs, create output intervals, or await the next needed software function. MCCS146818B MCCS156818B REAL TIME CLOCK FAMILY MOTOROLA6.1 MOTOROLA SECTION 6 APPLICATION INFORMATION MCCS1X6818B APPLICATIONS Refer to Figure 6.1, Figure 6.2 and the following notes for application examples. 1. The MCCS146818B (18B) will drop directly into an MC146818A (18A) circuit with some modifications. The user may use the 18B if the following steps are taken: a) Cut trace or wire going to CKFS on the 18A; this is a battery connection on the 18B. The user needs to supply battery back-up power to this pin. A 3.0 V lithium cell is suggested. Cut the trace or wire to CKOUT on the 184A; this pin is used to clear the contents of the SRAM in stand-by mode on the 18B. It is not recommended to connect any signal to the NC on the 18B. Therefore, it is suggested that the user cut the wire or trace going to these pins and leave them open. The user will need to disconnect the battery from VDpp on the 18A. The battery connection for the 18B is on the VBATT pin. While Ni-Cads may be used (see VBATT in Pin Descriptions) the part is designed for a lithium cell. The 18B is aone-frequency device. The only crystal this chip accepts is the 32.768 kHz 6-8 pF type. If the user has the 1, 2, or 4 MHz crystal or oscillator in the 18A circuit, these will need to be replaced with the 32.768 kHz type. For this reason, the 18B cannot be used in applications that take advantage of the 18As 1, 2, or 4 MHz clock outputs. Vss is used for a system ground. The 18A used this as a stand-by input signal. This function is now done internally and this trace or wire will need to be replaced with a system ground or with a battery ground. The user may also wish to replace the 18A with an 18B1M, which will eliminate all the above except items b) and e). The RCLR pin on the 18B1M will need to be clipped off for proper operation. Or, the user may wish to use the 18BM which already has the RCLR pin clipped. The 18BM includes the 18B along with a crystal and a battery encapsulated into a module. The 18B1M is the same module with RCLR available. In some applications, the user may choose to tie CS directly to ground. This is acceptable; however, this will force the programmer to always apply AS and DS in pairs. This means that if CS is grounded, any ALE (IBM/Intel timing cycle) will cause a new address to be latched into the 18B. It is good practice to use the AS and DS signals in pairs at any time in any application. It is also good practice to use a true chip select derived from address decoding for CS. MCCS146818B MCCS156818B REAL TIME CLOCK FAMILY 29lf CS is grounded, the user must always use AS and DS in pairs since any AS will latch a new address into the internal address latch. For instance, If the CS pin is grounded andan AS occurs, an address is latched into the internal address buffer and internal decoding takes place to select the proper SRAM or clock location. At this point, a DS should be applied to act upon the data in said SRAM or clock location. 3. Cjnis dependent on C_ of the XTAL being selected. The recommended C_ of the crystal is 6-8 pF. 4. This device is optimized for a lithium cell. If a Ni-Cad is used the application must not allow the charging voltage at the VBATT pin to exceed the VBATT x 1.25 criteria. That is, if the voltage at the VBATT pin is too great, the devices internal power switching circuit will disallow access to the device. 5. For the MCCS156818B, care should be taken when using an external TTL clock reference. The upper rail must be limited to VBATT + 0.6 V. 1) MoT LY Vpp = ot OSC1 SQW | 32.768 kHz T Cin oS NC = 3 RCLR Osc2 IOW @ $70 [ OE 4 VBATT ADO __ AQ BOr / Al BIE) 5] apt IRQ 2 BREN / | RESET R (SEE NOTE 1) YS BIN & Ap2 MOA ON a DS PAS BSE 7 0.005 WF LITHIUM 3.0 V CELL /_ Od AG B6 rN / 1 AD3 16 T , VFN ft iss as 244 | AD4 Rows as = 9 & IOR @ $71 [OR @ $71 4 DIR y| A as [14 AO BO 10 ___ LTH fT Al Bt \ y AD6 as [13 1OW @ $71 / Re B2 = 11] ap7 | ______ iOwW @ $70 Yo ORIN SYSTEM V, AG B6 N\ ADDRESS /y a7 B7- EN DECODING DATA BUS 12 Vgg GROUND OF 80X86 OE | SEE APPLICATION 245 MCCS1X6818B OW @ $71 INFORMATION we 6.1 ITEM 2 IOR @ $71 J NOTES: 1. Motorola recommends that this resistor be used as a design consideration based on knowledge of the internal circuitry of the 9 18B. This resistor is not required for UL approval and may be omitted. 2. The IBM AT writes a 7-bit address to I/O port $70 and then reads the data from I/O port $71 or writes I/O address $71. This is a typical application for a non-multiplexed bus. 3. Cin is dependent on C,_ of XTAL being selected. Figure 6.1. IBM/INTEL Application Circuit Multiplexed Bus IBM PC/AT Intel 80X86 Multiplexed Bus Microprocessors 30 MCCS146818B MCCS156818B REAL TIME CLOCK FAMILY MOTOROLA 8 ADDRESS/DATA MULTIPLEXED 8 v ADDRESS STROBE > OTHER DATA STROBE (E) >e pe PERIPHERALS AND MC68XX READ/WRITE (R/W) > MEMORY INTERRUPT REQUEST (IRQ) o~ 7 > +] 0.18 (0.07 @| T/L OM@[NOr@ 0.18 (0.007 @|T/NrP|Ln a 28 (NOTE 1) rn > G1_> NOTES: 1. DUE TO SPACE LIMITATION, CASE 776-02 SHALL BE REPRESENTED BY A GENERAL {SMALLER) CASE OUTLINE DRAWING RATHER THAN SHOWING ALL 28 LEADS. 2. DATUMS -L-, -M-, -N-, AND -P- DETERMINED WHERE TOP OF LEAD SHOULDER EXIT PLASTIC BODY AT MOLD PARTING LINE. 3. DIM G1, TRUE POSITION TO BE MEASURED AT DATUM -T-, SEATING PLANE. 4. DIMR AND U DO NOT INCLUDE MOLD PROTRUSION. ALLOWABLE MOLD PROTRUSION IS 0.25 (0.010) PER SIDE. 5. DIMENSIONING AND TOLERANCING PER ANSI Y14.5M, 1982. 6. CONTROLLING DIMENSION: INCH. 7. 776-01 OBSOLETE, NEW STANDARD 776-02. 34 MCCS146818B MCCS156818B REAL TIME CLOCK FAMILY MOTOROLA. 7.3 DW SUFFIX, SOG (Case 751F-03) oe NOTES cel . DIMENSIONS A AND B ARE DATUMS AND TIS ~Annn-n-nn-n-n7-n-n_n_ A DATUM SURFACE. AAA AA HAAARAASR HA . DIMENSIONING AND TOLERANCING PER ANSI 28 15 Y14.5M, 1982. . CONTROLLING DIMENSION: MILLIMETER. P | 4] 0.25 0.010) @ | DIMENSION A AND 8 DO NOT INCLUDE MOLD 14PL PROTRUSION. . MAXIMUM MOLD PROTRUSION 0.15 (0.006) PER SIDE. 7 RX 45 Sr oe eee i ff uy pol es oOo o NW D zap. [#1025001 @]t]e [a O] 7.4 MODULE (Case 905-01) NOTES: 1, DIMENSIONING AND TOLERANCING PER ANS! Y14.5M, 1982. 2, CONTROLLING DIMENSION: INCH. 3. VARIOUS LEADS MISSING, DEPENDENT ON PART TYPE. I }_ [efo.004 (0.10) aie icks TJ Sea . D 24 PL NOTE3 [4] 0.010 (0.25) [T]Z] MOTOROLA MCCS146818B MCCS156818B REAL TIME CLOCK FAMILY 35SECTION 8 ORDERING INFORMATION MCCS 1X6818B XX Device Prefix ee L Package (P = 24-Pin DIP Part Number FN = 28-Lead PQCC M = Module without RCLR (146818B or 156818B) 1M = Module with RGLR DW = SOG)- 7/6? Full Part Numbers MCCS146818BP MCCS156818BP MCCS146818BFN MCCS156818BM MCCS146818BM MCCS156818B1M MCCS146818B1M MCCS156818BDW Motorola reserves the right to make changes without further notice to any products herein. Motorola makes no warranty, representation or guarantee regarding the suitability of its products for any particular purpose, nor does Motorola assume any liability arising out of the application or use of any product or circuit, and specifically disclaims any and all liability, including without limitation consequential or incidental damages. Typical parameters can and do vary in different applications. All operating parameters, including Typicals must be validated for each customer application by customer's technical experts. Motorola does not convey any license under its patent rights nor the rights of others. Motorola products are not designed, intended, or authorized for use as components in systems intended for surgical implant into the body, or other applications intended to support or sustain life, or for any other application in which the failure of the Motorola product could create a situation where personal injury or death may occur. Should Buyer purchase or use Motorola products for any such unintended or unauthorized application, Buyer shall indemnify and hold Motorola and its officers, employees, subsidiaries, affiliates, and distributors harmless against all claims, costs, damages, and expenses, and reasonable attorney fees arising out of, directly or indirectly, any claim of personal injury or death associated with such unintended or unauthorized use, even if such claim alleges that Motorola was negligent regarding the design or manufacture of the part. Motorola and@) are registered trademarks of Motorola, Inc. Motorola, Inc. is an Equal Opportunity/Affirmative Action Employer. Literature Distribution Centers: USA: Motorola Literature Distribution; P.O. Box 20912; Phoenix, Arizona 85036. EUROPE: Motorola Ltd.; European Literature Centre; 88 Tanners Drive, Blakelands, Milton Keynes, MK14 SBP, England. JAPAN: Nippon Motorola Ltd.; 4-32-1, Nishi-Gotanda, Shinagawa-ku, Tokyo 141, Japan. ASIA PACIFIC: Motorola Semiconductors H.K. Ltd.; Silicon Harbour Center, No. 2 Dai King Street, Tai Po Industrial Estate, Tai Po, N.T., Hong Kong. oszsi4 VR Le MOTOROLA Ee 7 MCCS146818B/D 0 al 1ATX26125-2 PRINTEDINUSA 7/92 IMPERIALLITHO 86565 12,000 MOS D-A YFAAAA