Shop OBEX P1 Docs P2 Docs Learn Events
Dallas i-button — Parallax Forums

Dallas i-button

ArchiverArchiver Posts: 46,084
edited 2002-08-03 19:52 in General Discussion
I am using the DS1986 EPROM i-button which I am trying to read data
from. To read memory I send it a $F0 which the instructions call for
then it requires a 2 byte memory address to start reading from. I
have been using the commands below.

OWOUT 15,1,[noparse][[/noparse]$CC,$F0,$00,$00]

FOR I = 0 TO 100

OWIN 15,0[noparse][[/noparse]VARIABLE]
DEBUG VARIABLE
NEXT

Most of the data that I get out is ok, but there is some garbled
text. That is one of the problems. The other problem is the 2 byte
address after the $F0 doesnt seem to affect where it starts reading
from. I change it from $00 $00 to anything else and it still starts
reading from the beginneing. Has anybody used this i-button and know
what is going on here, or what I am doing wrong?

Are there certain characters that DEBUG can't handle? Everything that
I put into the i-button was text that I generated using MS notepad.

Thanks
Dave

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2002-08-02 17:52
    DEBUG assumes anything you're sending to the window is an ASCII character.
    Anything that is less than 32 (space) could give you trouble. Some codes
    below 32 are used as control characters and use the bytes that follow as data.

    You might want to check the character value for being at least 32 before
    sending it to the DEBUG window.

    -- Jon Williams
    -- Parallax

    In a message dated 8/2/02 11:13:42 AM Central Daylight Time,
    dwright3@a... writes:


    > Are there certain characters that DEBUG can't handle? Everything that
    >




    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2002-08-03 19:52
    --- In basicstamps@y..., "encinoman1228" <dwright3@a...> wrote:
    > I am using the DS1986 EPROM i-button which I am trying to read data
    > from. To read memory I send it a $F0 which the instructions call
    for
    > then it requires a 2 byte memory address to start reading from. I
    > have been using the commands below.
    >
    > OWOUT 15,1,[noparse][[/noparse]$CC,$F0,$00,$00]
    >
    > FOR I = 0 TO 100
    >
    > OWIN 15,0[noparse][[/noparse]VARIABLE]
    > DEBUG VARIABLE
    > NEXT
    >
    > Most of the data that I get out is ok, but there is some garbled
    > text. That is one of the problems. The other problem is the 2 byte
    > address after the $F0 doesnt seem to affect where it starts reading
    > from. I change it from $00 $00 to anything else and it still starts
    > reading from the beginneing. Has anybody used this i-button and
    know
    > what is going on here, or what I am doing wrong?
    >
    > Are there certain characters that DEBUG can't handle? Everything
    that
    > I put into the i-button was text that I generated using MS notepad.
    >
    > Thanks
    > Dave


    I fingered it out. This i-button is composed of 256 pages of 256
    bits. Every page uses 4 bytes for CRC data of which I was trying to
    print using DEBUG. This is where I was getting my garble. So the
    world is as it should be and everything makes sense...........I think.

    Dave
Sign In or Register to comment.