当前位置:网站首页>Remote serial port server (adapter) UART to 1-wire application
Remote serial port server (adapter) UART to 1-wire application
2022-07-28 15:57:00 【Hebei stable control technology】

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 )
边栏推荐
- 记:数字累加动画
- 太阳能路灯的根本结构及作业原理
- 2.855 billion yuan! Qingdao Xinen completed the capital increase: Xingcheng Jidian became the largest shareholder, holding 57.10%
- Youdao cloud notes remove the bottom advertisement
- How to build opengrok code server
- 0-75mV/0-100mV转RS485/232通讯接口MODBUS RTU采集模块IBF8
- 2021 肯特面试题3
- A tour of gRPC:05 - gRPC server straming 服务端流
- How to compress and decompress ramdisk.img
- NTC,PT100热电阻转4-20mA温度信号转换器
猜你喜欢

多用型混合信号8AI/4DI/DO转串口RS485/232MODBUS采集模块IBF30

0-75mv/0-100mv to rs485/232 communication interface Modbus RTU acquisition module ibf8

Solve the problem that the right-click menu "edit with idle" of the 『 py 』 file is invalid or missing

高速计数器转RS485Modbus RTU模块IBF150

Multipurpose mixed signal 8ai/4di/do to serial port rs485/232modbus acquisition module ibf30

【微信小程序开发(七)】订阅消息

MicTR01 Tester 开发套件(振弦采集读数仪)使用说明

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

Summary of for loop in JS

JS linked list 01
随机推荐
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
远距离串口服务器( 适配器)UART/I2C/1-Wire/SPI PS304常见问题及注意事项
Voice social system -- improve the audio system industry chain
光学雨量计对比翻斗式雨量计的优势
Software architecture and design (II) -- Architecture Model
How to effectively conduct the review meeting (Part 1)?
Rxdart is used instead of stateful in fluent
Camera continuous shooting automatic test shell script
Flutter中是使用RxDart代替Stateful
Shell programming specifications and variables
5路DI/DO继电器输出远程IO采集模块Modbus TCP/IBF95
js 优先级队列
2-channel Di high-speed pulse counter, 1-channel encoder to Modbus TCP wired wireless module ibf161
PyQt5快速开发与实战 5.2 容器:装载更多的控件
光学雨量计应用降雨量检测
[live broadcast reservation] a new challenge under the evolution of data architecture - Shanghai railway station
A failed cracking experience
Remember the common JS methods of projects
How as makes intelligent prompts regardless of case
Knowledge points qwer