Shop OBEX P1 Docs P2 Docs Learn Events
bs2 p40 and cmucam — Parallax Forums

bs2 p40 and cmucam

ArchiverArchiver Posts: 46,084
edited 2004-05-11 17:50 in General Discussion
Hello,

I have another problem again:

I changed the Stamp from BS2 to BS2p40 and used following program to
test communication between the stam and the CmuCam:



'{$STAMP BS2p}
'{$PBASIC 2.5}

PAUSE 1000

SEROUT 10, 240, [noparse][[/noparse]"RS", CR]
SERIN 9, 240, [noparse][[/noparse]WAIT (":")]

Main:

SEROUT 10, 240, [noparse][[/noparse]"L1 1",CR]
SERIN 9, 240, [noparse][[/noparse]WAIT (":")]
DEBUG "LED on ACK: received OK",CR

PAUSE 500

SEROUT 10, 240, [noparse][[/noparse]"L1 2",CR]
SERIN 9, 240, [noparse][[/noparse]WAIT (":")]
DEBUG "LED off ACK: received OK",CR

PAUSE 500

GOTO Main

Changing 84 (baudmode value for BS2) to 240 didnt give the solution.
In addition to that, I put a DEBUG " " between each SERIN and SEROUT
and program worked ok.

Can someone explain me what happens when I put DEBUG? Is it only
about delay time that the command DEBUG causes or is there anything
else more subtle?

Thank you very much

Murat

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2004-05-11 17:50
    There is a subtle bug in some modern PC's that
    keep them from working with the stamp IDE
    unless you have at least one debug statement.

    --- In basicstamps@yahoogroups.com, "m_a_y_y_i_l_d_i_z"
    <mayyildiz@m...> wrote:
    > Hello,
    >
    > I have another problem again:
    >
    > I changed the Stamp from BS2 to BS2p40 and used following program
    to
    > test communication between the stam and the CmuCam:
    >
    >
    >
    > '{$STAMP BS2p}
    > '{$PBASIC 2.5}
    >
    > PAUSE 1000
    >
    > SEROUT 10, 240, [noparse][[/noparse]"RS", CR]
    > SERIN 9, 240, [noparse][[/noparse]WAIT (":")]
    >
    > Main:
    >
    > SEROUT 10, 240, [noparse][[/noparse]"L1 1",CR]
    > SERIN 9, 240, [noparse][[/noparse]WAIT (":")]
    > DEBUG "LED on ACK: received OK",CR
    >
    > PAUSE 500
    >
    > SEROUT 10, 240, [noparse][[/noparse]"L1 2",CR]
    > SERIN 9, 240, [noparse][[/noparse]WAIT (":")]
    > DEBUG "LED off ACK: received OK",CR
    >
    > PAUSE 500
    >
    > GOTO Main
    >
    > Changing 84 (baudmode value for BS2) to 240 didnt give the
    solution.
    > In addition to that, I put a DEBUG " " between each SERIN and
    SEROUT
    > and program worked ok.
    >
    > Can someone explain me what happens when I put DEBUG? Is it only
    > about delay time that the command DEBUG causes or is there anything
    > else more subtle?
    >
    > Thank you very much
    >
    > Murat
Sign In or Register to comment.