0% found this document useful (0 votes)
50 views

Lab Report # 02 Fatima Sadiq 12pwcse1029 Section: B Sir Ammad Khalil MBSD Lab

This is a lab report submitted by Fatima Sadiq for their MBSD LAB section B course. The report describes an assembly code program that blinks an LED connected to port P1 by alternating between displaying FFH and 00H, using a delay subroutine. The basic circuit used a push button to control an LED, with a capacitor, resistor, and oscillator to create blinking at 11.059 Hz.

Uploaded by

FatiLily
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views

Lab Report # 02 Fatima Sadiq 12pwcse1029 Section: B Sir Ammad Khalil MBSD Lab

This is a lab report submitted by Fatima Sadiq for their MBSD LAB section B course. The report describes an assembly code program that blinks an LED connected to port P1 by alternating between displaying FFH and 00H, using a delay subroutine. The basic circuit used a push button to control an LED, with a capacitor, resistor, and oscillator to create blinking at 11.059 Hz.

Uploaded by

FatiLily
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Lab report # 02

Fatima Sadiq
12pwcse1029
Section : B
Sir Ammad Khalil
MBSD LAB

Assembly CODE:
ORG 00

;starting address

BACK: MOV A,#0FFH

;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)

You might also like