db9 serial cable wiring diagram
Can someone tell me the wiring for the db9 cable that is used with the Basic stamp Education board? Is is straight-thru? I am making a db9 to RJ-45 so I can use RJ-45 cable to connect to my PC. I plan on using a straight-thru RJ-45 cable.
Please & Thanks!
Please & Thanks!
Comments
pin 1 = pin1
pin2 = pin2
etc
Why are you making that transition? What is it on your PC that has an RJ-45 connector other than the telephone connection for a modem?
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
There is no pleasure in having nothing to do;
the fun is in having lots to do, and not doing it!
Thanks for questioning! I am using db9->rj45 adapters on both ends so I use an rj-45 (also will be straight-thru) cable to connect to my board. I have to go about 25' (at least) and wanted to make sure this project was viable before I bought another solution like Bluetooth or something. If you see some problem(s) please let me know!
Thanks!
-Russ
I'm still not sure I understand what you're planing to do with this data line. Will this be just an asynchrounous serial connection (ala RS-232) or will this line be used for programming the Stamp, or perhaps something else?
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
There is no pleasure in having nothing to do;
the fun is in having lots to do, and not doing it!
The only other issue is if it is 'true +12/-12 volt' RS-232 or something much lower. The BasicStamp and many laptops swing from +5/0 volts and this shortens the overall distances that clear signals can go - less energy.
If there is a real need for reliable distances, convert the RS-232 to full duplex RS-485 in hardware. The same software will work, but you can go 1000's of feet without problems.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
PLEASE CONSIDER the following:
Do you want a quickly operational black box solution or the knowledge included therein?······
Just one more comment; if you use flat silver telephone wire and your environment has a lot of cables near it that carry traffic, you could have interference problems. Otherwise, it should work just fine. Ihad up to 20 or so terminals communicating via RS-232 and didn't have problems until the cable tray had a mass of cables 3" deep and 15" wide and 70' long! (300 Amp DC, terminal signals, R.F. and more!). Tightly twisted pairs, such as any ethernet cable worked for me...
Terry
That's DB-9 pins 2 (RX), 3 (TX), 4(DTR), 5 (GND), 6 (DSR), and 7(RTS).
The BS2 BOE loops back pin 6 to pin 7 for the 'loopback' test. It 'echos' pin 2 to pin 3 for the 'echo' test. And it uses pin 4 (DTR) as a 'reset' signal for the BS2 to program it.
And yes, all of this are "straight-through" connections to the PC.
Bruce - it is just a longer serial cable (I hope) & I would like to program through it.
Kramer - hopefully all I will need (for now) is 25' or so.
terry_bear - I will check the $/ft. I also need something that doesn't mind getting muddy.
allanlane5 - so if I went pin1 -> pin1, pin2 -> pin2, etc. in the cable, I can program through it?
Thanks again all! I will have some more questions I am sure on another thread about timers & accelerometers!
Unless you have an overwhelming need to construct this oddball cable and adapters, I'd stick with an industry standard configuration. This means a DB-9 connector at both ends, random lay or twisted pair cable (with or without shielding as appropriate) and soldered connections throughout. This will provide you with a reliable cable from which you can expect the maximum distance, least noise, and which is appropriate for the voltage, frequency, resistance and capacitance as required in asynchronous serial communication.
RJ-45 is appropriate for POTS telephone communication, and possibly network connections, depending on the grade of wire you use, and the type of shielding. Anything more than that, and you're stretching the boundaries for what it's intended to be used.
If you're concerned about a weather resistant cable, I'd check with Belden, Anixter, or one of the larger wire manufacturers to see if they make an appropriate cable with a rubber, heavy thermoplastic or cross linked polyester outer jacket. Any of those types of jackets should give you fairly decent longevity outdoors.
The single biggest problem you may have is from the sun, and outer jacket deterioration from the ultraviolet light. Thus, if you can keep any cable you might use out of direct sunlight, you will probably extend the life of the cable significantly.
That all being said, do you want to be able to program your Stamp the first time, and every time, or be concerned about whether or not it will work this or any other time? Personally, I prefer a reliable link between the PBASIC IDE and the Stamp carrier board. So too a reliable link for any asynchronous serial communication.
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
There is no pleasure in having nothing to do;
the fun is in having lots to do, and not doing it!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
PLEASE CONSIDER the following:
Do you want a quickly operational black box solution or the knowledge included therein?······
Thanks again all, gives me hope the world ain't such a bad place!
Join the club. Most folks believe that RJ-45 has something to do with ethernet, but it doesn't even though its connotative definition is used by many that way. Denotativly, RJ-11 and RJ-45 are registered types of jacks, with very specific definitions. Perhaps you'd care to see the registered types of jacks, and what they all indicate:
http://en.wikipedia.org/wiki/RJ-45
You're not the first, nor will you be the last who is confused by registered jacks, and what they all mean. It's a WIRING JUNGLE out there!
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
There is no pleasure in having nothing to do;
the fun is in having lots to do, and not doing it!
There has been tons of prior discussion on the forum, so I am just summarizing the key points. Rather than using MAX232 level shifters, the RS422/485 drivers are both more cost effective and simpler to configure as they don't require capacitors to create the 12 volt levels.
The only problem is that full duplex seems to require at least two bi-directional drivers used as single direction drivers, a 50% waste capacity. The uni-directional drivers come in a 4x package, so you cannot locate a 1x. With the BasicStamp's ATTN, you need 3 pairs of drivers [noparse][[/noparse]3 at each end of the wire] to have the ability to reprogram the BasicStamp from afar. Hardware handshaking requires extra drivers if you need to prove such.
They come in DIP packages that can be replaced if the line is shorted or struck by a higher voltage. Usually, they sacrafice themselves and protect your more expensive components. And, you can create more complex networks of multiple master/slaves or broadcasts from one master to many slaves
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
PLEASE CONSIDER the following:
Do you want a quickly operational black box solution or the knowledge included therein?······
Post Edited (Kramer) : 2/7/2008 6:55:09 AM GMT
Unless I missed a change in the original requirements, this serial communications line (cable)·was intended to handle duplex, bi-directional,·asynchronous serial·data on one hand, and be used as a PBASIC Stamp programming cable on the other. It is·approximately 25 feet long, and is to be used in an outdoor environment.
Why is anyone looking at any of the following:
RS-422 (EIA-422): A 2-wire, uni-directional, point-to-point or multi-drop standard for serial communications
OR
RS-485 (EIA-485): A 2-wire, 1/2 duplex, multi-point standard for serial communications
This line only needs to conform to basic RS-232 standards, and not even all of that. As a PBASIC·Stamp programming cable·the requirement is for the following four lines plus a loopback connection to meet the Parallax requirements as noted in the PBASIC Reference Manual:
Rx, Tx, DTR, Gnd
There is no need for: multi-point, multi-drop, differential signals or anything else. Let's get back to basics and keep it simple.
We now return you to your regularly scheduled program :-)
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
There is no pleasure in having nothing to do;
the fun is in having lots to do, and not doing it!
Generally, I presume that people want to know their options if they have difficulties. And I assume that others might be reading the thread in search for knowledge. Once one gets 25 feet of cable working, one miight want to go to 1000 feet [noparse][[/noparse]and it can be done with RS-422/485]. Narrowly answering the question doesn't really empower someone to make better design choices. Nor does it open up new challenges and interests.
Of late, we have had a lot of referals to Wikipedia without any further comment. Sometimes it is appropriate, but we also enjoy fellowship and expansive thinking.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
PLEASE CONSIDER the following:
Do you want a quickly operational black box solution or the knowledge included therein?······
I have a related question. The laptop I'm using for my Stamp projects doesn't have a serial port, so I'm using a Belkin USB->Serial adapter. Interestingly, the stamp software isn't able to access the Stamp to download a program using this adapter, but the debug terminal works fine. To download, I have to connect the Stamp to another machine with a real serial port.
Has anyone used these USB->serial adapters successfully for both downloading and debug and if so, which model did you use? I'm thinking that the USB adapter doesn't fully emulate a serial port and it's messing up the download.
Thanks for any help.
Rich
It may well be that your USB device is missing the DTR or other.
Here are a couple of links to Parallax's own USB-Serial devices (the first is for the device alone and the second is for the device and the cable)·--
http://www.parallax.com/Store/Accessories/CablesConverters/tabid/166/CategoryID/40/List/0/Level/a/ProductID/378/Default.aspx?SortField=ProductName%2cProductName
http://www.parallax.com/Store/Accessories/CablesConverters/tabid/166/CategoryID/40/List/0/Level/a/ProductID/379/Default.aspx?SortField=ProductName%2cProductName
Post Edited (PJ Allen) : 2/9/2008 7:14:47 PM GMT