help(89C51)
Sat Dec 01 2007, 01:47 am
diagram does not matches code......... r u sure u have posted the correct diagram
Sat Dec 01 2007, 01:54 am
Hi star the code you posted is really simple.. here is a little explaination
Summary of the code is...
cooler is on if the temperature is greater than 40, heater is on when temperature is less than 10 and if temperature is in between 10 and 40 both cooler and heater are off.
BEGIN: CALL DELAY MOV P1,#0FFH MOV A,P1 ;read ADC or temprature CJNE A,#40,HIGHER ;check if its equal to 40 or not SETB P2.1 ;if equal then swith on the cooler CALL MAIN_DISPLAY_COOLERON ;display "cooler on" on LCD JMP BEGIN HIGHER: ;jump here if its not equal to 40 JNC HIGH_40 ;check if temp is less or greater than 40 ;if its less than 40 then MOV A,P1 ;read port 1 CJNE A,#10,LOWER ;check if temp is equal to 10 SETB P3.1 ;if yes then swith on the heater CALL MAIN_DISPLAY_HEATHERON ;Display it on LCD CLR P2.1 ;swith off cooler JMP BEGIN ;go back HIGH_40: ;jump here if temp is higher than 40 CALL DELAY ;Some delay SETB P2.1 ;switch on cooler CALL MAIN_DISPLAY_COOLERON ;display on LCD CLR P3.1 ;switch off the heater JMP BEGIN ;go back LOWER: ;jump here if temp is not equal to 10 JC LOW_10 ;check if temp is less or greater than 10 ;if its higher than 10 then MOV P2,#00H ;switch off cooler MOV P3,#00H ;switch off heater JMP BEGIN ;go back LOW_10: ;jump here if temp is less than 10 SETB P3.1 ;switch on heater CALL MAIN_DISPLAY_HEATHERON ;display on LCD CLR P2.1 ;switch off cooler JMP BEGIN ;go back
Summary of the code is...
cooler is on if the temperature is greater than 40, heater is on when temperature is less than 10 and if temperature is in between 10 and 40 both cooler and heater are off.
Sat Dec 01 2007, 01:55 am
I have given explanation to program but as abbas said.. the program does not match the circuit diagram.. please consider revising it.
Sat Dec 01 2007, 10:06 am
thank u for explanation.I try to change the circuit if I can't I ask u to help. u help me????!!! :blush
Sat Dec 01 2007, 12:19 pm
just see what is connected where and make the changes in your circuit.
Fri Dec 07 2007, 03:46 pm
sir i need help abt Home Automation Over Internet i have downloaded all but need still more details..........
i have very less time
i have very less time
Fri Dec 07 2007, 05:03 pm
please explain to me what details you want.. i hope you have read the sticky post in the project doubt forum.. did you?
Powered by e107 Forum System