Loading...
Pages: 1 2 [3]   Go Down
Author Topic: 1-Wire Slave  (Read 8937 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I just started coding similar project, just for fun (the goal is to send serial as slave to another arduino as a master). I can not seem to get the timing right though.

Do you have any ideas for testing?

I started with master library and changing it with the PIC code as an example.

I played with some iButtons and this is my first Arduino project besides lighting LEDs. smiley

Thanks for doing this!
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 118
Posts: 10158
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I started with master library and changing it with the PIC code as an example.

Don't do that.  You can find a ready to use well documented master library here...
http://pjrc.com/teensy/td_libs_OneWire.html

Quote
I just started coding similar project, just for fun

You have a perverse sense of "fun"!   smiley-wink

Quote
Do you have any ideas for testing?

Work in very tiny increments.  Create code that can reliably detect a Reset.  Add code that reliably detects the Device Present pulse.  Add code that reliably determines the end of the Reset.  Et cetera.

Quote
(the goal is to send serial as slave to another arduino as a master). I can not seem to get the timing right though.

The slave timing is definitely tricky.  I've identified three potential problems...

1. Interrupt latency.

2. Master variations.

3. Loose protocol.

Quote
I played with some iButtons and this is my first Arduino project besides lighting LEDs. smiley

An eclectic set.

Quote
Thanks for doing this!

Don't thank me yet!  At the rate I'm going we all may expire before I finish.

This is not very Arduino friendly but I suspect that it works well...
http://old.nabble.com/1wire-slave-codebase-%28AVR%29-td28214218.html
https://github.com/smurfix/owslave
Logged

Germany
Offline Offline
Full Member
***
Karma: 10
Posts: 181
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Did you take a look at this?

http://robocraft.ru/blog/arduino/302.html

Google will help you to translate.
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 118
Posts: 10158
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


I had not seen that.  Thank you for the tip.
Logged

Germany
Offline Offline
Full Member
***
Karma: 10
Posts: 181
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


I had not seen that.  Thank you for the tip.

Not for that i've seen that few days ago, i'am looking too, to get an emulation of an 1-Wire Slave, this looks like the most simple projekt, for other typs of devices the libary must expand in my opinion, bevor i've seen that i was thinking about an interrupt driven lib, in combination with an final state maschine but this would be to complex. But this modified lib looks nice maybe with some extra code for different typs of devices and "jump marks" it can be an solution for 1-Wire Slaves. So that you tell the lib what it is and only the conf or informations would be set in the Sketches.

B.R.

Markus
Logged

Pages: 1 2 [3]   Go Up
Print
 
Jump to: