当前位置:网站首页>Common problems and precautions of remote serial port server (adapter) uart/i2c/1-wire/spi PS304
Common problems and precautions of remote serial port server (adapter) uart/i2c/1-wire/spi PS304
2022-07-28 15:57:00 【Hebei stable control technology】
PS304(Ports Server channel 4) It is a physical layer protocol repeater of various digital interfaces , Can be realized UART transformation I2C、SPI、 1Wire Telematics , Embedded magnetic isolation dual power supply and auxiliary enhanced power supply circuit 、 Adaptive Cable Algorithm 、 Powerful and flexible S2S Protocol firmware program , String instruction set , Simple user interface . The optimized driver can extend the communication distance to 500~1000 rice . Widely used in electronic equipment development 、 Chip test 、 Industrial digital interface conversion 、 Digital interface learning verification and other fields .

Common problems and precautions
(1) Length of external lead
When connecting external devices or chips with wires , The wire should not be too long , General control at 20CM within , IIC、 SPI、 UART And other digital interface data line driving capacity is limited , Long wires will cause slow communication waveform . When the wire really cannot be shortened , It can be solved by reducing the communication rate 、 Alleviate abnormal communication problems .
(2) IIC Pull up resistance
IIC Bus SDA and SCL It has been connected on the board 2k The pull-up resistance of , When external IIC Device or chip , There is no need to connect the pull-up resistor , When the pull-up resistance of the repeated connection is lower than 1k It will cause failure of normal communication or permanent damage to this product .
(3) UART Communication rate
Modifying the frequency division coefficient of the system clock will cause UART The upper limit of communication rate does not work properly , UART The upper limit of communication rate is inversely proportional to the frequency division parameters , The highest supported communication rate =921600bps/ Frequency division value ( 8 Frequency division time , UART The highest communication rate =921600/8=115200bps), When modifying the system frequency division coefficient , Pay attention to lowering UART The communication rate of , In order to avoid the problem of unable to communicate .
(4) Voltage range
USB2S Support 3.0~5.5V Wide voltage (VCC), Communications and IO(ADC) The lower limit of the maximum withstand voltage of the pin is -0.3V, Cap of 3.6V, W1~W4 The upper limit voltage of the pin is 5.5V, Exceeding the normal voltage range will cause permanent damage to the module . Special attention should be paid to when connecting external test equipment or chips .
(5) Power consumption and burst current
USB2S Its own power is about 50mA, Use USB When supplying power to the interface, it should be noted that the overall power consumption of the connected external chip or device should not exceed 500mA, The sudden change of current at the moment of plugging will cause the voltage to drop and then automatically recover , In the process USB2S It is normal that reset and restart may occur and the connection with the computer is disconnected for a short time . S2STool The tool has the function of detecting hardware and automatically reconnecting . When using other third-party debugging tools , Generally, you can reconnect once after the plug-in operation .
Remote serial server ( Adapter )UART turn 1-Wire application
PS304 Yes 4 Passageway 1Wire Interface , Multiple can be connected to each interface at the same time 1Wire chip ( Or equipment ). have 64 position ID Search function ; It has the adaptive function of long-distance lines .
ID Search and cable adaptation detection
Send... To the module [WIRE1][FIND], The module returns all the... Mounted on the search line 1Wire chip ID And the output , Every ID Occupy 8 byte . give an example : Search channel 1 On all the 1Wire chip , The module returns the following information :S2SREC 28 AA 32 B9 21 20 03 94 2D 85 00 10 20 00 00 7A Total return 16 Bytes of data , Every ID8 byte , So channel 1 There are two on 1Wire chip
chip 1ID: 28 AA 32 B9 21 20 03 94
chip 2ID: 2D 85 00 10 20 00 00 7A
During search , The module will detect the cable parameters , Automatically complete cable adaptation correction . When the 1Wire When there is an error in chip operation , Or change the line length , Or when replacing the cable , The above search operation should be repeated , To get the real-time number of chips and chips ID And the adaptability of the module to the cable performance . notes : generally speaking , The longer the cable, the longer the search process takes .
DS18B20 Temperature sensor
DS18B20 yes 1Wire Interface temperature sensor , Can be realized 12 Temperature conversion and output function of bit accuracy . The use method is briefly described as follows .
(1) Start a temperature conversion
Send to the chip 0xCC 0x44, S2S Agreement for : [WIRE1][START][WT2H]CC 44
(2) Reading temperature
Send to the chip 0xCC 0xBE, Then read 2 Bytes .S2S Agreement for : [WIRE][START][WT2H]CC BE[RD2N]
Module return : S2SREC C8 010x01C8 Convert to 10 Into the system for 456, according to DS18B20 Data book description , The number of *0.0625=28.5℃.
(3) Reading temperature ( Using chip only ID)
[WIRE][START][WT10H]55 28 AA 32 B9 21 20 03 94 BE[RD2N]( The underlined part is the known chip ID)
Module return : S2SREC C8 01
0x01C8 Convert to 10 Into the system for 456, according to DS18B20 Data book description , The number of *0.0625=28.5℃.
DS2431 Memory chips
DS2431 Is a 1024 position 1-Wire EEPROM chip , from Four memory pages , each page 256 position . The data is written into a 8 In byte register , After verification, it is copied to EEPROM Memory . It is characterized by , The four memory pages are independent of each other , You can set write protection or EPROM Simulation mode . Yes 2431 The read-write access of the chip must be in 8 Bytes and the starting address must be 8 Multiple .
(1) Read EEPROM
Send to the chip 0xCC 0xF0+ Two byte starting address , Then read 8 Bytes of data .
example : Read EEPROM The address of 0~8, [WIRE][START][WT4H]CC F0 00 00[RD8N]
Module return : S2SREC 31 32 33 34 35 36 37 38
(2) Write EEPROM
2431 The write operation of is divided into write register and register synchronization to EEPROM Two big steps . Write register : Send to the chip 0xCC 0x0F+ Two byte starting address +8 Bytes of data .[WIRE][START][WT4H]CC 0F 00 00[WT8H]31 32 33 34 35 36 37 38[RD2N]
Module return : S2SREC 52 D7(0x52D7 Is sent for this data CRC Check the data )
Read register : Send to the chip 0xCC 0xAA, read 13 byte (3 A register +8 Byte register data +2 byte CRC)
[WIRE][START][WT2H]CC AA[RD3N][DELAY1][RD10N]
Module return : S2SREC 00 00 07 31 32 33 34 35 36 37 38 66 B2
The register is synchronized to EEPROM: Send to the chip 0xCC 0x55+ Two byte starting address +0x07
Module return : S2SREC AA(0xAA Indicates the synchronization is successful )
边栏推荐
- Zhaoqi scientific innovation and entrepreneurship competition platform, activity roadshow, investment and financing docking
- Multifunctional mixed signal AI acquisition / switching value di/do acquisition to rs485/232/modbus module
- Shell programming specifications and variables
- 光学雨量计应用降雨量检测
- 2021 Yahong pen test question 2
- Pyqt5 rapid development and practice 5.2 container: load more controls
- Youdao cloud notes remove the bottom advertisement
- Remember the common JS methods of projects
- JS linked list 02
- js 双向链表 01
猜你喜欢

2021 Kent interview question 2

Minimum heap improves the efficiency of each sort

光学雨量计应用降雨量检测

Voltage to current / current to voltage module

2021 Yahong pen test question 2

A tour of gRPC:05 - gRPC server straming 服务端流

活动速递| Apache Doris 性能优化实战系列直播课程初公开,诚邀您来参加!

Duty cycle switch output high speed pulse counter rtumodbus module ibf63

DNS domain name resolution protocol

Software architecture and design (x) -- Architecture Technology
随机推荐
Knowledge points qwer
2021 亚鸿笔试题
记项目 常用js方法
【微信小程序开发(七)】订阅消息
Virturalbox solves the problem of kernel driver
Rxdart is used instead of stateful in fluent
Preparing for listing in the United States? Arm announced that it would divest the Internet of things service business: the future will focus on the underlying chip design
How to compress and decompress ramdisk.img
Huawei has a record number of employees worldwide: 194000, with research and development personnel accounting for nearly 50%
Software architecture and design (VII) -- interactive architecture
Zhaoqi scientific innovation and entrepreneurship competition platform, activity roadshow, investment and financing docking
电压频率的变换原理
虚拟机之NAT模式下设置静态IP
Shell programming specifications and variables
Set static IP in NAT mode of virtual machine
光学雨量计应用降雨量检测
屏下指纹价格战再起,二线厂商今年有望拿下30%市场?
太阳能路灯的根本结构及作业原理
How to quickly access the unified authentication system
A wave of operation to solve the error problem of Laya scene editor