The Conceptual Knowledge Of Serial Port

What is serial port?

Serial port usually refers to COM port, divided into synchronous serial port (SSI) and asynchronous serial port (UART).

We usually refer to serial port refers to the asynchronous serial port, sending and receiving two devices can send and receive data at any time. Synchronous transmission is usually used less our customers basically do not use here do not make an introduction.

UART contains a string port at the TTL level and a serial port at the RS232 level. The TTL level is 3.3V, while the RS232 is negative logic level, which defines the level of the low level of the 5 to 12V and the high level of the -12 to -5V.

Serial interfaces include RS-232, RS-422, RS-485 by electrical standards and protocols.

RS-232 is usually plugged in using db9 seats on development boards and computers. The transmission distance is 15m short and the output speed is generally 115200bps/s. RS-232 is divided into 3-line serial port and 5-line serial port 9-line serial port. Generally use three-line serial port can, but some old equipment such as MODEM or some railway, power serial device will use 5-line and 9-line serial port



RS-422, RS422 is a four-wire interface that supports master-to-master communication, with a master device mounting up to 10 from the device and not communicating with each other from device to device. Maximum transmission distance of 1219m and transfer rate of up to 10Mb/S (1MB/S).

RS-485, RS485 with two-wire interface, also supports master-to-master communication, a master device can mount up to 32 from the device, more than 422, transmission distance of up to 1219m, transmission rate can reach 10Mb/S (1MB/S).

Serial extension implementation scenario

1, CPU native support and expansion of the relationship, such as i.MX6UL CPU native support 8 serial port, if the base board with 10 serial port, how to do? How to expand multiple network outlets, cans, 485s, etc.? If extended, What information, hardware, software aspects Flying provides.

2, the bottom plate reuse interface, the customer wants to change their own words how to do? Which place to change? kernel? What information or methods does Forlinx provide that customers can see and do it themselves?


If you want to expand 10 or more serials how to expand, FETMX6UL-C core board native support 8 serial port (3 lines), such as scenario one in the figure below, but the remaining serial port needs to use other buses to expand, the current scenario has several:


■ SPI bus expansion

Features: Because SPI data can only be sent 4 or 8 bytes at a time, resulting in a low data rate, often there will be a loss of frames. This scenario is generally not considered

■ USB extension

Features: This is also our frequently used program, the chip XR21V1414 (V1414) is an enhanced interface conversion chip, from the USB interface to a 4-channel UART interface (full serial port). With 128 bytes of FIFO and 384 bytes of FIFO received, the XR21V1414 helps optimize overall data throughput in a variety of applications and reduce CPU resources.

Number of extensions: 1 USB controller can extend up to 10 serial ports, two controllers can expand 20. Theoretically, a USB controller can extend 16 serial ports with a HUB chip but USB mount devices are limited by nodes, so usually a USB controller can extend 10 serial ports.

This module is currently supported in our AM335 Series and i.MX6Q/DL and i.MX6UL Series. There are drivers under Linux Android.

Cons: Many customers feel that using USB extensions can lead to instability due to low-quality USB re-serial ports on the market. In fact, our program is verified by the market, the choice of chips is also the United States chip, stability is very high.

■ Data bus expansion

Features: The universal solution is to use TI a chip 16C554. Extend with data bus and address bus scenarios. Currently, we only do this under the 6410 linux system.

Cons: Due to data bus limitations, many core boards do not lead out the data bus interface. Bus drive debugging is cumbersome and requires familiarity with bus drives.

Pros: This scenario is required if the customer needs a large number of serial ports and also needs to use USB.