First up I am extremely new to PICs and PICBasic and am reading and experimenting a LOT trying to fast track to an ulitmate project. As a result, I am breaking the "big picture" down into little pieces and trying to work out as much as I can myself - so please know that I *really* have tried to nut this one out..!!!!!
I am using a 16F877 that measures a variable resistor/voltage divider (with the bigger picture being to measure a thermistor) and depending on a user set variables.. switch a LED on or off..
The thing I need/want to do is have the LED switch on at say 100 degrees and then switch off only when the temperature drops below 80 degrees... I believe this is called Hysteresis..??!!?
But I am stumped at how to do this..?
I've tried using the following:
IF temp >= 100 THEN GOSUB ledon
IF temp <= 80 THEN GOSUB ledoff
Can anyone shed any light on this..??
Thanks
Hoops
Bookmarks