Shop OBEX P1 Docs P2 Docs Learn Events
Baudrate Setting in Programming for Serial Out — Parallax Forums

Baudrate Setting in Programming for Serial Out

Spidy69Spidy69 Posts: 4
edited 2004-10-14 02:56 in BASIC Stamp
I had a Basic Stamp processor BS2P40 and 5 unit of AImotor(Servo Motor). The AImotor is interface in a TTL via a Translator circuit built from max232. The baudrate for AImotor can only transmitted between range from 9600bps to 11.5kbps. I had tried command like Serout, baud, [noparse][[/noparse]$00FF] and Pulsout Servo, $00FF as perference to the AImotor's protocol as it is communicating in a 8bit serial in/out.

I would like to check if the baudrate I input to my program as in "Baud CON 240" is correct?

The hardware wiring from my Basic Demo board to the translator(Max232) circuit are:-
(a) A pin P0 from Demo Board of BS2P40 as an output serial data to my Max232 pin 13 (Tx of PC or in this case Tx of BS2P40).
(b) A system common ground from Vss of Demo Board of BS2P40 to my Max232 pin 15 (gnd).

Please advice, thanks.

Regards,
Mark

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-10-14 02:07
    Let me suggest you use the programming template I've attached -- it's got a conditional compilation section that will define baud parameters for any BS2-family Stamp.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • Spidy69Spidy69 Posts: 4
    edited 2004-10-14 02:24
    I had tried as per your advice and compile with not problem but the motor does not seem to rotate clockwise and anti-clock as from the program instruction. Please view and commend. Also, is my hardware wiring between the Basic stamp to Max232 ok? As in pin P0 to Max232's pin 13 and VSS to Max232's pin 15 gnd?

    Attached is my basic program.
    2K
    Try01 2.2K
  • Spidy69Spidy69 Posts: 4
    edited 2004-10-14 02:52
    Kindly view my attached interface layout. Is it ok? Thanks.
  • Spidy69Spidy69 Posts: 4
    edited 2004-10-14 02:56
    Sorry, pls view again.
    811 x 539 - 35K
Sign In or Register to comment.