Shop OBEX P1 Docs P2 Docs Learn Events
RTS Line Signall Resetting Basic Stamp BS2 when Using Matlab — Parallax Forums

RTS Line Signall Resetting Basic Stamp BS2 when Using Matlab

bechbech Posts: 2
edited 2009-05-18 13:56 in BASIC Stamp
Here is the situation...
I have a BS2p24 in the Super Carrier Board. The PC I am using has three built in serial ports (and is running WinXP). I have the Super Carrier Board connected to Com2. I use the Basic Stamp editor to program the BS2p24 just fine. My firmware is programmed such that the BS2 will react when I send it certain serial commands (say switch a relay when I send the "#" command). I use Matlab to send these commands. I also use Matlab to talk to another serial device at the same time, which is on Com1. For whatever reason, when I open a connection to Com1 in Matlab, it sends out two short pulses on the Com2 RTS line. The BS2p24 detects these pulses and resets, which is a problem for me. In terms of the Basic Stamp, should it be resetting when these pulses come on the RTS line? If so, is there a way I can stop it from doing that? (I need to figure out why Matlab is sending the pulses out on Com2 in the first place when I only use Com1, but that is for a different forum).
Thanks.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-05-15 17:30
    The behavior of the Stamp is correct, except that the signal line involved is DTR, not RTS. DTR is used by the Stamp and Stamp Editor to force the Stamp to reset so a program can be downloaded or so the Stamp can identify itself. Many programs turn on DTR when they open a serial port. It may be possible to disable this in Matlab. The alternative would be to disconnect the DTR lead in the serial cable unless you're trying to download a new Stamp program. You could cut the trace on your Super Carrier Board and install a jumper or switch to reconnect DTR when you need it.
  • bechbech Posts: 2
    edited 2009-05-18 13:56
    Mike,
    You are right, it is the DTR line (Pin 4), and it is also on RTS line (Pin 7). I must have stopped measuring signals when I saw this strange signal on Pin 7. Thanks for the suggested options. I am working with Matlab to figure out why a signal is being sent out at all on Com2, when I only open a connection to Com1.
Sign In or Register to comment.