MOV A, 0xFF ;A = 0xFF, Move data 0xFF to Accumulator
MOV P1, A : Move data from Accumulator into Port-1
HERE:
MOV A, P1 : Read Data from Port-1
MOV P2, A : Send data from Port- to Port-2
MOV R6,0xC8 ; Load R6 with 200 decimal Value for 200 msec
delay
LOOP:
ACALL DELAY
DJNZ R6,LOOP
SJMP HERE ; Keep on doing, infinite loop
DELAY: ; Delay for 1 msec., TL0 and TH0 are computed using
Crystal = 11.0592 MHz
MOV TMOD,0x1B ; Sets Timer 0 to MODE1 (16 bit timer). Timer 1 is
not used
MOV TH0, 0xFCH ; Loads TH0 register with FCH
MOV TL0, 0x18H ; LOads TL0 register with 18H
SETB TR0 ; Starts the Timer 0
HERE: JNB TF0,HERE ; Loops here until TF0 is set
CLR TR0 ; Stops Timer 0
CLR TF0 ; Clears TF0 flag
RET
Lab Activity 2 Test the 8051's ports for input operation as follows: A) Connect each bit...