; port loopback
; read from port 0 and write back to port 1
ORG 0H
MOV P0, #0FFH ; make P0 an input port
MOV P1, #0H ; make P1 an output port
BACK: MOV A, P0
MOV P1, A
SJMP BACK
END
Related topics:
8051 Program - logical operation | 8051 Program - parity generation | 8051 Program - polling an io pin | 8051 Program - send ascii to port | 8051 Program - serializing data | 8051 Program - simple serial transmission | 8051 Program - memory subroutines | 8051 Program - math subroutines | 8051 Program - conversion subroutines
List of topics: 8051
No comments:
Post a Comment