this is just an example to try and explain what i want to do and not an actual situation(before i get 50 people saying jsut do this or that instead...)
if i were to connect the arduino TX and RX pins to my serial port to send/recieve data would i need something else or could i just hook the TX to the RX of my PCs serial port and the RX to the TX and then would it be able to send and recieve data or is an additional circute required(that was an example i connect my arduino by USB but this is the only way i know how to explain my problem clearly)
or would this fry my serial port/arduino or just simply not work
The rx/tx pins of the arduino are at 0/5V "ttl" levels, while the external serial interfaces on the usual PC are at +12/-12V "rs232" levels. You need an rs232 converter circuit to be able to connect them and actually communicate. It is somewhat possible to fry the arduino doing this, since pins are not supposed to have voltages above 5V or below 0 applied.
Suitable translation kits include
P4 RS232 to TTL Serial Adapter Kits" from Modern devices
RS232 to TTL 3V - 5.5V converter kit from NKC electronics
That will not work and can cause damage. A PC comm port uses RS-232 voltage levels, -12vdc to +12vdc, while the AVR processors chip uses TTL voltage levels, 0vdc to +5vdc. So there is a need for a voltage translation and logic inversion. This can be accomplished by using a MAX232 chip or other module that can do this conversion. There are many commercial inexpensive modules availble. Here is one example:
Edit: beat out again ;D
Lefty
I'm sorry.. I had to point out that they posted nearly the exact same thing, pretty close in terms of time.. and they live in the same city.. coincidence? I think not!
But yeah, either of the products they listed will work.. I believe you can get samples of the MAX232 chip as well, just for that extra.. cheapness.
wow that was a quick reply and thanks for the very helpful answers. now that i know that now hopfuly i can see what powers of arduino+PC computing can happen thanks again for the fast replies
and they live in the same city
Heh. The "SF Bay Area" is not a single city; it encompasses at least three major cities (San Francisco, Oakland, and San Jose) and dozens of smaller cities/towns.
and they live in the same city
And better then seven million in population!
westfw and I have never met, yet.
I live in a small city in the East Bay Area called Hercules. It was named after a company, the Hercules Powder Co. that was started in San Francisco during the gold rush era to supply explosives for the miners in the Sierras. The company kept having rather impressive industrial accidental explosions (go figure!) and kept having to relocate the company further away several times from growing population. They stopped moving when when reaching this site and closed several decades ago.
Off topic for sure, but though it might be interesting to some.
Lefty
Off topic for sure, but though it might be interesting to some.
that was indeed interesting
Hi
Used to work a lot with RS232 in the dark ages, and it usually isn't as simple as connecting TX to RX and vice versa.
RS232 was designed to connect a terminal to a computer (data set in RS232-lingo, which also could be a modem). In a standard terminal/computer connection, TX is connected to TX etc. It is seen from the computer side; the computer transmits on the TX connector (pin 2 in an RS232 plug) ad the terminal receives on TX!. Now if both devices consider themselves to be computers (or terminals), you connect TX to RX etc. I believe the PC was originally designed to use the RS232 to work as a terminal, but I'm not sure.
Then it is the handshaking; the RTS and CTS (Request To Send and Clear To Send) were used on character level (usually like "hold it, my buffer is full") while DSR and TR (Data Set Ready and Terminal Ready) were used on session level, signaling that the equipment is connected and turned on. To simulate this handshaking, you connect RTS to CTS (pin 4,5 in standard RS232 but unfortunately PCs have their own configuration) and DSR to TR (pin 6 and 20).
It used to be that RTS had to be wired to CTS, and DSR to TR, before the PC would send anything (a requirement in the RS232 chip), but maybe the serial driver can be set up to ignore this. Receiving usually works if you have the TX/RX right.
A WARNING if you start connecting things in the RS232 plug: ground is pin 7 in standard RS232, but this is where the PC differs, and I don't remember the PC configuration on the top of my head. It's easy to connect +12V to ground by mistake. POF!
Hopefully you don't need any of this, but if your connection doesn't work, this may be useful.
Ove
Retrolefty--
I live in a small city in the East Bay Area called Hercules. It was named after a company, the Hercules Powder Co. that was started in San Francisco during the gold rush era to supply explosives for the miners in the Sierras. The company kept having rather impressive industrial accidental explosions (go figure!) and kept having to relocate the company further away several times from growing population. They stopped moving when when reaching this site and closed several decades ago.
In days past the Dynamite sticks used to sweat on hot days . They buried it in special purpose well type diggings which sometimes got covered over in accidents by blasting or dozer. Nitro Glycerine was treated this way too.
I'd be careful with that garden spade Lefty !
I'd be careful with that garden spade Lefty !
Well nobody gets out of here alive anyway. At my age that would be as good a way of going out as any other that comes to mind. No pain, no anticipation, lots of opportunities for lawyers, lots of publicity for the relatives to deal with...
Lefty