Page 1 of 1
ULP DS18B20 1-Wire code
Posted: Wed Mar 14, 2018 8:18 pm
by fhng11214
Wrote ULP assembly code to get temperature from a DS18B20 to save energy. Its for learning purpose. In case someone is new and wants to learn ULP, it is pretty simple to read. Feel free to ask question.
https://github.com/fhng/ESP32-ULP-1-Wire/
Re: ULP DS18B20 1-Wire code
Posted: Thu Mar 15, 2018 2:53 am
by WiFive
Thanks for sharing!
Re: ULP DS18B20 1-Wire code
Posted: Mon Mar 19, 2018 7:41 pm
by Nespressif
Thank you very much for your code. I hope to test the code soon and if I have any questions, I'll let you know.
Greetings
Re: ULP DS18B20 1-Wire code
Posted: Fri Apr 06, 2018 8:00 pm
by fhng11214
Added a few more subroutines since then. Before it was a single DS18B20 environment without CRC8 checking. Now it can talk to multiple DS18b20 and has CRC8 checking. But it is a lot more messy and harder to read. Overall, great learning experience.
-- search_rom - look for 64bit Rom Identification of devices on the bus. (tested with two DS18B20, I only have two) (this should run on main CPU and in C but it was fun to do it in assembly)
-- checkCRC8_bytes - crc8-maxium checking against RomID or Scratchpad memory.
-- read_romid_single_device -not very useful
-- send_rom_id - For talking to multiple DS18b20
*remember there is a 8K memory limits.
Hi Nespressif and WiFive.