Super169 发表于 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 的方式.

eddiewwm 发表于 2018-9-7 09:39:38

OneWire 是否有固定的 baud rate 的?
Baudrate of DS18B20:https://electronics.stackexchange.com/questions/94961/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."
页: 1 [2]
查看完整版本: 请求 ESP32 增加串口的方案