Part 1 Write a program for the 8051 which does the following
Part 1. Write a program for the 8051 which does the following:
Use the SETB instruction and set it bit in byte 20H high.
Part 2: Add to the code to transfer each bit in RAM byte 20H to P1 keeping bit integrity. (D0 of 20H -> P1.0, etc)
Solution
org 00h
setb 00h
mov r2,#08
mov r0,#00h
mov dptr,#0090h
above: mov a,@r0
setb
movx @dptr,a
inc dptr
inc r0
djnz r2, above
here: sjmp here
end
