;objective: Pneumatic Control
;Name: Abhimanyu Chopra
;Email id:
;Uc Used: 89S52
;Crystal Used: Quartz 11.592Mhz
;Board Used:
;Software Version: 0.1 Alpha
;Ics Used: ULN2803a
;HW Declaration:
dar0 equ p0.0
dar1 equ p0.1
dar2 equ p0.2
dar3 equ p0.3
dar4 equ p0.4
dar5 equ p0.5
dar6 equ p0.6
dar7 equ p0.7
rsw0 equ p1.0
rsw1 equ p1.1
rsw2 equ p1.2
rsw3 equ p1.3
rsw4 equ p1.4
rsw5 equ p1.5
rsw6 equ p1.6
rsw7 equ p1.7
rsw8 equ p3.0
op1 equ p3.1
op2 equ p3.2
;Ram
;Const Variable
stackval equ 70h
;bit Variable
;Start Of Main Program
;Intr Vector Table
org 0000h ;Reset
ajmp poweron
org 0003h ;Ext Int1
org 000bh ;T0
org 0013h ;Ext Int1
org 001bh ;T1
org 0023h ;Serial
org 002bh ;T2
poweron: mov sp,#stackval
mov p0,#0ffh
mov p1,#0ffh
mov p2,#0ffh
mov p3,#0ffh
mov ie,#00h
mov ip,#00h
mov p0,#00h
mov p1,#00h
mov p2,#00h
mov p3,#00h
main:
acall step1
sjmp main
step1: setb dar0
step2: jb rsw1,step3
sjmp step2
ret
step3: setb dar1
step4: jb rsw3,step5
sjmp step4
ret
step5: setb dar2
step6: jb rsw4,step7
sjmp step6
ret
step7: setb dar3
step8: jb rsw8,step9
sjmp step8
ret
;///////////////One Side Operation Over//////// WAIT???? ///////////
step9: clr dar1
step10: jb rsw2,step11
sjmp step10
ret
step11: clr dar3
step12: jb rsw7,step13
sjmp step12
ret
step13: clr dar2
step14: jb rsw5,step15
sjmp step14
ret
step15: clr dar0
step16: jb rsw0,step17
sjmp step16
ret
step17: ret
;/////////// Initial Postion Done In all Cylinders. ////////////////////////
END