It might be more difficult to make a generic driver for but I've had some
great success using a UART peripheral to read/write 1 wire devices. There's
a good writeup of how this works in this app note:
https://www.maximintegrated.com/en/app-notes/index.mvp/id/214

The benefit is less CPU time needed for bit banging but you need to make
sure your 1 wire device fits the timing constraints of your UART peripheral.

Just thought it was worth mentioning, might be something to consider.

Sam



On Tue., 3 Jul. 2018, 6:11 am Kevin Townsend, <ke...@adafruit.com.invalid>
wrote:

> Hi Miguel,
>
> Good to hear!
>
> Yeah, GPIO is the only way I've ever implemented this and I think a
> simple SW implementation is the way to go here.
>
> K.
>
>
> On 02/07/18 21:39, Miguel Azevedo wrote:
> > Hi Kevin,
> > I actually do have some code for 1-wire I implemented a few days ago.
> > AFAIK most MCUs we support don't have 1-wire specific hardware, so why
> > not have a general implementation(using hal_timer) instead of one
> > implementation per MCU?
> >
> > Thanks,
> >
> > Miguel
> > On Mon, Jul 2, 2018 at 8:10 PM Kevin Townsend
> > <ke...@adafruit.com.invalid> wrote:
> >> Is there any interest is discussing how to add Dallas 1-Wire support to
> >> the HAL? https://en.wikipedia.org/wiki/1-Wire
> >>
> >> It's a bit of a niche item, but an interesting protocol (you can power
> >> some devices from the single GPIO line) and there are some very common
> >> and cheap waterproof temp sensors and a few other common items that are
> >> only available in 1 wire.
> >>
> >> I'm happy to put one or two test drivers together for common items like
> >> the DS18B20 (https://www.adafruit.com/product/381) ... but the HAL
> >> implementation is something that should probably be discussed with the
> >> wider community first.
> >>
> >> Kevin
> >>
> >
>
>

Reply via email to