Sie sind auf Seite 1von 4

PC serial port (RS-232 DE9) pinout and wiring @ pinouts.

ru

PC serial port (RS-232 DE9) connector pinout


bookmark this page

serial interface

This RS232C DE-9 (usually miscalled DB-9) port is very common and available at almost any PC, some Sun (at least Ultra 5/ 10, Blade 100/150) and many other computers. Document includes description of how PC serial mouse works.
9 pin D-SUB maleconnector at the computer

Almost each PC nowdays equiped with one/two/four serial interface ( RS232C ). This PC serial port interface is single ended (connects only two devices with each other), the data rate is less than 20 kbps. It's a voltage loop serial interface with full-duplex communication represented by voltage levels with respect to system ground. A common ground between the PC and the associated device is necessary. IDC internal Name Dir pin name* 1 3 5 CD RXD TXD

10 pin IDC maleconnector at the inside, at motheboard

Modbus TCPRTU Router Access Modbus RTU devices from TCP/IP networks.
www.cimetrics.com/M

DB-9 Pin

Description

1 2 3

Carrier Detect Receive Data Transmit Data Data Terminal Ready System Ground Data Set Ready Request to Send Clear to Send Ring Indicator

DTR

5 6 7 8 9

9 2 4 6 8

GND DSR RTS CTS RI

Note: Direction is DTE (Computer) relative DCE (Modem) * Pin assignment of internal connector may be different for different motherboard models. Pin 10 removed in connector. Internal IDC connnector wired to external port with a simple flat ribbon cable. PC serial port pinout signals explanations Since PC serial port is based on RS-232 standard, you may find signal details in the RS-232 interface pinout document Standard RS232 data packet

http://pinouts.ru/SerialPorts/Serial9_pinout.shtml[6/3/2011 4:20:06 PM]

PC serial port (RS-232 DE9) pinout and wiring @ pinouts.ru

RS232 data usually is sent as a packet with 7 or 8 bit words, start, stop, parity bits (may be varied). Sample transmission shown on picture: Start bit (active low, usually between +3v and +15v) followed by data bits, parity bit (depends on protocol used) and finished by stop bit (used to bring logic high, usually between -3v and -15v). Sample RS232 serial port device. How serial mouse works Typical PC mouse controlling system has the following parts: sensors -> mouse controller -> communication link -> data interface -> driver -> software. Sensors are the movement detectors (typically optomechanical) which sense the mouse movement and button swiches which sense the button states. Mouse controller reads the state of those sensors and takes acount of current mouse position. When this information changes the mouse controller sends a packet of data to the computer serial data interface controller. The mouse driver in the computer received that data packet and decodes the information from it and does actions based on the information. PC RS232 serial mouse voltage levels: Mouse takes standard RS-232C output signals (+-12V) as its input signals. Those outputs are in +12V when mouse is operated. Mouse takes some current from each of the RS-232C port output lines it is connected (about 10mA). Mouse send data to computer in levels that RS-232C receiver chip in the computer can uderstand as RS-232C input levels. Mouse outputs are normally something like +-5V, 0..5V or sometimes +-12V. Mouse electronics normally use +5V voltage.

Serial device hardware implementation PC serial mouse uses typically DTR and RTS lines for generating +5V power for microcontroller circuit in the mouse. Because typical optomechanical mouse also needs power for 4 leds in the optocoupler movevement detectors, there is not much power to loose. A typical approach is to use diodes to take current from DTR and RTS lines and then feed it through resistor to all of the (infrared) leds in the movement detectors. The positive power supply usually taken from RTS and DTR lines (just after the diodes and before the resistor going to leds). The negative supply for transmitter is taken from TD pin. Typical PC serial port mouse takes 10 mA total current and operates at voltage range of 6-15V. The data itself in sent using standard asynchronous RS-232C serial format: Start D0 Logic 0 +3..+15V | D1 D2 D3 D4 D5 D6 D7 Stop

___ ___ ___ ___ ___ ___ ___ ___ ___ | | | | | | | | |

http://pinouts.ru/SerialPorts/Serial9_pinout.shtml[6/3/2011 4:20:06 PM]

PC serial port (RS-232 DE9) pinout and wiring @ pinouts.ru

| | Logic 1 -3..-15V | ___|

| | |

| | |

| | |

| | |

| | |

| | |

| | |

| | |

| | |

|___|___|___|___|___|___|___|___|____

Serial mouse pinout explanation Pin shell Signal Protective Ground TD Serial data from host to mouse (only for power) Serial data from mouse to host Positive voltage to mouse Positive voltage to mouse and reset/detection Description

2 7 8 6 5

RD RTS CTS DSR Signal Ground DTR

RTS = Request to Send CTS = Clear to Send DSR = Data Set Ready DTR = Data Terminal Ready When DTR line is toggled, mouse should send one data byte containing letter M (ascii 77) to identify itself. To function correctly, both the RTS and DTR lines must be positive. The lines DTR-DSR and RTS-CTS must NOT be shorted. Implement the RTS toggle function by setting the RTS line negative and positive again. The negative pulse width is at least 100ms. After a cold boot, the RTS line is usually set to a negative level. In this case, setting the RTS line to a positive level is also considered an RTS toggle. RS232 serial data parameters and packet format 1200bps, 7 databits, 1 stop-bit Data packet is 3 byte packet. It is send to the computer every time mouse state changes (mouse moves or keys are pressed/released). D7 D1 D0 D6 D5 D4 D3 D2

http://pinouts.ru/SerialPorts/Serial9_pinout.shtml[6/3/2011 4:20:06 PM]

PC serial port (RS-232 DE9) pinout and wiring @ pinouts.ru

1. X7 2. X1 3. Y1

X X6 X X0 X Y0

LB

RB

Y7

Y6

X5

X4

X3

X2

Y5

Y4

Y3

Y2

Note: The bit marked with X is 0 if the mouse received with 7 databits and 2 stop bits format. It is also possible to use 8 databits and 1 stop bit format for receiving. In this case X gets value 1. The safest thing to get everything working is to use 7 databits and 1 stopbit when receiving mouse information (and if you are making mouse then send out 7 databits and 2 stop bits). The byte marked with 1. is send first, then the others. The bit D6 in the first byte is used for syncronizing the software to mouse packets if it goes out of sync. LB is the state of the left button (1 means pressed down); RB is the state of the right button (1 means pressed down); X7-X0 movement in X direction since last packet (signed byte); Y7-Y0 movement in Y direction since last packet (signed byte) Is there anything to be corrected? Edit this page! Source(s) of this and additional information: partially by Tomi Engdahl
Ads by Google RS232 Cables RS232 9 Pin Cable Wiring Pin

Related pinouts:
PC serial (25 pin) pinout RS232 interface pinout

Pinouts.ru> RS-232 and other serial ports and interfaces pinouts listing> Pinout of PC serial port (RS-232 DE9) and layout of 9 pin D-SUB male connector and 10 pin IDC male connector. Is this document correct or incorrect ? Is it correct?:

should be correct

Last updated 2010-04-24 14:52:27. Edit this page.

10 comments

[Discuss at the forum] [Back to index] [SUBMIT new pinout]


This page contain parts under Copyright 2000-2010 by pinouts.ru team. No portion of this webpage may be reproduced in any form without providing visible HTML link to pinouts.ru . Webmaster permission required in any other cases. Efforts have been made to ensure this page is correct, but it is the responsibility of the user to verify the data is correct for their application. 419623 hits since March 4, 2005

http://pinouts.ru/SerialPorts/Serial9_pinout.shtml[6/3/2011 4:20:06 PM]

Das könnte Ihnen auch gefallen