I have some trouble getting the one-wire bus to work. I'm using the following hardware:
1 x PIC18F8722 TQFP 80
4 x DS18B20 Temp. Sensors
I'm using this setup ( see pics):

The first cable from the main controller to the sensor box is about 2 meters long the cable of the sensor is about 1.5 meters long so in total of 3.5 meter cable.
I can read succesfully 1 temperature sensor but thats not the problem,
If I use the busreset, scanbus and get device count it never does what Im expecting for example:
Example 1:
no cable and no sensor box are connected thus no sensor is connected. with my current program you should think that the busreset macro returns a value greater than zero because no device can be detect because there is nothing to be detected.

But it never does the variable onewire_Busreset is first initialised with a value of 255 so this I dont understand

The same is for get device count it always returns 0 if I connect two sensors its says 0 if I connect one sensors it says 0 so this I dont understand

With the one wire component not working properly its not possible to use the four temperature sensors, hope this problem can be solved.
If it helps I have the one wire bus connected to Port B at Pin 5
Regards Jordy