当前位置:网站首页>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 .
边栏推荐
- [slam] orb-slam3 parsing - track () (3)
- The real machine cannot access the shooting range of the virtual machine, and the real machine cannot Ping the virtual machine
- Restful style
- How to write compile scripts compatible with arm and x86 (Makefile, cmakelists.txt, shell script)
- On Data Mining
- Factors affecting user perception
- Crazy, thousands of netizens are exploding the company's salary
- Pytorch基础——(1)张量(tensor)的初始化
- Image super-resolution using deep convolutional networks(SRCNN)解读与实现
- Canvas cut blocks game code
猜你喜欢
2.1 rtthread pin设备详解
LTE CSFB test analysis
[Li Kou] the second set of the 280 Li Kou weekly match
How do we make money in agriculture, rural areas and farmers? 100% for reference
【SLAM】lidar-camera外参标定(港大MarsLab)无需二维码标定板
js凡客banner轮播图js特效
BUAA喜鹊筑巢
SAP ALV单元格级别设置颜色
Image super-resolution using deep convolutional networks(SRCNN)解读与实现
2.13 weekly report
随机推荐
[slam] lidar camera external parameter calibration (Hong Kong University marslab) does not need a QR code calibration board
施努卡:3d视觉检测应用行业 机器视觉3d检测
Indicator system of KQI and KPI
Mysqldump data backup
pytorch加载数据
Idea push rejected solution
[rust notes] 18 macro
Tomb. Weekly update of Finance (February 7 - February 13)
[Qt5] QT QWidget immediately appears and disappears
[slam] orb-slam3 parsing - track () (3)
Lua uses require to load the shared library successfully, but the return is Boolean (always true)
遥感图像超分辨率论文推荐
Failure causes and optimization methods of LTE CSFB
Microkernel structure understanding
UDP reliable transport protocol (quic)
Edcircles: a real time circle detector with a false detection control translation
Factors affecting user perception
【Qt5】Qt QWidget立刻出现并消失
ArabellaCPC 2019(补题)
Codeforces Global Round 19