Help w/ SerialPort I/O between MCU/Computer - interface issues.

Discussion in 'Embedded Systems and Microcontrollers' started by cds333, Dec 14, 2007.

  1. cds333

    Thread Starter Member

    Nov 5, 2007
    16
    0
    Hey Everbody,

    Was hoping someone could help-

    I have a BS2 Basic Stamp connected via RS-232 DB9 serial cable to my computer. I am using an app written in VS.NET 2005 to interface with my stamp. The relevant commands are the SERIN / SEROUT on the BS2, and the System.IO.Ports.SerialPort class in VS.

    The problem is: the only way I can get it to work is when I set the baud rate to 1000 on both sides. I have tried many other values, but cannot get any other to work.

    Can anyone offer any advice?

    Thanks in advance.
     
  2. eeboy

    Active Member

    Sep 27, 2007
    90
    1
    Try using some of the more "standard" baud rates...

    1200,2400,9600,19200

    The BS2 is going to have more accurate timing on some than others but I wouldn't expect the error to be too great. Double check the setting on the BS2 (timer value). You may have just gotten lucky at 1000bps.

    Make sure the remainder of the setting match (8 data bits, 1 stop bit, no-parity). Also, many microcontrollers have an option for inverting the signal. See if you have this capability with the BS2. You will want your idle state to be set (high).
     
  3. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    Can you provide a sketch of your interconnect cable?

    Have you checked the quality of the ground connection between the PC and the BS2 board?

    How long is the cable between the BS2 board and the PC?

    hgmjr
     
Loading...