PDA

View Full Version : Reading from a Dallas DS1393



Mziskind
08-17-2005, 01:50 AM
The Dallas DS1393 has 32 byte pages. The value I want is contained in 5 bytes somewhere in the 32 byte page. Dallas's doc doesn't say if the data can be read in single bytes or Burst. I fear I will have to get the full 32 bytes.·Can I use the SHIFTIN to read less than a full page? The CPU is a BS2, which doesn't have 32 bytes available. Thank you.

Example from the DS1302:
ReadRTCBurst:
'Read all time-keeping registers in one burst
HIGH RTCCS
SHIFTOUT DTA, Clk, LSBFIRST, [%1\1,BrstReg\5,%10\2]
SHIFTIN DTA, Clk, LSBPRE, [Seconds,Minutes,Hours,Date,Month,Day,Year]
LOW RTCCS
RETURN

Jon Williams
08-17-2005, 03:21 AM
The docs I found online suggest that single-byte writes and reads are available -- see Figs 3, 4, 11, and 12.

http://pdfserv.maxim-ic.com/en/ds/DS1390-DS1393.pdf

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax

Mziskind
08-17-2005, 03:45 AM
I feel like an idiot today. I meant DS2404 EconoRAM Time Chip. Can you please check into it? I'm so sorry.

Jon Williams
08-17-2005, 07:59 AM
Sure, but you owe me a cookie!

In my opinion, the DS2404 is not a good fit for BASIC Stamp projects.· The reason is that it does not keep track of seconds, minutes, hours, etc. like other RTCs do.· It keeps track of seconds,·including fractions (1/256).· Decoding the 32-bit value from the device is possible (see Dr. Tracy Allen's web site -- www. emesystems.com -- for ideas and code), but a very big hassle.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax

Mziskind
08-17-2005, 09:55 AM
Jon, Thank you. I wasn't after real time. I need a counter to time events relative to each other. I do appreciate it. And I'm very impressed with your companies help for new customers!