This design selects the P0 port of the single-chip microcomputer to control the signal input, so the key switch is connected with the P0 port. When pressing the switch S1, it is equivalent to giving the P0.0 port a low level. When the switch S2 is pressed, it is equivalent to giving a low level to the P0.1 port. When pressing switch S3, it is equivalent to giving P0.2 a low level; When the switch S4 is pressed, it is equivalent to giving a low level to the P0.3 port. When the switch S5 is pressed, it is equivalent to giving a low level to port P0.4. Then through the single-chip microcomputer to implement the corresponding operation. As shown in figure 2.13.