Reading from a Dallas DS1393
Mziskind
Posts: 9
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, [noparse][[/noparse]%1\1,BrstReg\5,%10\2]
SHIFTIN DTA, Clk, LSBPRE, [noparse][[/noparse]Seconds,Minutes,Hours,Date,Month,Day,Year]
LOW RTCCS
RETURN
Example from the DS1302:
ReadRTCBurst:
'Read all time-keeping registers in one burst
HIGH RTCCS
SHIFTOUT DTA, Clk, LSBFIRST, [noparse][[/noparse]%1\1,BrstReg\5,%10\2]
SHIFTIN DTA, Clk, LSBPRE, [noparse][[/noparse]Seconds,Minutes,Hours,Date,Month,Day,Year]
LOW RTCCS
RETURN
Comments
http://pdfserv.maxim-ic.com/en/ds/DS1390-DS1393.pdf
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
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