Shop OBEX P1 Docs P2 Docs Learn Events
Serial com. probs w/ bs2sx and CMUCam — Parallax Forums

Serial com. probs w/ bs2sx and CMUCam

ArchiverArchiver Posts: 46,084
edited 2003-04-06 06:07 in General Discussion
hi, I finally got my stamps (bs1 and a bs2sx) working thanks to help
from you guys. Thanks a lot. Now I'm trying to integrate the bs2sx
with a cmucam (not modified by parallax). I'm having trouble sending
and receiving serial data between the bs2sx and the cmucam. This is
what I have done so far:
1)I couldn't find the jumpers so I just wired the appropriate pins on
the cmucam together to set up for 9600 baud rate ('jumper 2'
and 'jumper 3').
2) I've wired bs2sx pin 6 to the RX pin on the cmucam (within the
cmucam's 'ttl serial' pin group),
wired bs2sx pin 7 to the TX pin on the cmucam(within the
cmucam's 'ttl serial' pin group),
and wired the bs2sx GND pin to the TTL serial GND pin on the cmucam.
3)The cmucam and bs2sx are powered seperately (red led on cmucam is
on, and I'm able to download to the bs2sx).
4)I've tried the following code with the 'MAX232' chip in and with it
out of its cmucam socket (I read in the cmucam documentation that it
might be necessary to remove it for ttl serial communication).

In running my code below, the cmucam tracking (green) LED does not
turn on as I tell it to. If I do a serin 6,240,[noparse][[/noparse]wait (":")] after the
serout, the program stalls at this point (the : is never received). I
have tried the suggestion of someone on this mesage board to put the
serin in a seperate subroutine to 'get the timing right' and this has
not worked either. Could you give any suggestions? My code is below
(the 13 is ascii for cr):
When I run this code, the green cmucam LED doesn't turn on.

main:
debug "init"
serout 7,240,[noparse][[/noparse]"L1 1",13]
'goto GetInfo
debug "after"
end

GetInfo:
serin 6,240,[noparse][[/noparse]wait (":")]
return

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-04-06 06:07
    Sam,

    Is the CMUcam's demo-mode jumper still in place on the Level Shifted Serial
    Port?

    Is the CMUcam's Programming Switch in the OFF position?

    Is it possible that you have overlooked the fact that pins labeled P6 and P7
    (used by the SERIN & SEROUT) are not the 6th and 7th pin on the Stamp, but
    are the 11th and 12th pin?

    When you say you are "able to download to the BS2sx", you mean that you can
    program the Stamp from your PC, correct?

    HTH,
    Daniel


    Original Message
    From: "Sam" <hard-on@t...>
    To: <basicstamps@yahoogroups.com>
    Sent: Saturday, 05 April 2003 21:19
    Subject: [noparse][[/noparse]basicstamps] Serial com. probs w/ bs2sx and CMUCam


    > hi, I finally got my stamps (bs1 and a bs2sx) working thanks to help
    > from you guys. Thanks a lot. Now I'm trying to integrate the bs2sx
    > with a cmucam (not modified by parallax). I'm having trouble sending
    > and receiving serial data between the bs2sx and the cmucam. This is
    > what I have done so far:
    > 1)I couldn't find the jumpers so I just wired the appropriate pins on
    > the cmucam together to set up for 9600 baud rate ('jumper 2'
    > and 'jumper 3').
    > 2) I've wired bs2sx pin 6 to the RX pin on the cmucam (within the
    > cmucam's 'ttl serial' pin group),
    > wired bs2sx pin 7 to the TX pin on the cmucam(within the
    > cmucam's 'ttl serial' pin group),
    > and wired the bs2sx GND pin to the TTL serial GND pin on the cmucam.
    > 3)The cmucam and bs2sx are powered seperately (red led on cmucam is
    > on, and I'm able to download to the bs2sx).
    > 4)I've tried the following code with the 'MAX232' chip in and with it
    > out of its cmucam socket (I read in the cmucam documentation that it
    > might be necessary to remove it for ttl serial communication).
    >
    > In running my code below, the cmucam tracking (green) LED does not
    > turn on as I tell it to. If I do a serin 6,240,[noparse][[/noparse]wait (":")] after the
    > serout, the program stalls at this point (the : is never received). I
    > have tried the suggestion of someone on this mesage board to put the
    > serin in a seperate subroutine to 'get the timing right' and this has
    > not worked either. Could you give any suggestions? My code is below
    > (the 13 is ascii for cr):
    > When I run this code, the green cmucam LED doesn't turn on.
    >
    > main:
    > debug "init"
    > serout 7,240,[noparse][[/noparse]"L1 1",13]
    > 'goto GetInfo
    > debug "after"
    > end
    >
    > GetInfo:
    > serin 6,240,[noparse][[/noparse]wait (":")]
    > return
Sign In or Register to comment.