Shop OBEX P1 Docs P2 Docs Learn Events
Need Help with EEPROM on DS1615 — Parallax Forums

Need Help with EEPROM on DS1615

ArchiverArchiver Posts: 46,084
edited 2003-10-02 15:56 in General Discussion
I'm racking my brain and not having much luck with this DS1615. I have the
basics down, I can read the Registers and retrieve time, date, temp etc. But I
can't get any info from the EEPROM!

The Data sheet has the Temperature log in 1000h to 17FFh and 64 pages at 128 to
191. I'm confused on how to read this.

My current thinking is.....

do a Shiftout to read 1000
then loop 2048 times with a Shiftin to read all the memory addresses in bytes.

or
Loop 2048 times with
Shiftout and a variable for the requested address
and Shiftin the byte.

But the Data sheet has me believe I need to read this Page thing. Later in the
Data sheet they mention a Read Page function 33h. Maybe I need to go that
route?

For x = 128 to 191
Shiftout the X location
Shiftin the data to a temp var

Or maybe

Shiftout the $33
For x = 1 to 64
Shiftin the data to a temp var

I'm currently using a synchronous connection to the chip so I'd assume that code
to read synchronous EEPROM would work with some modifications. But Maybe I'm
assuming to much.

As you can tell I'm very confused....Can anyone help me out?! Even some general
synchronous EEPROM info would be helpful!

Thanks,
Tim

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-10-01 23:47
    Did you check out this page?
    http://www.high-techgarage.com/tutorial/ds1615_page3.php
    Dave

    Original Message
    From: Tim Hart [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=BM0HI8cIsAt9xdJYo0-pQwB0T8-4UGLsSUGKYDTegPouOw9vpTBRvt4qlJToZPpaTj9bA20pWPo94w]tim.hart@h...[/url
    Sent: Wednesday, October 01, 2003 9:28 AM
    To: basicstamps@yahoogroups.com
    Subject: [noparse][[/noparse]basicstamps] Need Help with EEPROM on DS1615

    I'm racking my brain and not having much luck with this DS1615. I have
    the basics down, I can read the Registers and retrieve time, date, temp
    etc. But I can't get any info from the EEPROM!

    The Data sheet has the Temperature log in 1000h to 17FFh and 64 pages at
    128 to 191. I'm confused on how to read this.

    My current thinking is.....

    do a Shiftout to read 1000
    then loop 2048 times with a Shiftin to read all the memory addresses in
    bytes.

    or
    Loop 2048 times with
    Shiftout and a variable for the requested address
    and Shiftin the byte.

    But the Data sheet has me believe I need to read this Page thing. Later
    in the Data sheet they mention a Read Page function 33h. Maybe I need
    to go that route?

    For x = 128 to 191
    Shiftout the X location
    Shiftin the data to a temp var

    Or maybe

    Shiftout the $33
    For x = 1 to 64
    Shiftin the data to a temp var

    I'm currently using a synchronous connection to the chip so I'd assume
    that code to read synchronous EEPROM would work with some modifications.
    But Maybe I'm assuming to much.

    As you can tell I'm very confused....Can anyone help me out?! Even some
    general synchronous EEPROM info would be helpful!

    Thanks,
    Tim


    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the Subject
    and Body of the message will be ignored.


    Your use of Yahoo! Groups is subject to
    http://docs.yahoo.com/info/terms/
  • ArchiverArchiver Posts: 46,084
    edited 2003-10-02 03:31
    Yes....their code is the base for my project. It has a few errors but overall
    it's stable code. But it's missing the part where you read the long term
    memory.

    Currently I know the Addresses I need to start reading is 1000h but my code is
    not working for me...

    low sclk
    high rst
    shiftout dout, sclk, lsbfirst, [noparse][[/noparse]ReadPage, $1000]
    for MemCounter = 0 to 8
    shiftin dout, sclk, lsbpre, [noparse][[/noparse]DSdata]
    Debug "DSdata :", Bin8 DSdata,cr
    gosub ConvertTemp:
    next
    low rst

    Right now I'm just attempting to get the first 8 recordings. But all I get is
    DSdata :00000000 and that's not so great...

    Anyone have any ideas?

    Thanks,
    Tim


    10/01/03 17:48 PM >>>
    Did you check out this page?
    http://www.high-techgarage.com/tutorial/ds1615_page3.php
    Dave

    Original Message
    From: Tim Hart [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=xPyA03qR4xicMKkJHuK_t9beeOalrtBT_U9X7DF61D2pKvdo9b2VBCOd4_KWq8LQU9-pwaebIRXX8XfGKHbd]tim.hart@h...[/url
    Sent: Wednesday, October 01, 2003 9:28 AM
    To: basicstamps@yahoogroups.com
    Subject: [noparse][[/noparse]basicstamps] Need Help with EEPROM on DS1615

    I'm racking my brain and not having much luck with this DS1615. I have
    the basics down, I can read the Registers and retrieve time, date, temp
    etc. But I can't get any info from the EEPROM!

    The Data sheet has the Temperature log in 1000h to 17FFh and 64 pages at
    128 to 191. I'm confused on how to read this.

    My current thinking is.....

    do a Shiftout to read 1000
    then loop 2048 times with a Shiftin to read all the memory addresses in
    bytes.

    or
    Loop 2048 times with
    Shiftout and a variable for the requested address
    and Shiftin the byte.

    But the Data sheet has me believe I need to read this Page thing. Later
    in the Data sheet they mention a Read Page function 33h. Maybe I need
    to go that route?

    For x = 128 to 191
    Shiftout the X location
    Shiftn the data to a temp var

    Or maybe

    Shiftout the $33
    For x = 1 to 64
    Shiftin the data to a temp var

    I'm currently using a synchronous connection to the chip so I'd assume
    that code to read synchronous EEPROM would work with some modifications.
    But Maybe I'm assuming to much.

    As you can tell I'm very confused....Can anyone help me out?! Even some
    general synchronous EEPROM info would be helpful!

    Thanks,
    Tim


    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the Subject
    and Body of the message will be ignored.


    Your use of Yahoo! Groups is subject to
    http://docs.yahoo.com/info/terms/



    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the Subject and Body
    of the message will be ignored.


    Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
  • ArchiverArchiver Posts: 46,084
    edited 2003-10-02 04:43
    At 10:31 PM 10/1/03 -0400, Tim Hart wrote:
    >Yes....their code is the base for my project. It has a few errors but
    >overall it's stable code. But it's missing the part where you read the
    >long term memory.
    >
    >Currently I know the Addresses I need to start reading is 1000h but my
    >code is not working for me...
    >
    > low sclk
    > high rst
    > shiftout dout, sclk, lsbfirst, [noparse][[/noparse]ReadPage, $1000]
    > for MemCounter = 0 to 8
    > shiftin dout, sclk, lsbpre, [noparse][[/noparse]DSdata]
    > Debug "DSdata :", Bin8 DSdata,cr
    > gosub ConvertTemp:
    > next
    > low rst
    >
    >Right now I'm just attempting to get the first 8 recordings. But all I
    >get is DSdata :00000000 and that's not so great...
    >
    >Anyone have any ideas?
    >
    >Thanks,
    >Tim

    Tim -

    It's not apparent from your code snippet whether you had a datalog mission
    active prior to retrieving the data. Did you ? If not, the zeros would seem
    reasonable as default memory values.

    Bruce Bates
  • ArchiverArchiver Posts: 46,084
    edited 2003-10-02 15:56
    Good point....I did have it on a Mission. But kept getting zeros.... Later
    after looking at some other PIC Code I noticed some had 3 shift out commands.
    One to tell the chip what they wanted to do....and two more bytes to specify the
    address. My code had only two! So I modified the Shiftout command to sent 3
    bytes!

    shiftout dout, sclk, lsbfirst, [noparse][[/noparse]ReadPage, $10, $00]

    And then the data log magically showed up! Turns out the Ds1615 requires 16 bit
    addressing....and it seems quite logical in hind sight...if they only had 8 bit
    addressing the chip could only store 256 unique addresses....but the 2048 would
    require more addresses then that! 16 bit!

    I have it working nicely now and after I give it some polishing touches it will
    be done. If code can ever be done [noparse]:)[/noparse] I've never heard Microsoft say Windows
    was "done"....[noparse]:)[/noparse]

    Thanks for the tip,
    Tim

    >>> bvbates@u... 10/01/03 10:43PM >>>
    At 10:31 PM 10/1/03 -0400, Tim Hart wrote:
    >Yes....their code is the base for my project. It has a few errors but
    >overall it's stable code. But it's missing the part where you read the
    >long term memory.
    >
    >Currently I know the Addresses I need to start reading is 1000h but my
    >code is not working for me...
    >
    > low sclk
    > high rst
    > shiftout dout, sclk, lsbfirst, [noparse][[/noparse]ReadPage, $1000]
    > for MemCounter = 0 to 8
    > shiftin dout, sclk, lsbpre, [noparse][[/noparse]DSdata]
    > Debug "DSdata :", Bin8 DSdata,cr
    > gosub ConvertTemp:
    > next
    > low rst
    >
    >Right now I'm just attempting to get the first 8 recordings. But all I
    >get is DSdata :00000000 and that's not so great...
    >
    >Anyone have any ideas?
    >
    >Thanks,
    >Tim

    Tim -

    It's not apparent from your code snippet whether you had a datalog mission
    active prior to retrieving the data. Did you ? If not, the zeros would seem
    reasonable as default memory values.

    Bruce Bates
Sign In or Register to comment.