
Originally Posted by
Student92
hi, i hv some problem for my project
how to do it if u want condition like this
( temperature from 29C to 35C, the bulb will ON that means the bulb will ON if temperature <29C until temperature = 35C
but when temperature >35C the bulb will OFF until the temperature reach to or below 29C and that condition will repeat)
sorry for my word, i hope someone can give a some advise or hint to help me
thanks
What exactly is your project, it sounds very much like a thermostat of some description ?
i haven't the 16F1786 in microcode studio list (pbp246), what can i do?
What is the reason for choosing a 16F1786 over other PICs that are supported in the version of PBP you have ?
So you want the light on when the temperature is between 29c and 35c, then you could try something like this.. crude but should work
Code:
temperature var byte
lamp var PORTA.1
If temperature <29 or temperature >35 then low lamp
If temperature =>29 or temperature =<35 then high lamp
Bookmarks