OpthomasRhymes
New Member
Hi guys and gals
I am working on a college project which requires a fan to be operated when the temperature is within a certain range. I am coplety new to electronics and pics. I have been working on for around five weeks now and have made lost of progress. I have managed to integrate and program the fan to work via a darlington driver and have created a timed alarm as per the project requirements. The issue I am having is getting the temperature reading from the DS18B20. I have connected it with the 4.7k resistor between the power and data wire but am unsure how to get the reading.
my code looks like this:
readtemp c.1, b1
if b1 > 25 then
high b.2
endif
Obviously I am not using or processing the data from the DS18B20 correctly, but after many hours I am still at a bit of a loss. This is the final stage of the project and if I can get it sorted I can then started sorting the whole of my program out and piece itall together. Any help with the codewould be so helpful
Thanks for reading. I have attatched a very simple (and rather crude) daigram for this part of my system, sorry if it is a bit basic!
I am working on a college project which requires a fan to be operated when the temperature is within a certain range. I am coplety new to electronics and pics. I have been working on for around five weeks now and have made lost of progress. I have managed to integrate and program the fan to work via a darlington driver and have created a timed alarm as per the project requirements. The issue I am having is getting the temperature reading from the DS18B20. I have connected it with the 4.7k resistor between the power and data wire but am unsure how to get the reading.
my code looks like this:
readtemp c.1, b1
if b1 > 25 then
high b.2
endif
Obviously I am not using or processing the data from the DS18B20 correctly, but after many hours I am still at a bit of a loss. This is the final stage of the project and if I can get it sorted I can then started sorting the whole of my program out and piece itall together. Any help with the codewould be so helpful
Thanks for reading. I have attatched a very simple (and rather crude) daigram for this part of my system, sorry if it is a bit basic!