Professional Documents
Culture Documents
HOME AUTOMATION SYSTEM Full File
HOME AUTOMATION SYSTEM Full File
Code :
#include <p18f4520.inc>
;config OSC=HS, OSCS=OFF, WDT=OFF, BORV=45, PWRT=ON, BOR=ON, DEBUG=OFF, LVP=OFF, STVR=OFF
;Inputs
;Ouputs
; FanOUT RC0
; LEDMOTION RC1
; LEDDOOR RC2
ORG 00H
main
MOVLW 0FH
MOVWF ADCON1
MOVWF TRISB
TempSensing
BTFSS SENSOR,TEMP
GOTO TempLow
GOTO MotionSensing
TempLow
MotionSensing
BTFSS SENSOR,MOTION
GOTO Undetected
GOTO DoorSensing
Undetected
DoorSensing
BTFSS SENSOR,DOOR
GOTO DoorClose
GOTO TempSensing
DoorClose
GOTO TempSensing
END
Simulations
Start
Flow Chart
Read Temperature
Sensor
Control
Thermostat
Control
lighting
Delay
Loop
End
Block diagram : Temperature Sensor
ADC Converter
Microcontroller
PIC18F4520
Motion Sensor
Door Sensor
Smart Thermostat
Control
Smart Lighting
Control