当前位置:网站首页>USB to RS485 serial port circuit design "suggestions collection"
USB to RS485 serial port circuit design "suggestions collection"
2022-06-29 10:53:00 【Full stack programmer webmaster】
Hello everyone , I meet you again , I'm your friend, Quan Jun .
USB The serial port signal of the serial port chip is generally TTL/CMOS level , In half duplex RS485 External connection is required for serial port 485 Level conversion chip , Design A signal is required to control 485 Transmit and receive enable end of the transfer chip , It is recommended to choose to bring 485 Switching chip of control pin ( Such as CH340/CH342 Series of chips TNOW Pin ), This pin defaults to low level , When the serial port is in the sending state, it will be automatically raised to be in the effective state , The transmission is completed and then the low level is restored . Empathy , It can be extended to other application scenarios , Such as MCU serial port to 485 Can be used in circuit design GPIO Mouth to control 485 Transmit and receive enable of the transfer chip .
With MAX485 For example :
1. DE Enable... For sending ,RE Enable... For reception ,DI by TTL/CMOS Serial transmission ,RO by TTL/CMOS A serial port to receive .
2. TNOW Control signal pins are connected at the same time DE and RE; In the serial port sending state ,TNOW Output high level , open DE Receive enable ; When the serial port does not send ,TNOW Output low level , The default RE Receive enable ;
common problem Q&A
Q: The serial port often receives 0x00 Bit error value ?
A: In the receive enable state , commonly 485 Of A and B The signal terminal is in high resistance state , In the process of transmitting and receiving A and B The signal remains , Did not return to idle state . Lead to RO End sampling error . here , stay A Terminate a pull-up resistor ,B Terminate a pull-down resistor , The resistance value shall be calculated according to the manual and practical application .
Q:AB Whether the terminal needs parallel terminal matching resistance ?
A: According to the manual , At present, many chips are built-in 120 Ohm matching resistance , It's not a mandatory option .
Q: How to calculate the number of cascade devices ?
A: It shall be determined according to the received input impedance marked in the manual , Generally, the maximum number of transceivers allowed will also be directly marked .
Application circuit 1
The following figure shows the use of the built-in TNOW Pin 485 Control signal USB Switch to dual serial chip CH342F Designed two-way RS485 Serial port circuit :
notes :CH342F Of DTR When the pin is connected to the pull-down resistor, it will switch to TNOW Pin , Used in the above figure is 4.7K.
Application circuit 2
If the selected model does not 485 Control signals , Use only TXD and RXD Two signal lines 485 The need for circuit switching is also very common . The following is the schematic diagram :
Realization principle : take RE Keep setting 0, Enable receive enable (RE And DE Direct short connection is also possible ), take TXD Reverse post connect send enable end DE.TXD The output is high , Connected 485 The chip send enable is invalid , The bus output is idle ( High level ),TXD Output low level , Send enable is valid . Compared to the application 1, Because there is a triode reverse circuit , The signal output control will have a delay , It is not recommended to use in high baud rate communication .
The above conversion circuit and design principle are in 485 High frequency is used in the conversion circuit , Users can flexibly select according to their needs .
Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/132437.html Link to the original text :https://javaforall.cn
边栏推荐
- JS post download file
- 【C语言进阶】自定义类型
- (JS)数组去除重复
- Cs231n-2022 module1: overview of key points of neural network (2)
- 基于支持向量机的手写数字识别详解(MATLAB GUI代码,提供手写板)
- Mongodb tutorial Chapter 02 mongodb installation
- Ora-01950 does not have permission on tablespace
- “AI x 科学计算”进行时,华为昇思 MindSpore 赛题火热开启,等你来!
- Stm32f1 and stm32subeide programming example - ultrasonic distance sensor drive
- 《MongoDB入门教程》第02篇 MongoDB安装
猜你喜欢

Luoqingqi: has high-end household appliances become a red sea? Casati took the lead in breaking the game

反CSRF爆破的三种姿势

你的项目需要自动化测试吗?

Essential for efficient work: how can testers improve their communication skills?

Buuctf-- happy New Year

Exemples de programmation stm32f1 et stm32cubeide - entraînement du capteur de portée ultrasonique

Fully understand the volatile keyword

加密市场接连爆雷,Celsius能避免破产吗?
![[FreeRTOS] 08 mutex semaphores and priority inversion](/img/16/9715d5599db6ec107c8001fbd70ae2.png)
[FreeRTOS] 08 mutex semaphores and priority inversion

【NLP】文本生成专题1:基础知识
随机推荐
Please tell me about the Flink SQL batch task, two or more tables join (inner join or outer join
Analysis of reentrantlock source code of AQS
Highly paid programmers & interview questions: how to ensure the data consistency between redis cache and database in series 117?
Does your project need automated testing?
With this tool, automatic identification and verification code is no longer a problem
FreeRTOS porting of official website based on keil5 auto configuring STM32F103 standard library
Ningde era Kirin battery has greater ambition
Numeric Keypad
The use and difference of watch listening and computed calculation attributes
如何优雅的写 Controller 层代码?
真正的测试 =“半个产品+半个开发”?
有了这款工具,自动化识别验证码再也不是问题
By asp Net core downloading files according to the path
js post下载文件
(JS)数组排平(flat)
2600 pages in total! Another divine interview manual is available~
Real test = "half product + Half development"?
C language printf family
全面理解Synchronized
你的项目需要自动化测试吗?