Shop OBEX P1 Docs P2 Docs Learn Events
Stamp to computer serial port — Parallax Forums

Stamp to computer serial port

Scott MScott M Posts: 43
edited 2004-10-12 18:26 in BASIC Stamp
I know the answer to this is easy, and somewhere on the site, but I couldn't turn it up...

I want to connect a stamp (actually a Javelin) to a standard RS-232 serial port. I know stamps use 5v signalling and standard RS-232 doesn't, and I want to make very sure the RS-232 outputs don't fry the stamp. Is it as simple as a 1K resistor between them, or is there a more complicated buffer circuit involved?

This will be at 9600 baud, over ~25' of cable, communicating in both directions. Thanks!

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-10-03 15:13
    If you're going that far you really need to use a proper driver. The Javelin demo board has one built in.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • Scott MScott M Posts: 43
    edited 2004-10-11 19:25
    >If you're going that far you really need to use a proper driver. The Javelin demo board has one built in.

    Er, yes. But the project isn't going to be on a Javelin demo board, so I really need to know how to wire up a connection myself. People must connect stamps to RS-232 ports all the time. I need a circuit diagram or at least some clues...
  • allanlane5allanlane5 Posts: 3,815
    edited 2004-10-11 19:33
    Look to Maxim-IC.com, for MAX232 driver and use schematic.

    Note the Javelin 'debug' port CANNOT be used (as the BS2 CAN) for a generic RS-232 port. The Javelin puts too much debug info on that line, all the time.

    For a PIC (and an SX, which the Javelin is based on) a simple 22 Kohm resistor is sufficient on the recieve side to reduce the current enough so the chip 'protection diodes' can handle the signal. It will be Inverted, but you can tell the Javelin that. It's the driver circuit that you need the MAX232 for. Then again, the MAX232 has two drivers, and two recievers, so if you're going that route, you might as well wire the reciever circuit as well.

    And I think what Jon was saying was, go to the Parallax site and download the schematic for the Javelin demo board. If that doesn't work, go to www.basicmicro.com and download the schematic for one of their prototype boards -- I KNOW they use the MAX232 chip, and the Atom and Javelin modules are compatible.

    Oh, and if you really are using 25 feet of cable, the MAX232 becomes an even better idea.
  • Scott MScott M Posts: 43
    edited 2004-10-11 20:34
    Yup. An hour after I posted, I remembered the name of the chip I wanted. Even better (if not precusely cheap) I found this:
    http://www.al-williams.com/rs1.htm

    Parallax would be wise to create a $5 version of this - it looks to be massively useful.

    Now... my Javelin will be able to control my stereo. Bhaw haha ha hahaha!
  • allanlane5allanlane5 Posts: 3,815
    edited 2004-10-12 15:10
    $5.00? Oh, if only... You'd think they could mass-produce something like
    this with a surface-mount MAX232 and small capacitors for $5.00, though.

    Typically, $8.00 to $15.00 as a kit is typical for this (which is a small board with a MAX232,
    4 capacitors, a DB-9, and some pads to connect to).
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-10-12 16:36
    It wouldn't be a problem to "mass produce" for that price -- the problem is there is no "mass market" for it, so we'd end up with a warehouse full of wasted product....

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • AlWilliamsAWCAlWilliamsAWC Posts: 135
    edited 2004-10-12 16:47
    These are almost always on sale for a pretty good price. The real costs are having PCBs made and supporting them, but we still think it is a fair price and, in fact, they are one of our best sellers...

    Regards,

    Al Williams
    AWC
  • Buck RogersBuck Rogers Posts: 2,175
    edited 2004-10-12 18:26
    Hello from Buck Rogers

    What about using the RS232 APMOD? Surely it is capable of doing what your thinking of?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Buck Rogers

    www.gregg.levine.name
Sign In or Register to comment.