Serial communication

  • Thread starter asad1111
  • Start date
  • #1
51
0
iam making a project of serial communication between computer and controller the problem is:- db9 female port is connected to computer and male port is there to connect with max232 now in all circuits i have seen they have written that pin 2 is RTX or recieving pin whereas when i send signal from hyper terminal it appears on pin 2(i see it on oscilloscope) instead of pin3 which is transmission pin should it not have to appear on transmission pin??
reply soon
 

Answers and Replies

  • #2
jim hardy
Science Advisor
Gold Member
Dearly Missed
9,839
4,881
look for a RS232 tutorial
best i recall you roll the pins in the interconnecting cable because what is transmit to one guy is receive to the other.

we used 3 wires for 232 and telephone jacks.
 
  • #3
828
1
This gets me every time, and I usually end up making some adapter DB9 connector.

It has to do with the old RS-232 stuff where one device functions as a data terminal and the other as data terminating equipment. On one, the 2 and 3 pins will be the opposite of the other, so whatever you're trying to talk to, you need to have the pins swapped from that.
 
  • #4
51
0
so i need to give pin '2'(where signal is coming) to pin 8 or 13 of max 232 which is RS232 inputs instead of 11 or 10 of max 232
 
  • #5
jim hardy
Science Advisor
Gold Member
Dearly Missed
9,839
4,881
roll transmit and receive pins whatever they are. i think they're called TXD and RXD

look at pinouts for DTE and DCE

you really need to look up a tutorial on RS232

for there's other pins
clear to send, ready to send,

and lots of settings : baud rate , # of start & stop bits, parity,

that may or may not have to be dealt with. in my day those were set usually by DIP switches internal.

and i have long forgot the details.
 
Last edited:
  • #6
51
0
now when i roll the pins the max232 is giving incerted output by using not gate iam getting correct signal any idea why max232 is giving inverted output
 
  • #7
sophiecentaur
Science Advisor
Gold Member
2020 Award
25,375
4,947
look for a RS232 tutorial
best i recall you roll the pins in the interconnecting cable because what is transmit to one guy is receive to the other.

we used 3 wires for 232 and telephone jacks.
An intelligent RS232 interface can tell who it's talking to and swap the I/O to suit itself. No more Null Modem Grimblers needed!
 
  • #9
sophiecentaur
Science Advisor
Gold Member
2020 Award
25,375
4,947
Just remember it from the perspective of the computer: computer RECEIVES data from the peripheral, and computer TRANSMITS data to the peripheral. The direction arrows help also:
http://pinouts.ru/SerialPorts/Serial9_pinout.shtml
That's all very well but two computers can talk to each other quite happily via RS232. Which one is the 'peripheral' then?
RS232 was, afaik, a system for communicating with an external modem - where there was no confusion - but it has been used for other devices. Why not use an intelligent interface which will take care of Pins 1 and 2 quite well?
If you don't use an intelligent interface then there is no way of connecting a random choice of two out of three RS232 boards without needing to use a naff adapter and choose, each time, which is to to be the Tx and which the Rx. Not good Engineering and not necessary nowadays.
[Edit: I of course meant pins 2 and 3]
 
Last edited:
  • #10
828
1
That's all very well but two computers can talk to each other quite happily via RS232. Which one is the 'peripheral' then?
RS232 was, afaik, a system for communicating with an external modem - where there was no confusion - but it has been used for other devices. Why not use an intelligent interface which will take care of Pins 1 and 2 quite well?
If you don't use an intelligent interface then there is no way of connecting a random choice of two out of three RS232 boards without needing to use a naff adapter and choose, each time, which is to to be the Tx and which the Rx. Not good Engineering and not necessary nowadays.
[Edit: I of course meant pins 2 and 3]
An intelligent interface would be cool and definitely designable. I have never seen an RS-232 transceiver with this ability though, and it would make sense for them to build that in.
 
  • #11
sophiecentaur
Science Advisor
Gold Member
2020 Award
25,375
4,947
You need to buy an Apple, then. That capability goes back years and years on the Mac. I thought EVERYONE had that facility by now!
 
  • #12
MATLABdude
Science Advisor
1,655
4
You need to buy an Apple, then. That capability goes back years and years on the Mac. I thought EVERYONE had that facility by now!
They still make Apples with serial ports on them? :tongue:

(Conveniently, OS X ships with drivers for both FTDI- and Prolific-based USB to serial adapters--no smart interfaces that I'm aware of, however.)
 
  • #13
sophiecentaur
Science Advisor
Gold Member
2020 Award
25,375
4,947
Pretty dumb of me there. I was, of course, referring to the Ethernet interface when I talked of intelligence. I guess that RS232 has had little development recently.
 

Related Threads on Serial communication

  • Last Post
Replies
3
Views
2K
  • Last Post
Replies
5
Views
3K
  • Last Post
Replies
5
Views
3K
  • Last Post
Replies
1
Views
5K
  • Last Post
Replies
3
Views
659
  • Last Post
Replies
4
Views
2K
Replies
4
Views
1K
  • Last Post
Replies
5
Views
19K
  • Last Post
Replies
1
Views
1K
Top