OneWire Slave

Post here to discuss any new features, components, chips, etc, that you would like to see in Flowcode.
Post Reply
Alan_37
Posts: 170
http://meble-kuchenne.info.pl
Joined: Thu Dec 03, 2020 7:23 pm
Has thanked: 51 times
Been thanked: 22 times

Flowcode v10 OneWire Slave

Post 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

mnfisher
Valued Contributor
Posts: 1133
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 114 times
Been thanked: 596 times

Re: OneWire Slave

Post 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

Alan_37
Posts: 170
Joined: Thu Dec 03, 2020 7:23 pm
Has thanked: 51 times
Been thanked: 22 times

Re: OneWire Slave

Post 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

mnfisher
Valued Contributor
Posts: 1133
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 114 times
Been thanked: 596 times

Re: OneWire Slave

Post 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

Alan_37
Posts: 170
Joined: Thu Dec 03, 2020 7:23 pm
Has thanked: 51 times
Been thanked: 22 times

Re: OneWire Slave

Post 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

kersing
Valued Contributor
Posts: 180
Joined: Wed Dec 02, 2020 7:28 pm
Has thanked: 73 times
Been thanked: 63 times

Re: OneWire Slave

Post by kersing »

I would go for software uart. Quickest solution.

mnfisher
Valued Contributor
Posts: 1133
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 114 times
Been thanked: 596 times

Re: OneWire Slave

Post 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

Post Reply