Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

DS18B20 question about delays

Status
Not open for further replies.

bednyk

Newbie level 4
Newbie level 4
Joined
Mar 24, 2008
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,309
Hi!

I am just developing a board with digital termomter. I would like to ask how to measure times required for 1-Wire transmission. Should I use timer and interrupt? Using this way should I change timer counting time every interrupt? or is there any better algorithm to write such program.

All voices are welcome...brainstorm needed ;)

BR,
Mike
 

The answer depends on other uses of your resources. As far as the DS18B20 is concerned, where the delay comes form is irrelevant.

If your processor is fast and nothing else in your software is going to hold things up, use software delay loops. If the timing is critical because other things might slow the loop down, use interrupts instead.

The DS series are actually quite tolerant of timing, the 'window' for 1's and 0's is quite wide in terms of typical microprocessor instruction cycles.

Brian.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top