Posts: 14
Joined: Fri Aug 17, 2012 3:31 pm

Timing issues

Sat Sep 08, 2012 7:50 pm


Im trying to hook up a DS18B20 to the GPIOs. Im using geany and coding in C,
I have manage to send and recive on the bus! I say... anyone there and I get the response,
yes I'm here. That function can be minimum 960us.

Later, when Im trying to send an command, writing one´s and zero's the timing is critical!
I can't seem to get under 580us for a function writing an one? looks like:

Code: Select all

if (data)
can't understand why it takes so long? Is there a way to shut down startx prioritized threads and only run my window to cut down timing??

or can I run this program outside startx? (im a newbie on linux).

Kind regards

Posts: 14
Joined: Fri Aug 17, 2012 3:31 pm

Re: Timing issues

Sun Sep 09, 2012 12:56 pm

Ok, so I got an answer.... I didn't likte:
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?
Quite frankly, no.

Return to “C/C++”