Pinagem de Conector de Comunicação Serial

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 5

RS-232 Signals

Pin Description Pin Description


1 Earth Ground 14 Secondary TXD
2 TXD - Transmitted Data 15 Transmit Clock
3 RXD - Received Data 16 Secondary RXD
4 RTS - Request To Send 17 Receiver Clock
5 CTS - Clear To Send 18 Unassigned
6 DSR - Data Set Ready 19 Secondary RTS
7 GND - Logic Ground 20 DTR - Data Terminal Ready
8 DCD - Data Carrier Detect 21 Signal Quality Detect
9 Reserved 22 Ring Detect
10 Reserved 23 Data Rate Select
11 Unassigned 24 Transmit Clock
12 Secondary DCD 25 Unassigned

13 Secondary CTS

IBM PC/AT 9-Pin DSUB Signals


(RS-574)

Pin Description Pin Description


1 DCD - Data Carrier Detect 6 Data Set Ready
2 RXD - Received Data 7 RTS - Request To Send
3 TXD - Transmitted Data 8 CTS - Clear To Send
4 DTR - Data Terminal Ready 9 Ring Detect

5 GND - Logic Ground

SGI 9-Pin DSUB Signals

Pin Description Pin Description


1 Earth Ground 6 DSR - Data Set Ready
2 TXD - Transmitted Data 7 GND - Logic Ground
3 RXD - Received Data 8 DCD - Data Carrier Detect
4 RTS - Request To Send 9 DTR - Data Terminal Ready

5 CTS - Clear To Send

SGI 8-PIN MiniDIN Signals

Pin Description Pin Description


1 DTR - Data Terminal Ready 5 RXD - Received Data
2 CTS - Clear To Send 6 RTS - Request To Send
3 TXD - Transmitted Data 7 DCD - Data Carrier Detect
4 GND - Logic Ground 8 GND - Logic Ground

RS-422 25-Pin DSUB Signals


(RS-449)

Pin Description Pin Description

Página 1 de 5
1 Earth Ground 14 TXD+
2 TXD- - Transmitted Data 15 Transmit Clock-
3 RXD- - Received Data 16 RXD+
4 RTS- - Request To Send 17 Receiver Clock-
5 CTS- - Clear To Send 18 Unassigned
6 DSR - Data Set Ready 19 RTS+
7 GND - Logic Ground 20 DTR- - Data Terminal Ready
8 DCD- - Data Carrier Detect 21 Signal Quality Detect
9 Reserved 22 Unassigned
10 Reserved 23 DTR+
11 Unassigned 24 Transmit Clock+
12 DCD+ 25 Receiver Clock+

13 CTS+

Apple 8-PIN MiniDIN Signals


(RS-422)

Pin Description Pin Description


1 Transmit Clock 5 RXD- - Received Data
2 Receiver Clock 6 TXD+
3 TXD- - Transmitted Data 7 General Purpose Input
4 GND - Logic Ground 8 RXD+

UNIX Serial Device Files

System Port 1 Port 2


IRIX* /dev/ttym1 /dev/ttym2
HP/UX /dev/tty01 /dev/tty02
Solaris/SunOS /dev/ttya /dev/ttyb
Linux /dev/ttyS0 /dev/ttyS1
Digital UNIX /dev/tty?? /dev/tty??
AIX /dev/tty?? /dev/tty??

* Also "/dev/ttyd-" and "/dev/ttyf-".

POSIX Termios Structure

Member Description
c_cflag Control options
c_lflag Line options
c_iflag Input options
c_oflag Output options
c_cc Control characters

POSIX Control Mode Flags

Constant Description
CBAUD Bit mask for baud rate
B0 0 baud (drop DTR)
B50 50 baud
B75 75 baud
B110 110 baud
B134 134.5 baud
B150 150 baud

Página 2 de 5
B200 200 baud
B300 300 baud
B600 600 baud
B1200 1200 baud
B1800 1800 baud
B2400 2400 baud
B4800 4800 baud
B9600 9600 baud
B19200 19200 baud
B38400 38400 baud
EXTA External rate clock
EXTB External rate clock

CSIZE Bit mask for data bits


CS5 5 data bits
CS6 6 data bits
CS7 7 data bits
CS8 8 data bits

CSTOPB 2 stop bits (1 otherwise)

CREAD Enable receiver

PARENB Enable parity bit


PARODD Use odd parity instead of even

HUPCL Hangup (drop DTR) on last close


CLOCAL Local line - do not change "owner" of port
LOBLK Block job control output
CNEW_RTSCTS Enable hardware flow control (not supported on all platforms)

POSIX tcsetattr Constants

Constant Description
TCSANOW Make changes now without waiting for data to complete
TCSADRAIN Wait until everything has been transmitted
TCSAFLUSH Flush input and output buffers and make the change

Página 3 de 5
POSIX Local Mode Constants

Constant Description
ISIG Enable SIGINTR, SIGSUSP, SIGDSUSP, and SIGQUIT signals
ICANON Enable canonical input (else raw)
XCASE Map uppercase \lowercase (obselete)
ECHO Enable echoing of input characters
ECHOE Echo erase character as BS-SP-BS
ECHOK Echo NL after kill character
ECHONL Echo NL
NOFLSH Disable flushing of input buffers after interrupt or quit characters
IEXTEN Enable extended functions
ECHOCTL Echo control characters as ^char and delete as ~?
ECHOPRT Echo erased character as character erased
ECHOKE BS-SP-BS entire line on line kill
FLUSHO Output being flushed
PENDIN Retype pending input at next read or input char
TOSTOP Send SIGTTOU for background output

POSIX Input Mode Constants

Constant Description
INPCK Enable parity check
IGNPAR Ignore parity errors
PARMRK Mark parity errors
ISTRIP Strip parity bits

IXON Enable software flow control (outgoing)


IXOFF Enable software flow control (incoming)
IXANY Allow any character to start flow again

IGNBRK Ignore break condition


BRKINT Send a SIGINT when a break condition is detected

INLCR Map NL to CR
IGNCR Ignore CR
ICRNL Map CR to NL
IUCLC Map uppercase to lowercase
IMAXBEL Echo BEL on input line too long

Página 4 de 5
POSIX Output Mode Constants

Constant Description
OPOST Postprocess output (not set = raw output)
OLCUC Map lowercase to uppercase
ONLCR Map NL to CR-NL
OCRNL Map CR to NL
NOCR No CR output at column 0
ONLRET NL performs CR function
OFILL Use fill characters for delay
OFDEL Fill character is DEL
NLDLY Mask for delay time needed between lines
NL0 No delay for NLs
NL1 Delay further output after newline for 100 milliseconds
CRDLY Mask for delay time needed to return carriage to left column
CR0 No delay for CRs
CR1 Delay after CRs depending on current column position
CR2 Delay 100 milliseconds after sending CRs
CR3 Delay 150 milliseconds after sending CRs
TABDLY Mask for delay time needed after TABs
TAB0 No delay for TABs
TAB1 Delay after TABs depending on current column position
TAB2 Delay 100 milliseconds after sending TABs
TAB3 Expand TAB characters to spaces
BSDLY Mask for delay time needed after BSs
BS0 No delay for BSs
BS1 Delay 50 milliseconds after sending BSs
VTDLY Mask for delay time needed after VTs
VT0 No delay for VTs
VT1 Delay 2 seconds after sending VTs
FFDLY Mask for delay time needed after FFs
FF0 No delay for FFs
FF1 Delay 2 seconds after sending FFs

POSIX Control Character Constants

Constant Description Key


VINTR Interrupt CTRL-C
VQUIT Quit CTRL-Z
VERASE Erase Backspace (BS)
VKILL Kill-line CTRL-U
VEOF End-of-file CTRL-D
VEOL End-of-line Carriage return (CR)
VEOL2 Second end-of-line Line feed (LF)

VMIN Minimum number of characters to read

VTIME Time to wait for data (tenths of seconds)

Página 5 de 5

You might also like