Page 1 of 1

OneWire Slave

Posted: Tue Jun 18, 2024 11:14 am
by Alan_37
Hello ,

Can we have a simple OneWire Slave to communicate between 2 or more MCU's
using only OneWire protocol .

Thanks

Alan

Re: OneWire Slave

Posted: Tue Jun 18, 2024 1:17 pm
by mnfisher
Microchip have some interesting bits...

Try https://ww1.microchip.com/downloads/en/ ... 01199a.pdf for example

I also found something about using the USART on PICs to do a 'hardware' implementation

Martin

Re: OneWire Slave

Posted: Thu Jun 20, 2024 11:52 am
by Alan_37
Hi Martin

Wish I had the time to play , but as of now just need quick solution

Cos OneWire was not an option , I2c Slave not working , and the main MCU already have 2 UATR's
in use , I don't really wish to add another .

Hope Matrix will make the OneWire slave component available , or at least fix 12c Slave

Alan

Re: OneWire Slave

Posted: Thu Jun 20, 2024 12:36 pm
by mnfisher
I was going to have a little play - but too often the real stuff gets in the way :-(..

What speed is the target (slave) clocked at? - I don't have a PIC12 to hand, but it might be possible to mark the MCU 'specific' bits (if there are any) - I think it should be okay to do a start timer on pin change down and then check Timer0 on pin up (with a suitable prescaler for Tmr0 - unless you have a very slow clock?)

Martin

Re: OneWire Slave

Posted: Thu Jun 20, 2024 3:42 pm
by Alan_37
Hi

The Pic is running @ 32Mhz internal osc , and for the data speed
there is no specific requirements just need to be able to communicate .

Thanks

Re: OneWire Slave

Posted: Thu Jun 20, 2024 4:10 pm
by kersing
I would go for software uart. Quickest solution.

Re: OneWire Slave

Posted: Thu Jun 20, 2024 4:16 pm
by mnfisher
Surely - if you have enough pins left?

Strangely - UART is 'almost'' one wire comms (I know the reply is on another wire!) - but the receive is purely timing with no clock...

Martin