The Principle of Serial Communication
The concept of serial communication is very simple. The serial port sends and receives bytes by bit. Although slower than byte-by-byte parallel communication, a serial port can send data on one wire while receiving data on another. It is simple and enables long-distance communication. For example, when IEEE488 defines the parallel traffic state, it stipulates that the total length of equipment lines shall not exceed 20 meters, and the length between any two devices shall not exceed 2 meters. For serial ports, the length can be up to 1200 meters.
Typically, a serial port is used for the transmission of ASCII characters. Communication is accomplished using 3 wires: (1) ground, (2) transmit, and (3) receive. Because serial communication is asynchronous, a port can send data on one wire while receiving data on another. Other lines are used for handshaking but are not required. The most important parameters for serial communication are baud rate, data bits, stop bits and parity. For two ports to pass, these parameters must match:
A. Baud rate: This is a parameter to measure communication speed. It represents the number of bits transmitted per second. For example, 300 baud means that 300 bits are transmitted per second. When we say clock cycle, we mean baud rate. For example, if the protocol requires a 4800 baud rate, then the clock is 4800 Hz. This means that the serial communication has a sampling rate of 4800 Hz on the data line. Typical telephone line baud rates are 14400, 28800, and 36600. The baud rate can be much larger than these values, but the baud rate is inversely proportional to the distance. High baud rates are often used for communication between instruments placed in close proximity, a typical example being communication with GPIB devices.
B. Data bit: This is a parameter that measures the actual data bit in the communication. When the computer sends a packet, the actual data is not 8 bits. The standard values are 5, 7, and 8 bits. How you set it up depends on the information you want to send. For example, the standard ASCII code is 0 to 127 (7 bits). The extended ASCII code is 0 to 255 (8 bits). If the data uses simple text (standard ASCII), then 7 bits of data are used per packet. Each packet is one byte and includes start/stop bits, data bits, and parity bits. Since the actual data bits depending on the choice of communication protocol, the term "packet" refers to any instance of communication.
C. Stop bit: used to represent the last bit of a single packet. Typical values are 1, 1.5, and 2 bits. Since the data is clocked on the transmission line and each device has its own clock, it is likely that there will be a small asynchrony between the two devices in the communication. The stop bit thus not only indicates the end of the transmission but also provides an opportunity for the computer to correct the clock synchronization. The greater the number of bits available for stop bits, the greater the tolerance for different clock synchronizations, but the slower the data transfer rate at the same time.
D. Parity bit: a simple error detection method in serial communication. There are four types of error detection: even, odd, high, and low. Of course, no check bit is also possible. For even and odd parity, the serial port sets the check bit (the bit following the data bit) with a value that ensures that the transmitted data has either an even or odd number of logic high bits. For example, if the data is 011, then for an even parity, the parity bit is 0, and the number of bits guaranteed to be logic high is an even number. If it is odd parity, the parity bit is set to 1, so there are three logic high bits. The high and low bits do not actually check the data, but simply set the logic high or logic low check. This allows the receiving device to know the state of a bit and has the opportunity to determine if noise is interfering with the communication or if the transmitted and received data are out of sync.
- |
- +1 赞 0
- 收藏
- 评论 0
本文由Vicky转载自usr News,原文标题为:The principle of serial communication,本站所有转载文章系出于传递更多信息之目的,且明确注明来源,不希望被转载的媒体或个人可与我们联系,我们将立即进行删除处理。
相关推荐
【技术】串口服务器组网有什么优势
串口服务器,说白了就是个提供被动传输数据的中转站,通过其自身所带有的可连接性,可同时连接计算机的Web服务器与串口端口。帮助串口与网络形成交互联系,并实行数据的双向透明的数据传输效果。本文介绍串口服务器的作用和优点。
【技术】有人物联解析RS485串口服务器的功能有什么特别之处
串口服务器是一款工业级串口服务器设备,拥有高规格的电气保护,ISO9001国际质量认证,采用协议栈技术,不宕机、不死机、数据不丢失,整机2年质保,技术支持终身服务,在-40℃~85℃环境下可运行,进口芯片,独立CPU。RS485串口转以太网,5-36V宽电压供电,软件+硬件+CPU三级看门狗稳定不宕机。
What Are The Advantages of A Communication Module That Is Compatible with Both SUB-GHz and 2.4G Communication?
This paper mainly introduces the advantages of G-NiceRF‘s LoRa1211 communication module products compatible with both SUB-GHz and 2.4G communication
有人物联(usr)以太网系列产品选型指南
描述- 山东有人物联网股份有限公司定位“可信赖的智慧工业物联网伙伴”,以“连接价值、价值连接”为使命,深耕工业联网产业价值链上下游,专注于通讯产品的研发、生产及销售,是业内领先的工业物联网软硬件解决方案服务商。集团现拥有员工600余人,已累计融资近2亿元,拥有自建工厂,具备从芯片到云端的全产业链服务能力。致力于为客户提供通讯终端、物联网模块、云平台服务及物联网解决方案。
型号- USR-W600,USR-K7,USR-K6,USR-N510,USR-CANET200,USR-TCP232-T2,USR-SDR080,USR-SDR160,USR-SDR041,USR-M511,USR-SDR021,USR-N668,USR-TCP232-ED2,USR-TCP232-E2,USR-N540,USR-N520,USR-N580,USR-W630,USR-W610,USR-TCP232-S2,USR-SDR050,USR-TCP232-306,USR-TCP232-410S,USR-TCP232-304,USR-TCP232-302
有人物联网双网口8串口的串口服务器USR-N580,独特的工业功能支持,支持Modbus网关功能
为了能为客户降低成本和减少布线难度,有人物联网研发出了一款双网口8串口的串口服务器,专门应用于多设备联网的复杂环境。八串口服务器USR-N580,是用来将TCP/UDP数据包与RS485接口实现数据透明传输的设备。 独特的工业功能支持,支持Modbus网关功能,更加方便工业现场使用。 支持网络打印,打印机行业使用更加方便。
有人物联(usr)通信网关/通信模组/交换机选型指南(中文)
描述- 国内领先的工业物联网软硬件解决方案服务商
型号- USR-S100-WS4W-CA,USR-SDR050-L,N520,USR-DR512,USR-SF1008,USR-SF1005,USR-PLCNET-510,USR-DR514,USR-DL216-L,USR-ISG008P,USR-LG206-L,IO0080,USR-DR185,IO808(CAT-1),USR-S100-GU4D-CA,N510,USR-ISG,USR-N520,USR-W610,USR-IO34,USR-IO0440,AC1000,USR-DR504,USR-DR502,IO808(EWR),USR-G805S,USR-M100-HM,USR-S100-GU4G-CA,USR-ISG208P-SFP,USR-G806R,DR185,N540,USR-D24-15,USR-M300,USR-N510,USR-DR134,USR--TCP232-30X,USR-DR132,USR-TCP232-T0,USR-TCP232-T1,USR-G780S,USR-ISG005,AP520X,USR-G806W,IO424T-EWR,USR-TCP232-E2,USR-G806S,WH-L101-L,USR-N580,ST515N,NR310I,USR-G780,USR-G781,IO808,USR-DR404,USR-DR206-L,USR-ISG系列,USR-D12-54,USR-S100,USR-DR152,USR-K5,USR-G817,USR-W660,USR-IO0404,WH-GM800,USR-N5X0,USR-DR154,USR-SG,USR-D24-36,USR-SG系列,G810,USR-PLCNET-310,USR-G771,WH-GM5,USR-DR30X,ST508E,G817,G816,USR-G816,AP530X,USR-G815,USR-TCP232-ED2,USR-G809,USR-S100-GU4H-CA,IO0440,USR-IO8000,USR-DR13X,USR-DR302,USR-DR301,AP310I,USR-TCP232-S1,USR-IO4040,USR-IO0080,NR530X,USR-TCP232-304,USR-G805,USR-M100-ARD,USR-S1210P,G806W,USR-LG210-L,USR-M100,USR-S100-WL4J-CA,USR-FQ610,USR-EG818,USR-PLCNET-210,USR-N668,USR-D24-60,USR-W630S,USR-LG207-L,USR-D12-24,AC200,IO424T-CAT-1,USR-N540,WH-LTE-7S1,WH-LTE-7S0,USR-IO34(CAT-1),USR-SG1008,USR-D12-15,N580,USR-SG1005,USR-TCP232-410S,NR520X
USR-N510, USR-N520, USR-N540, USR-N580 USR Cortex-M7 Series Serial to Ethernet Device Server AT Command manual
型号- USR-N540,USR-N520,USR-N510,USR-N580
有人物联亮相2023中国(山东)储能高质量发展大会暨展览会
本次展会上,有人物联主要展出了5G/WiFi6/4G工业路由器、边缘网关、数传DTU等重点产品、明星产品物联网控制器M300,以及光伏储能的相关联网新产品、新方案,吸引众多参观者驻足交流。
电子商城
登录 | 立即注册
提交评论