EmbeddedRelated.com
Forums

1-wire protocol functions -Dont work, why ?

Started by madid87 August 18, 2006
At 02:21 PM 8/18/2006 -0400, subscript,,, wrote:
>You'll need more that that. One-wire requires that the slave can pull the
>line down (there are other requirements relating to drive currents etc..)
>so yo cannot drive it high during the off periods. There are a number of
>circuits lying around. If I get a chance this weekend I'll try to post the
>one I've been using.

I[ve looked up the circuit I've used and I'll quote the message I sent to
the list in June

>I just did a quick and dirty app note showing such a circuit
>http://www.aeolusdevelopment.com/AppNotes/one-wireapp.pdf
>
>It takes 3 pins but that does include an optional strong pull-up. It's
>the same circuit the one-wire library port I did uses, the driving
>routines are on the same site.
>
>I really do mean quick and dirty, it's missing component and value
>information. I'll try to pretty it up and comment it properly. Google
>around there are a number of circuits out there.

I've not had the time to fill it out yet but it's a start.

Robert

http://www.aeolusdevelopment.com/

From the Divided by a Common Language File (Edited to protect the guilty)
ME - "I'd like to get Price and delivery for connector Part # XXXXX"
Dist./Rep - "$X.XX Lead time 37 days"
ME - "Anything we can do about lead time? 37 days seems a bit high."
Dist./Rep - "that is the lead time given because our stock is live.... we
currently have stock."

An Engineer's Guide to the LPC2100 Series

Here was the problem.

int init_ds1820(void)
{
IODIR0=0x01; // P0.0 out
IOCLR0=0x01; // Low level
delayus(500);
IODIR0=0x00; // Free line
delayus(100);
if(!(IOPIN0 & 1))
return 1; !!!!! BUG !!!!
delayus(500);
return 0;
}

Notice that there is no 500us delay is sensor transmits precense pulse :)
Correct -->

if(!(IOPIN0 & 1))
{
delayus(500);
return 1;
}

Thanks all !