Serial communication detailed

Source: Internet
Author: User
Tags character set
Linux Serial programming detailedHttp://www.adamjiang.com/pukiwiki/index.php?  LINUX%E4%B8%B2%E5%8F%A3%E7%BC%96%E7%A8%8B%E8%AF%A6%E8%A7%A3 [Front page] [Diff |  Backup |  Reload] [List of pages |  Search |  Recent Changes | Help]
Recent 2012-03-01 gentoo tips 2011-11-10 recentdeleted strong>2011-11-02 TTY explained FrontPage 2011-10-15 __raw_writel () vs Writel () 2011-07-31 index.php 2011-06-18 ALSA Programming Guide Bluetooth 2011-05-08 Camera 2011-05-02 Linux serial programming detailed 2011-03-11 mmc/sd 2011-02-03 CJK Support in Evince PDF Reader 2011-01-28 VGA 2011-01-07 ctrl2cap 2010-10-21 Spinlock Why do preempt_disable 2010-09-16 up spinlock valid 2010-09-14 viewman Script 2010-08-02 Putty using two 2010-07-28 u-boot for Mini2440 compiling mini2440 toolchain The serial port itself, standard and hardware what is serial communication what is the RS-232 signal definition of asynchronous communication what is full-duplex and half-duplex what is the flow control what is the break synchronization communication users see the serial port and user space of the serial port programming serial port of the device file open serial port open the file option to write data from the port Read data off serial port configuration serial POSIX terminal interface control option setting baud rate setting character size setting parity setting hardware flow control Local Settings Select Classic Input Select original input input option set input parity option set software flow control output option Select processed Output select Raw output control character set software flow control character Set read Timeout modem communication What is modem communication with Modem Standard Modem command Advanced serial port programming the IOCTL of the serial port control signal set control signal English originalserial port itself, standard and hardware †

The serial port is the physical interface of the serial communication on the computer. Computer history, the serial port has been widely used to connect computers and terminal equipment and a variety of external devices. Although the Ethernet interface and USB interface are also transmitted as a serial stream, the serial connection is usually referred to as a hardware or modem interface that is compatible with the RS-232 standard. Although now on many personal computers, the original serial port used to connect external devices has been widely replaced by USB and FireWire, while the original serial port used to connect the network is replaced by Ethernet, and the serial device used to connect the terminal has been replaced by MDA or VGA. However, on the one hand because the serial port itself cost cheap technology mature, on the other hand because the console function of the serial port RS-232 standard highly standardized and very popular, so until now it is still widely used in various devices. Some computers use an integrated circuit called the UART as a serial device. This integrated circuit enables the conversion between a character and an asynchronous serial communication sequence, and can automatically process the timing of the data. Some low-end devices allow the CPU to transmit data directly through the output pin, a technique called bit-banging. Because the "serial port", RS-232 and UARTs basically always appear in the same context, so these nouns are usually confused. Here are some important terms and terminology explained below. ↑ What is serial communication †

A computer can transmit one or more bits of data at a time. The "Serial" means transmits only one bit (1bit) of data at a time. When you need to transmit a word data through a serial communication, you can only receive or send it in one bit at a time. Each bit may be on (1) or off (0). In many technical terms, mark is often used to indicate on, while space indicates off.

The speed of serial data is usually expressed as the number of bytes transmitted per second Bits-per-second (bps) or baud rate (baud). This value represents the number of 0 and 1 sent per second. A long time ago, 300bps was fast, and now the computer can handle up to 430,800 of the RS-232 rate. The units that represent the baud rate are also KPBS and mbps,1kps=1000bps and 1mbps=1000kbps. In general, when a serial device is mentioned, it is often said that it may be a data communication device-DCE (Communications equipment) or a data terminal device-dte (the information Terminal equipment). The difference between them is very simple, each signal pair, such as transmission and reception, they are exactly the opposite. If you need to connect two DTE or DCE devices, you need an adapter or crossover cable to swap the signal pair. ↑ What is rs-232†

RS-232 is an electrical interface for serial communication defined by the EIA (Electronic Industries Association). RS-232 there are actually three kinds (a, B and C) that use different voltages to represent on and off. The most widely used is rs-232c, which defines the voltage of Mark (on) as between -3v and -12v, while the voltage of space (off) is defined between +3v and +12v. Although the RS-232C standard says that the signal is transmitted at the farthest 8m, you can actually use it to transmit a longer distance until the signal baud rate is too low. The RS-232 links Remove the wires used to pass in the outgoing data, and there are wires to provide timing, state, and handshake:

RS-232 PIN Definition

DB-25

pins description pin description pin description /td> pin description stitch description
1 Earth G Round 6 dsr-data Set ready one Unassigned + Secondary RXD Signal quality Detect
2 txd-transmitted Data 7 gnd-logic Ground [ secondary DCD + recei Ver Clock Ring Detect
3

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.