I'm trying to connect a DS18B20 to the GPIOs. I have successfully done so electronically, but I could only code the reset function because it's not that time critical. It is OK for that function to take at least 960us.

But when it comes to communication with the sensor, bit banging one's and zero's I have a problem. The least amount of time I can get a function to have is like 300us.

When communicating I have to have timings around 6-15us. How do I do that?

I wrote the program in geany compiled it, and even rebooted my Linux Debian distro and tried the program before entering startx. Didn't do anything to the timing?

I know a guy called frank buss manage this, but I want this to be able to run in xwin.

1 Answer 1



Use Occidentalis. It has built-in 1-wire support in kernel space.

You can't do this in user-space, as your software can be interrupted at anytime by the kernel.

  • So frankly..... I would have to build 1-wire support for the kernal to the debian distro for this to work. Are there no "uggly" programming hack one could use in the user-space to make this work?
    – Christian
    Sep 9, 2012 at 11:09
  • Quite frankly, no. Sep 9, 2012 at 11:31
  • I tried with owfs but i didn't realise I needed a bus master of some sort. Now I tried with latest Occidentalis and it works! eureka! Now I have to see if I can manage to push this to a server!
    – Christian
    Sep 10, 2012 at 10:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.