Products > Programming

watchdog programming ds1286 and others need help

(1/4) > >>

VE2JFQ:
hello, i have a problem with a ds1286 real time clock. i am a telecom technician, i have 3 ifr com-120b. all three the ds1286 battery has died! i managed to find three ds1286 in montreal, my problem is that i want to read and program them. i'm not a programmer, but i have a tl866 2 plus, but it doesn't take ds1286 or ds1284 (which contains 50bits of data. like time clock, serial number and options. i'm thinking of taking a pic programmer or arduino. I don't know these are two programs! what do you suggest to me? thank you and good day jacques

techman-001:

--- Quote from: VE2JFQ on January 25, 2021, 12:19:24 am ---hello, i have a problem with a ds1286 real time clock. i am a telecom technician, i have 3 ifr com-120b. all three the ds1286 battery has died! i managed to find three ds1286 in montreal, my problem is that i want to read and program them. i'm not a programmer, but i have a tl866 2 plus, but it doesn't take ds1286 or ds1284 (which contains 50bits of data. like time clock, serial number and options. i'm thinking of taking a pic programmer or arduino. I don't know these are two programs! what do you suggest to me? thank you and good day jacques

--- End quote ---

How about carefully sawing open the package (with a fine cutting wheel in a milling machine at a non Dremel tool plastic melting speed), remove the battery and add another battery of the same type on top of the RTC package ?

Beware the dust, don't breathe it, go slow.

Find a friend with an x-ray machine if you need to see where the battery is first.

Ian.M:
If you are sure you need to be able to read/write the DS1286 outside of the equipment that uses it, a PIC programmer *WON'T* help.

An Arduino Uno or Nano has enough I/O pins to access a DS1286.  It needs six address lines (connect to Arduino A0-A5), 8 data lines (connect the two LSBs to digital pins 8 and 9, and the rest of the data bus to digital pins 2-7, matching the data bit number to the arduino pin number mod 8 to make the sketch easier to code#), and three control lines: /CS, /OE and /WE (connect to digital pins 10-12).  The easiest hardware setup would be an Arduino Nano in a solderless breadboard with the DS1286 chip. It only needs max. 15mA  @5V, so you can power it from the Arduino, powered from your PC via USB.  It will need a 100nF decoupling cap between its Vcc pin and GND pin.

Then you need to write a sketch to dump the memory contents.  If you get stuck ask here.   *DON'T* test your sketch on a good chip from your equipment, get a spare or use one that's failed and been hacked to replace the battery.  During development, use 3K3 resistors in series with the data lines to prevent disaster if you accidentally enable /OE and /CE with the data bus pins set as outputs in the sketch.  Once you've got that working we can help you add the ability to write data to specific registers/locations, and once that's tested and working you can risk pulling a good chip to dump it so you can program the replacements.

N.B. *ALL* N.O.S. DS1286 modules are date expired.  They only are specified for a ten year operating or shelf life from date of manufacture and Maxim discontinued production back in 2006, so any old stock you can find is  already at 150% of its expected lifespan and is likely to either have a dead battery or to fail within a couple of years.

Re: Techman's suggestion, the battery can be approximately located with a small powerful magnet. 

There's a thread on how to Dremel in to the battery connections and patch in an external CR2032 coin cell here: https://forums.irixnet.org/thread-1370.html
However I would recommend using a small cylindrical burr from a set of Dremel burr bits rather than a drill bit to grind away enough epoxy to expose the battery pins.  Thinner wire would make a neater job of connecting the added battery holder.  If you don't have clearance above the chip, it could be located elsewhere.

I *DON'T* recommend the approach used in the attached photos I found on Google,  :palm:  :scared: but they do give you an idea of the battery and crystal locations.

# ATmega328P based Arduinos, including the Uno and Nano use digital pins 0 and 1 to communicate serially with the host PC, so you can't simply use digital pins 0-7 (AVR port D) for the data bus.  The choice of pins above uses the six upper bits of port D and the lower two of port B, so you can split the data between them on write and combine them on read using direct AVR register access and C bitwise logic operators rather than having to loop through reading or writing each byte one bit at a time using the Arduino single pin access library functions digitalWrite() and digitalRead().  Similarly you'll be setting the address directly on A0-A5 by writing port C.

VE2JFQ:
thank you. i will try the arduino! right now, I have some ds1286! so two that works fine for the time clock, but I don't have the data that is missing for my options on my device. that will come one day! what i dont understand is why i have ds1286 so the internal battery is good (because with my dremel i removed epoxy (to be able to read 3 volts from the internal battery) but when i place it in my device, I have no real time clock ???and other ds1286 whose battery has died, i add an external battery to the ic, did not come back to life? thank you and have a good day Jacques

Ian.M:
Check the signal on the SQW pin.  It should be a 1024Hz squarewave, enabled whenever Vcc is present.  If its missing, the oscillator has failed.   If its one you Dremelled to expose the battery, its likely you damaged or disconnected the crystal, which is why its advisable to only dremel the minimum to expose the battery pins from the side while holding the module in a vice to damp vibration.

OTOH, if SQW is present but date/timekeeping isn't working, the timekeeping registers may have invalid contents that prevent the device its in from using the date/time.  You'll need to program an Arduino with a sketch that initializes it with the current time, then repeatedly prints the date/time from it, and also lets you 'nudge' each of the timekeeping registers to just before the next rollover for that register so you can check its incrementing the next higher unit register properly, to confirm if its operating normally.

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod