DS1216E - Batteries
Inside the DS1216E is a small lithium battery of 3 volts. Some contain two batteries.
If the DS1216E was manufactured many many years ago, then you need to be aware that the battery may have deteriorated.
Upon reading that, some people may point out the following 'Freshness Seal' text, which appears in a datasheet for the DS1216.
All batteries, even disconnected, suffer from a behaviour known as 'self discharge'. It is one of the reasons why batteries have a shelf life. They slowly self discharge, some battery technology more so than others. Lithium batteries are no exception.
When these DS1216E were leaving the factory in 1990, the maker certainly was not expecting them to be used 25 years later. The DS1216 datsheet at here is dated 2004, suggesting that the DS1216 was still in production at that time.
So, how does one tell when a particular DS1216 was manufactured ? I can find nothing authoritative, but when I look on the top of one of my DS1216E (photo here), I see "9120", which is possibly a date code - the 20th week in 1991.
Measuring battery voltage
First, to get some background, refer to the photos at here.
Step 1. Refer to the diagram of the IC (IC, not socket) at here.
Step 2. Place negative lead of the voltmeter on pin 8 ('GND' pin).
Step 3. Measure battery voltage by placing positive lead of the voltmeter on pin 4 ('BAT1' pin).
Step 4. If your DS1216E has two batteries, then measure the second battery by moving the positive lead of the voltmeter to pin 14 ('BAT2' pin).
To note is that I once encountered a new-old-stock DS1216E where the two battery pins measured well less than 1 volt, but I discovered 2.7 volts on one the pads on the DS1216E's PCB. The 2.7 volts had to be coming from one of two batteries. I have no idea why the 2.7 volts was not on the BAT1 or BAT2 pin.
Replacing bad battery/batteries
First, the DS1216E's bad battery/batteries need to be disconnected. The easiest way to do that is to turn the DS1216E upside down, then using a 'Dremel' type cutting tool, cut through the metal bridges of the battery/batteries. The photo at here shows the bridges that I write of. Obviously, to simply cut the bridges, you will not need to remove as much of the DS1216E as I did for the photo. Example here.
Next, connect a new 3 volt battery per the diagram at here or here. Take care; excessive heat may damage the IC.