Shop OBEX P1 Docs P2 Docs Learn Events
Serial communication question — Parallax Forums

Serial communication question

electromanjelectromanj Posts: 270
edited 2006-12-22 17:02 in BASIC Stamp
Hello, For a homebuilt bs2 board what do you recomend for serial interface. I've heard to use a max232 chip. There are a lot of different models out there. Is there a specific model number that is recommended. Also, I assembled an oem bs2 kit and I didn't see a max232 chip on that board, just transistors and resistor networks and caps. I'd like to keep this as simple as possible. Any help would be greatly appriciated!
Thanks!
P.S. Does this thing have a spell check?lol.gif
me spalling no is so pretty guud.

Comments

  • FranklinFranklin Posts: 4,747
    edited 2006-12-22 03:19
    The max232 and other 'level shifters' are only needed if you plan to talk to rs232 devices like a computer. If all you want to do is send or receive serial data at ttl levels you don't need them. The stamps talk ttl level hence no max232 onboard.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • electromanjelectromanj Posts: 270
    edited 2006-12-22 03:48
    I should have been more clear. I want to communicate to and from my computer to download programs and display debug screens.
  • Mike GreenMike Green Posts: 23,101
    edited 2006-12-22 05:47
    Either a Max232 or the transistor 'level shifters' shown in the Stamp manual and in the serial BOE will work if you have a serial port. If you want to use USB, copy the circuit of the USB BOE.
  • stamptrolstamptrol Posts: 1,731
    edited 2006-12-22 13:15
    Just to be clear, most modern PC serial interfaces will accept TTL serial signals in inverted mode. Similarly the stamp can handle incoming rs232 signal if a 22K resistor is used in series. See the SERIN/SEROUT helpfile.

    Also, if level shifting is desired for distance or other reasons, the Max233 version does it all without external caps.

    Cheers

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

    http://www.siskconsult.com
    ·
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-12-22 15:25
    As a final note, you can send data back and forth over the existing RS-232 compatible link which is the programming port and then you won’t need to add anything.· The only thing you lose there is handshaking.· The programming port doesn’t support it.· I hope this helps.· Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • electromanjelectromanj Posts: 270
    edited 2006-12-22 15:59
    I'm not very computer literate, I've heard of handshaking but I'm not sure what it is.
  • allanlane5allanlane5 Posts: 3,815
    edited 2006-12-22 17:02
    The 'stock' BS2 (and the OEM board) use a couple of transistors as stand-ins for the MAX232 'level shifter' circuits. Thus, with a stock BS2, you merely hook up the TX, RX, DTR, GND to Vss on the BS2, and loop-back the DB-9 pins 6 to pin 7. It's very simple, and requires no other hardware than the DB-9 shell.

    You do need a 'straight through' DB-9 cable, of course (NOT a "null-modem" cable).

    You can talk to the programming port from the BS2 with a "SEROUT 16, 16468, [noparse][[/noparse]"Hi there!", 13]" if you need to test.

    Oh, and the "hand-shake" RS-232 signals mentioned above refer to the RTS/CTS, DTR/DCD signals.· Modems use these signals with a Terminal device to indicate what's going on -- if it's Ready To Send, Clear To Send for example.

    These days, Modems can use the TX and RX line to send messages indicating status, so you don't HAVE to use these so-called "hardware hand-shake" signals any more.· In any event, the BS2 programming port doesn't support them.
Sign In or Register to comment.