Shop OBEX P1 Docs P2 Docs Learn Events
Ds2406/2407 — Parallax Forums

Ds2406/2407

ArchiverArchiver Posts: 46,084
edited 2002-06-03 23:39 in General Discussion
Greetings!

Is there anyone else who has any experience using these 1-wire switches
together with a BS2p?

I can read the ROM and matchROM, but no matter what I do, I can't seem to
get it to switch...

:-)
Trygve

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2002-06-03 23:39
    Trygve-

    The following works for me to toggle PIO-B:

    sram VAR BYTE
    crc VAR BYTE
    i VAR BYTE

    again:
    OWOUT 0,1,[noparse][[/noparse]$CC,$AA,$07,$00] ' cmd: read sram
    OWIN 0,0,[noparse][[/noparse]sram]
    DEBUG CR, HEX2 sram
    OWOUT 0,1,[noparse][[/noparse]$CC,$55,$07,$00,sram ^ $40]
    OWIN 0,0,[noparse][[/noparse]crc]
    DEBUG CR,HEX2 crc
    OWOUT 0,0,[noparse][[/noparse]$FF] ' serves as programming "pulse"
    OWIN 0,0,[noparse][[/noparse]i] ' no apparent significance
    PAUSE 5000
    GOTO again


    The above code was written per the algorithm depicted in the
    datasheet's Figure 7, "Memory Function Flow Chart".


    Regards,

    Steve


    Trygve Henriksen wrote:

    > Greetings!
    >
    > Is there anyone else who has any experience using these 1-wire
    > switches together with a BS2p?
    >
    > I can read the ROM and matchROM, but no matter what I do, I can't
    > seem to get it to switch...
Sign In or Register to comment.