Replacement for the MC146818A

Abstract: This applicaTIon note explains the hardware and software differences between the Motorola MC146818A and the Dallas DS12885 Real-TIme Clocks (RTCs).

OverviewThe Motorola MC146818A is no longer in producTIon. There is no direct replacement for this part. However, systems that have been designed to use the MC146818A can be modified to operate with the Dallas Semiconductor DS12885, DS12887, DS1685, or DS1687. This applicaTIon note discusses the differences between these parts and potential issues in converting from the MC146818A to the Dallas Semiconductor Real Time Clocks. DescriptionThe MC146818A provided clock and calendar functions with 50 bytes of user RAM memory, and was designed to work with either the Motorola or Intel processor timing . These features could be made nonvolatile by providing a backup battery on the board to maintain the VDD supply. For timekeeping, the MC146818A required a number of discrete components on the PCB along with a crystal to provide an input frequency. The input frequencies could be 32.768 kHz, 1.048576 MHz, or 4.194304 MHz.

The DS12885 is designed to provide the same timekeeping functions with a total of 114 bytes of user NV RAM. To reduce the part count on the PCB, the DS12885 will accept direct connection of a 32.768 kHz crystal with no additional timing components required. The DS12885 also has a separate input for a backup battery with internal switching circuitry to avoid data corruption during a power fail condition. The DS12885 is available in either 24-pin DIP or 28-pin PLCC packages.

The DS1685 includes an enhanced feature set including: century byte; 64-bit serial number; wake-up alarm; kickstart; SMI recovery stack; 242 bytes of user NV RAM; and an auxiliary battery input. The timekeeping algorithm in the DS1685 includes leap year compensation valid up to 2100. The DS1685 is available in either 24-pin DIP or 28-pin PLCC packages.

The DS12887 and DS1687 are modules combining a RTC with a battery and crystal contained within the package, so that no external parts are required. The DS12887 includes the DS12885 while the DS1687 is built using the DS1685. The modules has the same foot print as the 600-mil DIP package, and can therefore be placed on existing boards with a minimum of board level changes required.

If replacing the MC146818A using an existing 600-mil DIP footprint is desired, then the DS12887 or DS1687 would be the preferred choice. This conversion will involve the least number of changes to the board and will work without removing the existing timing circuitry from the board . Using the DS12885 or DS1685 will require replacing the timing circuitry with a 32.768 kHz crystal attached directly to the crystal input pins. In order to make the DS12885 or DS1685 nonvolatile will also require the connection of a 3-volt battery directly to pins that have other functions on the MC146818A. Pin Compatibility There are some pin differences between the parts. Some of these may be addressed with software, while others may require PCB changes. Tables 1 and 2 gives the pin functions for the MC146818A, DS12885, DS1685, DS12887, and DS1687 in 600-mil DIP and PLCC packages respectively.

Note: The DS1687 and DS12887 are not available in PLCC packages.

Table 1. Pin Names
Pin Number MC146818A DS12885 DS1685 DS12887 DS1687
24-Pin DIP 24-Pin PLCC
1 2 MOT MOT Active-Low PWR MOT Active-Low PWR
2 3 OSC1 X1 X1 NC NC
3 4 OSC2 X2 X2 NC NC
4 5 AD0 AD0 AD0 AD0 AD0
5 6 AD1 AD1 AD1 AD1 AD1
6 7 AD2 AD2 AD2 AD2 AD2
7 8 AD3 AD3 AD3 AD3 AD3
9 10 AD4 AD4 AD4 AD4 AD4
10 11 AD5 AD5 AD5 AD5 AD5
10 12 AD6 AD6 AD6 AD6 AD6
11 14 AD7 AD7 AD7 AD7 AD7
12 15 VSS GND GND GND GND
13 16 Active-Low CS Active-Low CS Active-Low CS Active-Low CS Active-Low CS
14 17 AS AS ALE AS ALE
15 19 R / Active-Low W R / Active-Low W R / Active-Low W R / Active-Low W R / Active-Low W
16 20 Active-Low STBY Batt GND Batt GND NC NC
17 twenty one DS DS Active-Low RD DS / RD
18 twenty two Active-Low RESET Active-Low RESET Active-Low KS Active-Low RESET Active-Low KS
19 twenty three Active-Low IRQ Active-Low IRQ Active-Low IRQ Active-Low IRQ Active-Low IRQ
20 twenty four CKFS VBAT VBAT NC NC
twenty one 25 CKOUT Active-Low RCLR Active-Low RCLR NC Active-Low RCLR
twenty two 26 PS NC VBAUX NC VBAUX
twenty three 27 SQW SQW SQW SQW SQW
twenty four 28 VDD VCC VCC VCC VCC
Functional Differences Table 2 summarizes the functional changes by pin for the DS12885 and DS12887. Table 3 has the changes for the DS1685 and DS1687. These changes will need to be comprehended and the appropriate modifications made to the board in replacing the MC146818A with any of the Dallas Semiconductor parts. Any pins not listed in Tables 2 and 3 are "No Connects".

Table 2. Functional Differences—DS12885 / 87
Pin #
DIP PLCC MC146818A DS12885 DS12887
1 2 MOT N / A N / A
2 3 OSC1 The MC146818A required external components along with crystals of 32.768 kHz, 1.048576 MHz, or 4.194304 MHz. The DS12885 is designed to work with a 32.768 kHz crystal connected directly to pins 2 and 3. The DS12887 does not require an external crystal, so any components on the board designed to connect a crystal to this pin may be removed. The MC146818A would accept input frequencies of 32.768 kHz, 1.048576 MHz, or 4.194304 MHz. The DS12887 includes a 32.768 kHz crystal in the module.
3 4 OSC2
4 5 AD0 N / A N / A
5 6 AD1 N / A N / A
6 7 AD2 N / A N / A
7 8 AD3 N / A N / A
8 9 AD4 N / A N / A
9 10 AD5 N / A N / A
10 12 AD6 When accessing the clock memory, AD6 on the DS12885 / 87 needs to be low during the address strobe. It was a "don't care" on the MC146818A.
11 14 AD7 N / A N / A
12 15 VSS N / A N / A
13 16 Active-Low CS N / A N / A
14 17 AS N / A N / A
15 19 R / Active-Low W N / A N / A
16 20 Active-Low STBY The negative side of the backup battery needs to be connected to pin 16 of the DS12885. The DS12885 handles the switching to battery power internally and will disable reads and writes while in back backup mode. This pin is a no connect on the DS12887. The DS12887 switches to an internal battery when VCC is not present and automatically disables reads and writes.
17 twenty one DS N / A N / A
18 twenty two Active-Low RESET N / A N / A
19 twenty three Active-Low IRQ N / A N / A
20 twenty four CKFS Pin 20 needs to be connected to the positive side of the backup battery. No Connect
twenty one 25 CKOUT The user RAM will be cleared if this pin is taken low. There is an internal pull-up resistor, so this pin should be left floating and not tied high. This pin is a no connect on the DS12887. On the DS12887A, the RCLR pin is brought out and should be treated the same as on the DS12885.
twenty two 26 PS The MC146818A used this pin to sense the battery voltage and set the VRT bit. This function is handled internally in the DS12885 / 87, and the pin is a no connect.
twenty three 27 SQW N / A N / A
twenty four 28 VDD Any on board backup battery that was connected to pin 24 should be removed. The DS12885 is designed to have the backup battery connected to pins 16 and 20. The DS12887 has the backup battery included in the module.

Table 3. Functional Differences—DS1685 / 87
Pin #
DIP PLCC MC146818A DS1685 DS1687
1 2 MOT The Active-Low PWR pin on the DS1685 / 87 is an output designed to support system power switching as a result of a date / time alarm (wake up) or a key closure (kickstart).
2 3 OSC1 The MC146818A required external components along with crystals of 32.768 kHz, 1.048576 MHz, or 4.194304 MHz. The DS1685 is designed to work with a 32.768 kHz crystal connected directly to pins 2 and 3. The DS1687 does not require an external crystal, so any components on the board designed to connect a crystal to this pin may be removed. The MC146818A would accept input frequencies of 32.768 kHz, 1.048576 MHz, or 4.194304 MHz. The DS1687 includes a 32.768 kHz crystal in the module.
3 4 OSC2
4 5 AD0 N / A N / A
5 6 AD1 N / A N / A
6 7 AD2 N / A N / A
7 8 AD3 N / A N / A
8 9 AD4 N / A N / A
9 10 AD5 N / A N / A
10 12 AD6 When accessing the clock memory, AD6 on the DS1685 / 87 needs to be low during the address strobe. It was a "don't care" on the MC146818A.
11 14 AD7 N / A N / A
12 15 VSS N / A N / A
13 16 Active-Low CS N / A N / A
14 17 AS N / A N / A
15 19 R / Active-Low W N / A N / A
16 20 Active-Low STBY The negative side of the backup battery needs to be connected to pin 16 of the DS1685. The DS1685 handles the switching to battery power internally and will disable reads and writes while in back backup mode. This pin is a no connect on the DS1687. The DS1687 switches to an internal battery when VCC is not present and automatically disables reads and writes.
17 twenty one DS N / A N / A
18 twenty two Active-Low RESET N / A N / A
19 twenty three IRQ N / A N / A
20 twenty four CKFS This pin needs to be connected to the positive side of the backup battery. No Connect
twenty one 25 CKOUT The user RAM will be cleared if this pin is taken low. There is an internal pull-up resistor, so this pin should be left floating and not tied high.
twenty two 26 PS The MC146818A used this pin to sense the battery voltage and set the VRT bit. This function is handled internally in the DS1685 / 87. This pin is the positive side for an auxiliary battery required for the kickstart and wake-up features.
twenty three 27 SQW N / A N / A
twenty four 28 VDD Any on board backup battery that was connected to VDD should be removed. The DS1685 is designed to have the backup battery connected to pins 16 and 20 in the DIP and pins 20 and 24 in the PLCC. The DS1687 has the backup battery included in the module.
Register DifferencesThe internal registers contained in memory locations 0A-0D are used to control the timekeeping, calendar, and interrupt functions of these parts. In the MC146818A DV2-DV0 were used to select the input frequency to provide a proper time base. Since the DS12885 / 87 and DS1685 / 87 use only the 32.768 kHz crystal these 3 bits are used to turn the oscillator on or off and to reset the countdown chain. A pattern of 010 is the only combination of bits that will turn the oscillator on and allow the RTC to keep time. A pattern of 11X will enable the oscillator but holds the countdown chain in reset. The next update will occur at 500 ms after a pattern of 010 is written to DV2-DV0. The VRT bit is maintained internally in the DS12885 / 87 and DS1685 / 87 and will continuously indicate the state of the backup battery voltage. This bit is read only.

Table 4 contains a list of the registers and the differences that will need to be comprehended in converting to the DS12885, DS12887, DS1685, or DS1687.

Table 4. Internal Registers
DS12885 / 87 and DS1685 / 87
Register A MSB 7 UIP N / A
6 DV2 N / A
5 DV1 1-Osc On; 0-Osc off
4 DV0 Must be 0 for timekeeping
3 RS3 N / A
2 RS2 N / A
1 RS1 N / A
LSB 0 RS0 N / A
Register B MSB 7 SET N / A
6 PIE N / A
5 AIE N / A
4 UIE N / A
3 SQWE N / A
2 DM N / A
1 24/12 N / A
LSB 0 DSE N / A
Register C MSB 7 IRQF N / A
6 PF N / A
5 AF N / A
4 UF N / A
3 0 N / A
2 0 N / A
1 0 N / A
LSB 0 0 N / A
Register D MSB 7 VRT This bit is read only and should
always be 1 to indicate a good
internal battery voltage.
6 0 N / A
5 0 N / A
4 0 N / A
3 0 N / A
2 0 N / A
1 0 N / A
LSB 0 0 N / A

LED Power Supply


single output led switching power supply, also known as switching Converter, is a high-frequency power conversion device. LED power supply with small-size, lightweight and efficient features are widely used almost all of the electronic equipment.

For this item, followed are the Features:
1. Universal AC input/Full range
2. Protection: Short circuit/Overload/Over Voltage
3. Cooling by free air convection
4. 100% full load burn-in test with 3-5 hours
5. No load power consumption < 0.5W
6. High efficiency, long life and high reliability
7. One year warranty


LED switching power supply is widely used in LED display (monochrome door screen, full color screen), LED lighting (LED lamps, LED street lights), LED module (guardrail tube, wall washer, advertising light box). Normal voltage of smps power supply is 5V, 12V, 24V, 36V, 48V, the maximum power is 400W, 480W,600W,720W,840W,960W.

 metal case switching power supply

 metal case switching power supply

slim power supply metal case switching power supply


LED Power Supply,LED Light Power Supply,Current LED Power Supply,Dimmable LED Power Supply

Shenzhen Yidashun Technology Co., Ltd. , https://www.ydsadapter.com

Posted on