Shop OBEX P1 Docs P2 Docs Learn Events
Reading from a Dallas DS1393 — Parallax Forums

Reading from a Dallas DS1393

MziskindMziskind Posts: 9
edited 2005-08-17 01:55 in BASIC Stamp
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

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-08-16 19:21
    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
  • MziskindMziskind Posts: 9
    edited 2005-08-16 19:45
    I feel like an idiot today. I meant DS2404 EconoRAM Time Chip. Can you please check into it? I'm so sorry.
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-08-16 23:59
    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
  • MziskindMziskind Posts: 9
    edited 2005-08-17 01:55
    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!
Sign In or Register to comment.