当前位置:网站首页>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 )
边栏推荐
- 2021 Yahong pen test question 2
- 高速计数器转RS485Modbus RTU模块IBF150
- 射频模块无线收发RF63U芯片应用数据传输和基建网络
- 多功能混合信号AI采集/开关量DI/DO采集转RS485/232/MODBUS模块
- IFD-x 微型红外成像仪(模块)的温度测量和成像精度
- Docker implements redis cluster mode hash slot partition for 100 million level data storage
- 分体式测斜探头安装要点及注意事项
- shell编程规范与变量
- js 优先级队列
- Shell programming specifications and variables
猜你喜欢

低成本/小体积模块RS485/232转模拟信号的原理以及应用IBF33

js 数组(总结)

2021 Yahong pen test question 2

IFD-x 微型红外成像仪(模块)的温度测量和成像精度

【直播预约】数据架构演进下的新挑战——上海站

热敏电阻PT100,NTC转0-10V/4-20mA转换器

Thermistor PT100, NTC to 0-10v/4-20ma converter

2021 肯特面试题3

Software architecture and design (IV) -- data flow architecture

5-channel di/do relay output remote IO acquisition module Modbus tcp/ibf95
随机推荐
IFD-x 微型红外成像仪(模块)的温度测量和成像精度
Docker container implements MySQL master-slave replication
2.855 billion yuan! Qingdao Xinen completed the capital increase: Xingcheng Jidian became the largest shareholder, holding 57.10%
Proportional solenoid valve control valve 4-20mA to 0-165ma/330ma signal isolation amplifier
Where is the RDS MySQL read-only instance of Alibaba cloud created
Thermistor PT100, NTC to 0-10v/4-20ma converter
2021 Kent interview question 3
屏下指纹价格战再起,二线厂商今年有望拿下30%市场?
JS array (summary)
Software architecture and design (VI) -- hierarchy
振弦采集模块测量振弦传感器的流程步骤?
阿里云的rds mysql 只读实例在哪里创建
2路DI高速脉冲计数器1路编码器转Modbus TCP有线无线模块IBF161
兆骑科创创业大赛平台,活动路演,投融资对接
[wechat applet development (VII)] subscription message
1路编码器2路DI转速测量RS485串口连接1路DO报警模块IBF151
DNS domain name resolution protocol
开光量输入/继电器输出rs485/232远程数据采集IO模块IBF70
js 双向链表 01
How to quickly access the unified authentication system