Lab Report # 02 Fatima Sadiq 12pwcse1029 Section: B Sir Ammad Khalil MBSD Lab
Lab Report # 02 Fatima Sadiq 12pwcse1029 Section: B Sir Ammad Khalil MBSD Lab
Fatima Sadiq
12pwcse1029
Section : B
Sir Ammad Khalil
MBSD LAB
Assembly CODE:
ORG 00
;starting address
;put FF in A
MOV P1,A;
;P1=A
ACALL DELAY
;PUSHES PC to stack and jump to DELAY
MOV A,#00H
;put 00 in A
MOV P1,A;
;P1=A
ACALL DELAY
; PUSHES PC to stack and jump to DELAY
SJMP BACK
;Jumps back to FFH
;---------DELAY SUBROUTINE
DELAY:
MOV R0,#244
HERE: MOV R1,#255
AGAIN: DJNZ R1,AGAIN
DJNZ R0,HERE
RET
END
Output:
Basic Circuit:
Basic Circuit needs capacitor of 30pf and 10 uF and resisiter of 8.2 ohm oscillator of 11.059 Hz.
A push button which show when we press it led will on other wise off.
Hardware Picture:LEDs were blinking(on & off)