Shop OBEX P1 Docs P2 Docs Learn Events
BS2sx Serial Problems — Parallax Forums

BS2sx Serial Problems

Steve123Steve123 Posts: 9
edited 2005-05-04 13:37 in BASIC Stamp
My data correctly shows up in a debug window, but I cannot read serial data in hyperterminal.
The settings are
9600
8 bits
1 stop bit
no parity
no flow control

Are there any known issues or reasons why this would happen? I am using the programming port to communicate with the stamp. I'm attempting to read this data into a program I'm writing and it is not working. It's esspecially discouraging because·hyperterminal doesn't work either.

Any help is welcomed.

Comments

  • steve_bsteve_b Posts: 1,563
    edited 2005-05-02 01:48
    post your code!
    Are you trying to debug to hyperterm?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·

    Steve
    http://ca.geocities.com/steve.brady@rogers.com/index.html
    "Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
  • Steve123Steve123 Posts: 9
    edited 2005-05-02 02:46
    Stamp Code:
    '{$STAMP BS2sx}
    '{$PBASIC 2.5}
    '{$PORT COM1}

    baudmode CON 240

    start:
    SEROUT 16,baudmode,[noparse][[/noparse]"got_it",CR]
    GOTO start
  • kb2hapkb2hap Posts: 218
    edited 2005-05-02 02:48
    you would use debug to see it in the debug window and you would use serout to see it in hyperterm. should work then.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    DTQ
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-05-02 03:12
    Hmmm... I'm having the same problem you are (I'm using a BS2px). I can see the data fine in a manually-opened Debug terminal window, but Hyperterminal is not working. I've used HT before without issues, so I don't know what's happening.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
  • cyberbiotacyberbiota Posts: 79
    edited 2005-05-02 03:39
    Jon, et al.-

    Does the debug window steal the serial port from Hyperterminal? Can you get HT to work if you close the debug window?

    peter

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Peter C. Charles

    Director, Research and Technology
    CyberBiota, Incorporated
    Peter.charles@cyberbiota.com
    http://www.cyberbiota.com
  • BeanBean Posts: 8,129
    edited 2005-05-02 10:57
    I haven't had much luck using HT with my video modules either. I acually looked at the serial waveform with the oscope and it wasn't right. Then I send the serial data from a stupid little DOS program and it worked fine.

    Anyone know of a simple free windows terminal program ?

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "SX-Video Display Module" Available Now.

    www.sxvm.com

    "I thought I was wrong once...But I was mistaken [noparse];)[/noparse]"
    ·
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-05-02 11:33
    The Debug Terminal window was closed. HT used to be much more reliable than it is now.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2005-05-02 12:14
    Get the private edition here

    http://www.hilgraeve.com/htpe/download.html

    regards peter
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-05-02 12:24
    I just tried that and the results were the same as with the version installed with Windows. This really is a mystery, because I have had it working in the past.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
  • Steve123Steve123 Posts: 9
    edited 2005-05-03 14:37
    Stamp manual page· 404...


    All BS2 models have a line driver on its SOUT pin (Tpin = 16). The SOUT
    pin goes to a PC’s serial data-in pin on the DB9 connector built into BASIC
    Stamp development boards. The connector is wired to allow both
    programming and run-time serial communication (unless you are using
    the BASIC Stamp 2 Carrier Board (#27120) which is only designed for
    programming)


    I am using the carrier board. How does this affect things?
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-05-03 14:51
    If there is a direct connection between the DTR line and the Stamp's ATN pin, the Stamp can be held in reset by the PC. Most of our boards have caps inline ahead of the ATN line to prevent this.· The problem with Hyperterminal is that there is no way to manipulate the DTR line such that it doesn't put the BASIC Stamp into reset.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA


    Post Edited (Jon Williams) : 5/3/2005 3:02:00 PM GMT
  • Steve123Steve123 Posts: 9
    edited 2005-05-03 15:11
    I have an old board which doesn't have the capacitors as pictured in http://www.parallax.com/images/prod_jpg/27120.jpg
    could this be my problem?
  • allanlane5allanlane5 Posts: 3,815
    edited 2005-05-03 16:02
    Yes. With Hyperterminal you MUST have the two capacitors, or Hyperterminal WILL hold your BS2 in reset.
  • Steve123Steve123 Posts: 9
    edited 2005-05-04 00:40
    That was the problem...I soldered on the two capacitors as shown in the manual and it works fine now.

    Thank you all.
  • Tom WalkerTom Walker Posts: 509
    edited 2005-05-04 13:37
    Jon,
    Did Steve123's soldering on of the two capacitors take care of your problem, too? <g>

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Truly Understand the Fundamentals and the Path will be so much easier...
Sign In or Register to comment.