DS18b20 with PIC16f18426

Hello! I am currently working on my project regarding PIC16f18426 and sensors. I followed the tutorial/sample program you uploaded in interfacing DS18b20 and PIC16f877a. I changed the settings that suits up the device to the microcontroller I used. However, as I put it to the test, it doesn't read anything. What do you think is the problem? Thank you

As you might have already checked the DS18b20 works with one-wire protocal and here timing is everything. The program given here

https://circuitdigest.com/microcontroller-projects/pic16f877a-digital-t…

is for PIC16F877A and it uses a 20MHz crystal. what is the crystal value in your program.

 

  Joined May 19, 2015      213
Tuesday at 03:45 PM

The crystal value in my program is 32 MHz which  is also used  by PIC16f18426

  Joined November 20, 2018      2
Tuesday at 09:40 AM

I think the mcu supports MCC. It is a wiser choice to use timer fuction and create the timing duration for ds18b20. If the timer duration is right, it will definiately work. I have used the sensor a long ago with PIC16F46K22 with a 64Mhz clock cycle.

  Joined February 12, 2018      696
Monday at 02:11 PM

jaksonlee

Permalink

 I am currently working on my project regarding PIC16f18426 and sensors. I changed the configuration that suits up the device to the microcontroller I used. I used the debug tool in MPLab IDE. I also found out that there is the variables in the code has a zero value. What do you think is the problem.

  Joined November 07, 2019      124
Thursday at 04:25 PM

Hi jaksonlee

Can you shade more lights on your application? What sensor are you using? If possible please share the code also.

  Joined February 12, 2018      696
Monday at 02:11 PM