(6) Compilation to realize digital display
1. Whether the decoder is used or not
The upper part uses the decoder, the lower part does not use the decoder
1) The code of the decoder is not used:
P2, 0, P2.1 are the plus button, and the minus button
LED sequentially stores the digital display pattern.
2) Use digital tube
2. Two-digit digital tube static drive
Put the tens place of the decimal number to A and the ones place to B through DIV, and then output the digital tube patterns in the TABLE.
3. Dynamic display of digital tube
P1.0 to P1.3 connect the chip select signal, P1.4 to P1.7 connect the decoder.
Chip select signal function: For example, when the first digit displays 8, all 4 digits are 8 at this time, and the first 8 is controlled by the chip select signal to display.
Program: (take output 8051 as an example)
4. The two-digit digital tube starts from 0 and increases to 99
5. Use 74138 chip select to display 8 bits
Codes 1 to 8 are similar. . .