Shop OBEX P1 Docs P2 Docs Learn Events
Serial Cable help to test reading stamp SEROUT — Parallax Forums

Serial Cable help to test reading stamp SEROUT

RonDonRonDon Posts: 2
edited 2011-01-09 15:23 in BASIC Stamp
Greetings,

I am new to working with the BASIC Stamp II. I am using an old BSII with a carrier (2 - I think) board. I have no problems sending BS2 code to the stamp using the carrier board through a standard DB9 serial extension cable. I have been able to make LEDs blink as I learn about the stamp.

What I would like to do is to send output from the stamp to my computer's serial port. I have a simple BS2 program that sends stuff to PIN 16 using the SEROUT command. Also, I have a VB .net app (VS 2010) that allows me to select a com port and read any input from it.

Here is the question:

HOW DO I WIRE UP A SERIAL CABLE (DB9) TO THE STAMP WITHOUT USING THE CARRIER BOARD? ...like a real-world application if I were to measure temperature and log it every hour on my PC for example.

By placing the stamp on a breadboard with the program already downloaded to it:

- Do I supply power (+) to the chip using PIN 24 - VIN?
- Which PIN gets the (-) VSS??
- Can I use a regulated 12v power supply?

I tried wiring up a DB9 connector as follows:

DB1 - not used
DB2 -> SOUT
DB3 -> SIN
DB4 -> Not sure if I need to use this...?
DB 5 -> VSS
DB6 tied to DB7 with a jumper
DB8 - not used
DB9 - not used

Would this work?

Thanks in advance for any help,

Ron
01/03/2011

Comments

  • RonDonRonDon Posts: 2
    edited 2011-01-05 11:13
    Hi PJ,

    Very nice development environment that you constructed! I may try something like that in the future.

    From the pictures I still can not figure out the proper DB9 pins to stamp pin connections. --sorry!

    I think I figured out how to power the stamp properly without using the Carrier board?

    So, if I download a program to my stamp (using the carrier board) and then remove the stamp from the carrier board and put it on my breadboard and power up the stamp; I should theorectically be able to read SEROUT commands from the stamp to my VB program if I get a cable properly wired?

    Lets assume that I am going to use PIN 16 in the SEROUT command... If so, how would I wire into a DB9 connector mounted to my breadboard? The other end would of course go to the PC (straight through cable).

    DB1 - not used
    DB2 -> SOUT
    DB3 -> SIN (or Wire to PIN 16?)
    DB4 -> Wire to PIN 16?
    DB 5 -> VSS
    DB6 tied to DB7 with a jumper
    DB8 - not used
    DB9 - not used

    Thank you again for any help in advance (or anyone else who can help me).

    Cheers,

    Ron
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-01-05 13:07
    I've called out the pin numbers on the 9-pin connector (attached.) If you go with that then you can do comms using DEBUG, if that makes things any easier.

    Immerse yourself in SEROUT/SERIN, DEBUG/DEBUGIN.
    517 x 249 - 17K
  • bsnutbsnut Posts: 521
    edited 2011-01-08 00:42
    The only problem using the DEBUG instruction on your PC, is that. When the debug terminal is closed and open back up it doesn't show what is going on in your application. So, your best bet is to use the SEROUT/SERIN instruction or you can also use the EEPROM to store the information for your application. This way you can still use the Stamp Editor for programming other projects that you want to do.
  • ercoerco Posts: 20,256
    edited 2011-01-09 15:23
Sign In or Register to comment.