当前位置:网站首页>Serial port-rs232-rs485-ttl
Serial port-rs232-rs485-ttl
2022-07-06 03:38:00 【woshizuopie】
A serial port 、RS-232
Engineer explains serial port :RS-232、RS-422、RS-485 The difference between
A serial port 、COM mouth 、UART mouth , TTL、RS-232、RS-485 Detailed explanation
First , A serial port 、UART mouth 、COM mouth 、USB Port refers to the form of physical interface ( Hardware ). and TTL、RS-232、RS-485 It refers to the level standard of ( Electrical signals ).
A serial port : Serial port is a general term ,UART、TTL、RS232、RS485 They all follow similar communication timing protocols , So they are called serial ports .
UART Interface : Universal asynchronous transceiver (Universal Asynchronous Receiver/Transmitter),UART It is the logic circuit of serial port transceiver , This part can be made into a chip , It can also be embedded into other chips as a module , Single chip microcomputer 、SOC、PC There's going to be UART modular .
COM mouth : Especially on a desktop computer or some electronic device D-SUB shape ( A connector structure ,VGA The connector of the interface is also D-SUB) The serial communication port of , The serial communication timing and RS232 The logic level of .
USB mouth : Universal serial bus , And serial port are two concepts . Although it's also serial communication , But because of USB The communication timing and signal level are completely different from serial port , So it has nothing to do with the serial port .USB It's a high-speed communication interface , be used for PC Connect all kinds of peripherals ,U disc 、 Key mouse 、 mobile hard disk drive 、 And of course “USB To serial port ” Module .(USB Serial port module , Namely USB Interface UART modular )
TTL: When we communicate through serial port , Basically, those directly from the single chip microcomputer are TTL level .
TTL level : full duplex ( Logic 1:2.4V-5V; Logic 0:0V-5V)
The hardware block diagram is as follows ,TTL For two MCU Inter communication .
RS-232: full duplex ( Logic 1:-15V-5V; Logic 0:3V-15V)
The hardware block diagram is as follows ,RS-232 be used for MCU and PC Inter machine communication .
RS485:RS485 Is a serial interface standard , For long distance transmission, differential transmission is adopted , It's a differential signal , The anti-jamming ability is better than RS232 Much better . The pressure difference between the two lines is -(2-6)V Express 0, The pressure difference between the two lines is +(2-6)V Express 1.
RS-485: Half duplex 、( Logic 1:+2V–+6V Logic 0: -6V—2V) The level here refers to AB The voltage difference between the two wires .
A serial port
Generally, there are two standards :D type 9 Pin plug 、4 Needle Du Bangtou .
It's common on circuit boards , Often with DuPont pins . And sometimes there's a fifth needle ,3.3V The power side .
Embedded serial port , Generally refer to UART mouth .UART Yes 4 individual pin(VCC、GND、RX、TX), With TTL level , The low level is 0(0V), The high level is 1(3.3V Or more ).
2.D type 9 Pin serial port (DB9):
There are only two protocols for this interface :RS-232 and RS-485, Will not be TTL. Generally, only RXD、TXD Two stitches , Plus GND.
The basic principle of serial communication
Reference resources 【STM32】 The basic principle of serial communication
The communication mode between devices is generally : Parallel communication 、 There are two kinds of serial communication .
Serial communication classification :
1. It is divided into :
· Simplex : Only data transmission in one direction is supported ;
· Half duplex : Allow data to be transmitted in both directions , But only one direction is allowed at a certain time , It's actually a kind of direction switching simplex communication ;
· full duplex : Allows data to be transmitted in both directions at the same time .
2. It can be divided into :
· Synchronous communication : With clock synchronous signal transmission , Such as SPI、IIC communication interface .
· asynchronous communication : No clock synchronization , Such as UART( Universal asynchronous transceiver )、 Single bus .
In synchronous communication , A signal line will be used above the transceiver to transmit signals , Driven by the clock signal, the two sides coordinate , Synchronous data . for example , In communication, both parties usually uniformly stipulate to sample the data line on the rising or falling edge of the clock signal .
In asynchronous communication, clock signal is not used for data synchronization , They directly insert some signal bits for synchronization into the data signal , Or package the subject data , Transmit data in the format of data frames . In communication, both parties need to regulate the data transmission rate ( That's baud rate ) etc. , To better synchronize . Common baud rates are 4800bps、9600bps、115200bps etc. .
Connection between two chips :TTL Level communication .
Chip and PC machine ( Or host computer ) Connected to a : Usually PC machine ( Or host computer ) It uses RS232 Interface , So to make the chip and PC The machine RS232 Interface direct communication , It needs to be realized through level conversion circuit first TTL Level vs RS232 Conversion between levels .
边栏推荐
- A brief introduction to symbols and link libraries in C language
- Microkernel structure understanding
- User experience index system
- Failure causes and optimization methods of LTE CSFB
- UDP reliable transport protocol (quic)
- RT-Thread--Lwip之FTP(2)
- February 14, 2022 Daily: Google long article summarizes the experience of building four generations of TPU
- Schnuka: visual positioning system working principle of visual positioning system
- [Qt5] QT QWidget immediately appears and disappears
- 【SLAM】ORB-SLAM3解析——跟踪Track()(3)
猜你喜欢
Tidb ecological tools (backup, migration, import / export) collation
指针笔试题~走近大厂
Mysqldump data backup
记录一下逆向任务管理器的过程
Safety science to | travel, you must read a guide
canvas切积木小游戏代码
mysql从一个连续时间段的表中读取缺少数据
[Massey] Massey font format and typesetting requirements
Force buckle 1189 Maximum number of "balloons"
2.13 weekly report
随机推荐
Performance analysis of user login TPS low and CPU full
[risc-v] external interrupt
Esbuild & SWC: a new generation of construction tools
下一个行业风口:NFT 数字藏品,是机遇还是泡沫?
Recommended foreign websites for programmers to learn
svg拖动点裁剪图片js特效
Overview of super-resolution reconstruction of remote sensing images
Arabellacpc 2019 (supplementary question)
[Qt5] QT QWidget immediately appears and disappears
An article will give you a comprehensive understanding of the internal and external components of "computer"
BUAA计算器(表达式计算-表达式树实现)
Pointer written test questions ~ approaching Dachang
[padding] an error is reported in the prediction after loading the model weight attributeerror: 'model' object has no attribute '_ place‘
[rust notes] 18 macro
Leetcode problem solving -- 108 Convert an ordered array into a binary search tree
mysqldump数据备份
3.2 detailed explanation of rtthread serial port device (V2)
BUAA magpie nesting
Tidb ecological tools (backup, migration, import / export) collation
Schnuka: 3D vision detection application industry machine vision 3D detection