Shop OBEX P1 Docs P2 Docs Learn Events
Rs 232 — Parallax Forums

Rs 232

ArchiverArchiver Posts: 46,084
edited 2003-09-02 01:53 in General Discussion
[font=arial,helvetica]Where could I get info on sending serial data from a BS2 by serial to an
audio amp?

Thank You
David Martin[/font]

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2001-02-05 04:25
    How about the SEROUT commands, check the Basic Stamp Manual v 2.0?
    Download it at www.parallaxinc.com.


    > Where could I get info on sending serial data from a BS2 by serial
    to an
    > audio amp?
    >
    > Thank You
    > David Martin
  • ArchiverArchiver Posts: 46,084
    edited 2003-09-02 00:01
    I am trying to get my stamp (BS2SX) to send something to a microsoft
    access database to which I have added the xcomm control.

    Here is the code at the stamp

    N9600 CON $40F0
    thepacket var byte(5)
    startsending:
    thepacket(0) = "A"
    thepacket(1) = "t"
    SEROUT send_pin,N9600,[noparse][[/noparse]thepacket(0)]
    pause 1000
    SEROUT send_pin,N9600,[noparse][[/noparse]thepacket(1)]
    pause 1000

    goto startsending

    If I set send_pin to 16, it works like I think it should.

    If I set send_pin to a different pin (to which I have attached a serial
    port connector and wired according to the stamp manual section on
    serout) nothing happens. I only have a stamp pin connected to pin 2 of
    the db-9. Is it possible I also need to connect another pin for flow
    control?

    Thanks

    bob
  • ArchiverArchiver Posts: 46,084
    edited 2003-09-02 01:53
    If you are using a Max232 driver, or equivalent,
    then you use the '$4000' part of the N9600.
    SEROUT 16 ... DOES use a Max232 driver equiv.,
    which is on the BS2 module, so $40F0 is good
    for this.

    If you are NOT using a MAX232 driver, you
    should NOT use the '$4000', so your baud
    rate selector becomes $F0. This would apply
    to any data pin except '16'.

    However -- your PC will not be happy receiving
    just 0V and +5V -- it really wants the +/- 10V
    or so the Max232 gives you -- and so you do need
    to add a max232 circuit, and then use the $40F0
    baud circuit. This should fix your problem.

    OR, you can continue to use SEROUT 16 ..., if
    that works for you.

    --- In basicstamps@yahoogroups.com, "Bob Roan" <bob@t...> wrote:
    >
    > I am trying to get my stamp (BS2SX) to send something to a microsoft
    > access database to which I have added the xcomm control.
    >
    > Here is the code at the stamp
    >
    > N9600 CON $40F0
    > thepacket var byte(5)
    > startsending:
    > thepacket(0) = "A"
    > thepacket(1) = "t"
    > SEROUT send_pin,N9600,[noparse][[/noparse]thepacket(0)]
    > pause 1000
    > SEROUT send_pin,N9600,[noparse][[/noparse]thepacket(1)]
    > pause 1000
    >
    > goto startsending
    >
    > If I set send_pin to 16, it works like I think it should.
    >
    > If I set send_pin to a different pin (to which I have attached a
    serial
    > port connector and wired according to the stamp manual section on
    > serout) nothing happens. I only have a stamp pin connected to pin
    2 of
    > the db-9. Is it possible I also need to connect another pin for
    flow
    > control?
    >
    > Thanks
    >
    > bob
Sign In or Register to comment.