Shop OBEX P1 Docs P2 Docs Learn Events
How to interface an RS-232 OutPut To a Basic Stamp Pin What will I need to do t — Parallax Forums

How to interface an RS-232 OutPut To a Basic Stamp Pin What will I need to do t

sam_sam_samsam_sam_sam Posts: 2,286
edited 2009-05-13 22:18 in General Discussion
Hi EveryOne

·
This is a project that I have been ·ask to do·by employer
·
As of right now I can not give all of the details.......................
................·but when the Project is done I will share with all of you on the Forum




Here Is the Link to the Scale that we have

·The Transmitting Data is on Page 22

·http://www.wtxweb.com/literature/125sst_u.pdf



···Samples of the default printout for a WI-125 SST are shown in Figure 5.

·Figure 5
The default settings for serial output are:
Busy Disabled
Baud 1200
Parity Clear = 8 data, no parity
Stops 1
·················· Stop Bits······ Data Bits···· Parity
NONE··········· 1 or 2··· ········ 7 or 8······ ·None
ODD············ ·1 or 2··············· 7··········· Odd
EVEN··········· 1 or 2··············· 7·········· ·Even
SET················ ·2·················· 7··········· None

CLEAR············· 1··················8············ None



Here are the Pins that are on the board

TB8-5· DSR / CTS

TB8-4· DTR

TB8-3 Receive

TB8-2 Transmit

TB8- Ground

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any·idea.gif·that you may have and all of your time finding them

·
·
·
·
Sam

Post Edited (sam_sam_sam) : 5/11/2009 11:57:27 PM GMT
976 x 1968 - 232K

Comments

  • FranklinFranklin Posts: 4,747
    edited 2009-05-11 22:51
    You need a level shifter like the max232.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2009-05-11 23:12
    Would I use something like what they have at this link

    http://www.kmitl.ac.th/~kswichit/MAX232/MAX232.htm



    What Pins would go where


    Here are the Pins that are on the board········· · Max232 pin Outs

    TB8-5· DSR / CTS········································DTR·/· DSR

    TB8-4· DTR··············································· RTS / CTS

    TB8-3 Receive··········································· RXD

    TB8-2 Transmit·········································· TXD

    TB8- Ground·············································· GND

    ·Page 21

    SERIAL — Tells you if the serial output is ready or busy. A jumper
    connecting pins DTR to CTS of the serial port will cause
    REAdY to be displayed. Pressing the MENU key puts no
    LOOP
    on the display. With pins XMITT to RECV connected,
    LOOP is displayed. With them disconnected, no LOOP is

    displayed. Press SELECT to return to SErIAL.



    ·

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ··Thanks for any·idea.gif·that you may have and all of your time finding them

    ·
    ·
    ·
    ·
    Sam

    Post Edited (sam_sam_sam) : 5/11/2009 11:59:59 PM GMT
  • PropabilityPropability Posts: 142
    edited 2009-05-11 23:28
    Why not just use a 22k resistor like it is explained in the SERIN command in the Basic Stamp Manual v2.2 that can be downloaded from this site.
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2009-05-11 23:33
    How would i deal with this part
    Page 21
    SERIAL — Tells you if the serial output is ready or busy. A jumper
    connecting pins DTR to CTS of the serial port will cause
    REAdY to be displayed. Pressing the MENU key puts no
    LOOP
    on the display. With pins XMITT to RECV connected,
    LOOP is displayed. With them disconnected, no LOOP is

    displayed. Press SELECT to return to SErIAL.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ··Thanks for any·idea.gif·that you may have and all of your time finding them

    ·
    ·
    ·
    ·
    Sam

    Post Edited (sam_sam_sam) : 5/12/2009 12:00:39 AM GMT
  • stamptrolstamptrol Posts: 1,731
    edited 2009-05-12 12:02
    Sam,

    This indicator will work with the Stamp. The receiving part will be through a 10K-22K resistor to any Stamp pin. Transmitting will use the programming port in order to use the built in level shifter. Alternatively, use a MAX233 chip to give you the level shifting and leave the programming port open.

    I've used Stamps with my scale controller for over 10 years. Works great. The indicator may need pins 4 and 5 jumpered and may have to be configured for "Continuous Output". Stay with 1200, 2400, 4800 baud. If you need 9600, go to a BS2sx.

    In your previous post, the LOOP and READY displays are just for troubleshooting to give some indication that your wiring is intact. For instance, in some installations, the connection from pin 4 - 5 is controlled by some external device and it is helpful to have the indicator tell whether its seeing the signal.

    The most important part will be for the indicator to be sending out its weight string along with the bytes which monitor scale motion, zero, and valid weight. Usually the Stamp will only be transmitting the command to zero the scale or store a tare weight.

    Cheers,

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com
    ·
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2009-05-12 21:25
    Tom Sisk

    Thank you for your reply that help allot

    I have one question if I just want the weight from the scale which pins would I need to used
    and what should I do with the rest of the pins

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ··Thanks for any·idea.gif·that you may have and all of your time finding them

    ·
    ·
    ·
    ·
    Sam

    Post Edited (sam_sam_sam) : 5/12/2009 9:33:58 PM GMT
  • stamptrolstamptrol Posts: 1,731
    edited 2009-05-13 00:30
    sam,

    ·To receive the weight string, you will need only the TXD and GND. The TXD will go to a Stamp pin through a 10K - 22K resistor. Your SERIN command will use "inverted mode, I believe. Use the STR directive to grab the string. I usually use the WAIT modifier as well because the first character out of the indicator is an ascii 002.

    · Note that you have to have the indicator configured for "continuous output" and that you might have to jumper DTR/DSR so the indicator is fooled into thinking the cable is plugged in.

    · I've attached one of my older scale programs for you to look at. You're welcome to use it as you see fit. Its for a fully automated, unattended, legal-for-trade truck scale so has a lot of interlocking. However, turn on the line numbers in your programming IDE and scroll down to line 282 and the "waitforzero" sub-routine. You can see the SERIN command there.

    ·Cheers,









    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2009-05-13 22:18
    Tom Sisk

    I've attached one of my older scale programs for you to look at. You're welcome to use it as you see fit.

    Thank You for sharing the code that·you have·used before this will help allot
    I will post what come with

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ··Thanks for any·idea.gif·that you may have and all of your time finding them

    ·
    ·
    ·
    ·
    Sam
Sign In or Register to comment.