Shop OBEX P1 Docs P2 Docs Learn Events
Qbasic <=> Stamp2 communication ? (Qbasic primarily) — Parallax Forums

Qbasic <=> Stamp2 communication ? (Qbasic primarily)

CJCJ Posts: 470
edited 2005-12-17 04:56 in General Discussion
Does anyone know how to get bidirectional communication between a BS2 programming port and Qbasic working?
I have been able to get the stamp to send data to the PC, want to be able to control the flow so that data is not lost
basically like this

PC sends the read command "00"
stamp replies with data

just that I have been unable to change direction without resetting the stamp via DTR (don't want to hack a cable)

1. what method of opening the port is suitable for this?

2. what commands are used to read from / write to the port?

I tried opening the port in random access mode, opens ok but get a device timeout on the "print #" line (the method I found
online to talk to a modem)

thanks in advance smilewinkgrin.gif

edit: been using the standard debug settings for the port 9600 8N1

Post Edited (CJ) : 12/17/2005 4:36:39 AM GMT

Comments

  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2005-12-17 04:36
    Cj,

    It's been a long time since I used Qbasic to communicate with a Stamp, but I will take you back a few years
    when I was writing Qbasic to Stamp code left and right.

    As far as the DTR line, there is a software solution (provided in link below) as well as a hardware solution. The
    hardware solution uses two caps in a specific configuration. ( ASCII below )

             .1uF
    ATN >--o--||----< DTR ( DB9 Pin 4 )
           |
           o--||----< VSS ( DB9 Pin 5 )
             .1uF
    
    




    webpages.charter.net/schwabelove/BasicStamp/Communication/Index.html

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • CJCJ Posts: 470
    edited 2005-12-17 04:56
    that just about covers all the bases, thanks
Sign In or Register to comment.