Introduction - If you have any usage issues, please Google them yourself
Single key scanner
1, program instructions:
This routine demonstrates the five buttons connected to the P1 port on the microcontroller.
Determines whether the key is pressed by the program scan corresponding to the level state of the key port,
By mechanical press and release the button when the jitter phenomenon, the need for appropriate delay in the process of eliminating jitter,
Avoid identifying the error message, and the program has the function of waiting for the release of the key.
2, experimental operation
The dial switch SMG S10 end of the ON to the side, indicating that the end is connected.
At the same time, the other end of the dial switch is in a disconnected state, that is, the switch is not transferred to the ON terminal.
Otherwise, it will affect the experimental results. After the program is downloaded to the development board to run,
In order to press S2 to S6 any key, the corresponding key will display in the digital tube