Shenzhen Kai Mo Rui Electronic Technology Co. LTDShenzhen Kai Mo Rui Electronic Technology Co. LTD

News

Camera serial communication protocol

Source:Shenzhen Kai Mo Rui Electronic Technology Co. LTD2020-09-05

Baud rate: The rate at which the microcontroller or computer communicates through the serial port. Refers to the change of the signal within a unit time after being modulated, that is, the number of carrier parameter changes in a unit time. The baud rate can be easily understood as how many symbols of data a device sends (or receives) in one second. It is a measure of the symbol transmission rate. 1 baud means that 1 symbol symbol is transmitted per second (through different modulation methods, multiple bits of information can be loaded on a symbol symbol), 1 bit per second Refers to the transmission of 1 bit per second. The unit "Baud" itself already represents the number of modulations per second. It is a common mistake to use "Baud per second" as the unit.

Data bit: When using a modem to transmit data on the wire, each group of data transmitted must contain corresponding control data, including the start of sending data and the end of data. The most important of this group of data is the data bit. Under different communication environments, different numbers of data bits and end bits are generally specified.

COM port: Usually used to connect a mouse and communication equipment (such as connecting an external MODEM for data communication), etc.

A motherboard generally has two COM serial ports.

What is the serial port



Serial port is a very common device communication protocol on the computer (not to be confused with Universal Serial Bus or USB). Most computers contain two RS232-based serial ports. The serial port is also a common communication interface for instrumentation equipment; many GPIB-compatible devices also have RS-232 ports. At the same time, the serial communication protocol can also be used to obtain data from remote collection devices.

The concept of serial communication is very simple. The serial port sends and receives bytes bit by bit. Although slower than byte-based parallel communication, the serial port can use one wire to send data while using another wire to receive data. It is very simple and can realize long-distance communication. For example, when IEEE488 defines the parallel traffic state, the total length of the device line must not exceed 20 meters, and the length between any two devices must not exceed 2 meters; for the serial port, the length can reach 1200 meters.

Typically, the serial port is used for the transmission of ASCII characters. The communication is completed using 3 wires: (1) ground wire, (2) sending, (3) receiving. Since serial communication is asynchronous, the port can send data on one wire while receiving data on the other wire. The other lines are used for handshake, but are not required. The most important parameters of serial communication are bit rate, data bits, stop bits, and parity. For two ports to communicate, these parameters must match:

a. Bit rate: This is a parameter to measure communication speed. It represents the number of bits transmitted per second. For example, 300 baud means sending 300 bits per second. When we refer to the clock period, we mean the bit rate. For example, if the protocol requires 4800 baud rate, then the clock is 4800 Hz. This means that the sampling rate of serial communication on the data line is 4800 Hz. Usually the bit rate of the telephone line is 14400, 28800 and 36600. The bit rate can be much larger than these values, but the baud rate is inversely proportional to the distance. High bit rate is often used for communication between instruments placed very close, a typical example is the communication of GPIB devices.

b. Data bit: This is a parameter to measure the actual data bit in communication. When the computer sends an information packet, the actual data will not be 8-bit. The standard values are 5, 7 and 8 bits. How to set it depends on the information you want to send. For example, the standard ASCII code is 0~127 (7 bits). The extended ASCII code is 0~255 (8 bits). If the data uses simple text (standard ASCII code), then each data packet uses 7-bit data. Each packet refers to a byte, including start/stop bits, data bits and parity bits. Since the actual data bits depend on the choice of the communication protocol, the term "packet" refers to any communication situation.

c, stop bit: used to indicate the last bit of a single packet. Typical values are 1, 1.5 and 2 digits. Since the data is timed on the transmission line, and each device has its own clock, it is likely that a small out-of-synchronization occurs between the two devices in the communication. Therefore, the stop bit not only indicates the end of the transmission, but also provides an opportunity for the computer to correct clock synchronization. The more bits suitable for the stop bit, the greater the tolerance for synchronization of different clocks, but the slower the data transfer rate.

d. Parity bit: a simple error detection method in serial communication. There are four error detection methods: even, odd, high and low. Of course, no check digit is also possible. For even and odd parity, the serial port will set the parity bit (one bit after the data bit), and use a value to ensure that the transmitted data has even or odd logic high bits. For example, if the data is 011, then for even parity, the parity bit is 0 to ensure that the number of logic high bits is an even number. If it is odd parity, the parity bit is 1, so there are 3 logic high bits. The high and low bits do not really check the data, simply set logic high or logic low to check. In this way, the receiving device can know the status of a bit and have the opportunity to judge whether there is noise interfering with the communication or whether the transmission and reception data are out of sync.

For more information about our products, please visit our product website

:http://www.cmr-cctv.com

Related News

Professional Engineer

24-hour online serviceSubmit requirements and quickly customize solutions for you

+8613798538021