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
In reply to Check the timing by Jayant
The crystal value in my program is 32 MHz which is also used by PIC16f18426
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.
jaksonlee
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.
Hi jaksonlee
Can you shade more lights on your application? What sensor are you using? If possible please share the code also.
Jayant
Joined May 19, 2015 213Tuesday at 03:45 PM
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.