-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Write to registers #5
Comments
hi.
There are 3 registers for you to read&write(1 BYTE TH REGISTER ,1 BYTE TL REGISTER ,1 BYTE CONFIGURATION REGISTER),and when you trying to write to the registers,you shoud know the write timing sequence ,before you start write data ,you shoud set the I/O pin to low for more than 1us and less than 15us as the start signal,then set to hight more than 45us and less than 105us if this bit is 1 (of cause,if this bit is 0,just keep low more than 45us and less than 105us after the start signal),then you must set the I/O pin to hight more than 1us,that's the whole timing sequence to write 1 bit .then you can write data bit by bit.
for example:
if you want to set TH to 50°C,you shoud write 1 byte 0x4E,then write 1 byte 0x32.
…------------------ 原始邮件 ------------------
发件人: "feelfreelinux/ds18b20" <[email protected]>;
发送时间: 2020年10月29日(星期四) 晚上10:28
收件人: "feelfreelinux/ds18b20"<[email protected]>;
抄送: "Subscribed"<[email protected]>;
主题: [feelfreelinux/ds18b20] Write to registers (#5)
Hi there.
Sorry for the noobie question and the poor english, but could you tell me how can I write to the DS18B20 registers with this library? Such as set the alarm, check the address and so. Reading the temperature is cool, but the datasheet says that this little guy is able to do more!
Thanks!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Wow, thank you for the answer, it was exactly what I needed. Just to be sure, all this you described can be done with the instruction ds18b20_send_byte() of the same library, isn't it? Thank you again for the answer and to Feelfreelinux for the good library! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi there.
Sorry for the noobie question and the poor english, but could you tell me how can I write to the DS18B20 registers with this library? Such as set the alarm, check the address and so. Reading the temperature is cool, but the datasheet says that this little guy is able to do more!
Thanks!
The text was updated successfully, but these errors were encountered: