ULP DS18B20 1-Wire code
ULP DS18B20 1-Wire code
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
Thanks for sharing!
-
- Posts: 76
- Joined: Tue Sep 12, 2017 11:25 am
Re: ULP DS18B20 1-Wire code
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
Greetings
Re: ULP DS18B20 1-Wire code
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.
-- 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.
Who is online
Users browsing this forum: No registered users and 51 guests