Espressif NONSDK OneWire implementation

AgentSmithers
Posts: 195
Joined: Sat Apr 01, 2017 1:21 am
Contact:

Espressif NONSDK OneWire implementation

Postby AgentSmithers » Tue Apr 04, 2017 8:40 am

Anyone know of a small library for OneWire integration fr the DHT11. THe DeviceHive I looked at seems bulking and for RTOS?
Any pointers would be appreciated.
Thank you everyone!
-Agent

pratik

Re: Espressif NONSDK OneWire implementation

Postby pratik » Wed Apr 05, 2017 2:48 pm

No idea if a library exists for this or not, but because bit durations are different, it should be pretty easy to make a library for this one in the official ESP8266 SDK or Open SDK.
This one-wire bus seems to share characteristics of Manchester encoding, but with different time duration for 0 and 1, so should be easy to get it up with GPIO interrupts and timer.
I'd recommend looking up on GitHub or getting freelancing help if you want to integrate this with AT command firmware, etc.

AgentSmithers
Posts: 195
Joined: Sat Apr 01, 2017 1:21 am
Contact:

Re: Espressif NONSDK OneWire implementation

Postby AgentSmithers » Thu Apr 06, 2017 1:11 am

Yes, Thank you. I found a couple Hotlinks here.
https://github.com/mathew-hall/esp8266- ... /ds18b20.c
https://github.com/n0bel/esp8266-UdpTem ... /ds18b20.c
https://github.com/rogerclarkmelbourne/ ... _digital.c


I am using the DHT11, Does the one Wire Protocol itself change from device to device, such as the timing in microsecond, or is it a specific standard? It appears the standard I was looking at is located here https://en.wikipedia.org/wiki/1-Wire.

pratik

Re: Espressif NONSDK OneWire implementation

Postby pratik » Fri Apr 07, 2017 2:24 pm

I would expect the signals to be as described in the device datasheet, that's the place to consult for timing information. The information on Wikipedia is not something you should rely on.
I would expect the timing jitter across the same type of device, say by a few microseconds.
So please do not use a hard count for timing one-wire buses, for example, if 400us = logic 1, your program should treat everything between 370us and 430us as logic 1.

Who is online

Users browsing this forum: No registered users and 60 guests