Introduction - If you have any usage issues, please Google them yourself
P1 51 microcontroller is a quasi-bidirectional port for general I/O port to use, the experiment is to P1, respectively, as input and output ports to practice. As input, the switch as an input device, read the switch status from the P1 port. For output, the control LED light-emitting diodes.