#include <reg52.h>void main(){P1=0xB0;while(1);}
Well, that's the code. The actual circuit may have 74h or something. However, it is only one person who wants to record his doubts about why it is B0 rather than 0b.
Assume that the digital tube is a common anode digital tube, and the number "3" should be displayed ".
Digital tube principle
A B C D E F G DP in alphabetical order
Corresponding Level 0 0 0 0 1 1 0 1
However, the digital assistant is 1 0 1 0 0 0 0. I thought I was wrong about the level. After all, I had no foundation at all, and everything started from scratch.
Later I learned:Data indicates that it starts from a high position.
While a B c d E F G DP is connected to p0.0 p0.1 g02 g03 g04 g05 g06 g07 pins respectively. Starting from a high position, it should be
1 0 1 0 0 0 0 instead of 0 0 0 0 1 0 1. This is exactly the same as the result obtained by the digital assistant.