极客工坊

 找回密码
 注册

QQ登录

只需一步,快速开始

12
返回列表 发新帖
楼主: Super169

请求 ESP32 增加串口的方案

[复制链接]
 楼主| 发表于 2018-9-6 20:55:44 | 显示全部楼层
eddiewwm 发表于 2018-9-4 11:29
SECRET SERIAL PORT FOR ARDUINO/ESP32
https://hackaday.com/2017/08/17/secret-serial-port-for-arduino ...

Thanks a lot.
其实我知道怎样用那几个 UART 的, 只是真正用的时候, 其中一个太多杂讯, 所以结果只可以用两个.  网上找到的方法, 好像都不行.

不过, 我对 DS18B20 很有兴趣, 就是用 OneWire 库做单线收发.
但我一直不明白, OneWire 是否有固定的 baud rate 的?  我一直找不到怎样调校速度.
也不明白, OneWire 是怎样知道何时有回传, 好像不是用 interrupt 去等待, 也不是用 polling 的方式.
回复 支持 反对

使用道具 举报

发表于 2018-9-7 09:39:38 | 显示全部楼层
OneWire 是否有固定的 baud rate 的?
Baudrate of DS18B20  :  https://electronics.stackexchang ... baudrate-of-ds18b20
"Are you trying to interface it to a UART? The 1-wire protocol is significantly different and while I believe you can fudge it with a UART it's not the usual way you'd interface to one. – PeterJ Dec 30 "

OneWire 是怎样知道何时有回传
Refer to datasheet: "Communication to the DS18B20 is via a 1-Wire port. With the 1-Wire port, the memory and control
functions will not be available before the ROM function protocol has been established. The master must
first provide one of five ROM function commands: 1) Read ROM, 2) Match ROM, 3) Search ROM, 4)
Skip ROM, or 5) Alarm Search.
.........
NOTES:
1. Temperature conversion takes up to 750 ms. After receiving the Convert T protocol, if the part does
not receive power from the VDD pin, the DQ line for the DS18B20 must be held high for at least a
period greater than tconv to provide power during the conversion process. As such, no other activity
may take place on the 1-Wire bus for at least this period after a Convert T command has been issued.
2. After receiving the Copy Scratchpad protocol, if the part does not receive power from the VDD pin, the
DQ line for the DS18B20 must be held high for at least 10 ms to provide power during the copy
process. As such, no other activity may take place on the 1-Wire bus for at least this period after a
Copy Scratchpad command has been issued.
3. All 3 bytes must be written before a reset is issued."

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则 需要先绑定手机号

Archiver|联系我们|极客工坊

GMT+8, 2024-4-27 18:49 , Processed in 0.041311 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表