Shop OBEX P1 Docs P2 Docs Learn Events
Serial to Computer — Parallax Forums

Serial to Computer

Dan PreviteDan Previte Posts: 3
edited 2004-10-25 22:10 in BASIC Stamp
I have a Basic Stamp 2 on a Homework Board connected to my PC with the serial port. I have been trying to get the stamp to send a string to the pc every couple of seconds to emulate call logs from a phone system. So far I'm lost.

I can't find much on the SEROUT command, and I am not sure how to test to see if it is sending the string at all.

What I have so far looks like this:
'{$STAMP  BS2}        'STAMP directive (specifies a BS2)
'{$PBASIC 2.5}


DO
  N9600 CON $4054 ' 9600 baud, inverted.
  SEROUT 0,N9600,[noparse][[/noparse]"Hello!"]
  PAUSE 500
  DEBUG "Looping", CR
LOOP




It's just code I saw on a website. No idea what most of it means.

So basically, what do I do to send a string to the PC, and how to I watch it being sent on the PC?

Thanks

Comments

  • K de JongK de Jong Posts: 154
    edited 2004-10-25 21:00
    Try SEROUT 16,N9600,[noparse][[/noparse]"Hello!"]

    When adressed to 'pin' 16 SEROUT will go to your serial programming cable. (see the help files for more info on this)

    Succes,

    Klaus
  • Dan PreviteDan Previte Posts: 3
    edited 2004-10-25 21:07
    Is there a program somewhere I can use to watch it being received by the PC other than the BASIC Stamp Editor?
  • NewzedNewzed Posts: 2,503
    edited 2004-10-25 21:08
    Yes, you can use Hyperterminal.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Sid Weaver
    Try the Stamp Tester

    http://hometown.aol.com/newzed/index.html
    ·
  • rounderrounder Posts: 18
    edited 2004-10-25 21:27
    If you can get your hands on a copy of visual basic the folks over at rentron have some great tutorials on getting started with VB and The stamp. They have one specifically for recieving data from the stamp, it could easily be applied to your application. Give it a try, if you run into any difficulties post here and I will be glad to help. I spent the last year interfacing my stamp with custom VB apps. Good luck!

    http://www.rentron.com/VisualBasic.htm

    Hope it helps!
    ·
  • Dan PreviteDan Previte Posts: 3
    edited 2004-10-25 21:48
    Cool, thanks.
  • rounderrounder Posts: 18
    edited 2004-10-25 22:10
    Dan,
    You should be able to apply the tuts over at rentron to your project using VB.Net, again if you have any questions I will gladly try to help!
Sign In or Register to comment.