Driving a DS1393 from a PIC or AVR


Has anyone tried talking to a DS1393 or similar 3-wire RTC from either a PIC or AVR (or similar) - these RTCs are not SPI - they have a bi-directional I/O pin.



Reply to
Mike Deblis
Loading thread data ...

Isn't it really just I2C protocol with a chip select as the "third" wire?

Reply to
Anthony Fremont

I'd be very 'wary' about chosing this chip, since it is no longer listed by Dallas/Maxim, with the data sheet 'links', going to a blank page...

Best Wishes

Reply to
Roger Hamlett


Hmm.... I just went to

formatting link
and typed in ds1393 in the part number search field, clicked the "PART NO. SEARCH" button and came up with this page:
formatting link

The datasheet link worked fine for me as well. It's one datasheet for the DS1390, DS1391, DS1392, and DS1393. Where did you look?

Reply to
Anthony Fremont

I'm using a DS1302 for a project which also has only 3 wires. It's really simple and just like SPI, except that it's half duplex.

You can easily bit bang it. Switch the data in/output to output, make /CS low, output 8 databits+clocks, then change the in/output to input, and issue the neccessary clocks and sample the input. 20-25 lines of C code.

something like:

(assuming AVR, port B... 0=cs 1=dat 2=clk)

#define CS 1 #define DAT 2 #define CLK 4 . .. . DDRB|=DAT; // switch the data line to output PORTB&=~CS; // select the chip for (i=0;i

Reply to

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.