#include
void main()
{
P1=0xB0;
while(1);
}
Well, that's all the codes. The actual circuit may have 74H or something. But it's just one bit, mainly to record my confusion about why it is B0 instead of 0B.
Assume that the digital tube is a common anode digital tube and the number "3" is to be displayed.
The principle of digital tube is as shown in the figure:
In alphabetical order: a b c d e f g dp
Corresponding level high and low 0 0 0 0 1 1 0 1
But when I used the digital tube assistant, it was 1 0 1 1 0 0 0 0. I thought I had misjudged the electrical level, after all, I had no basic knowledge at all and had to start from scratch.
Later I found out that data is represented starting from the high bit.
And a b c d e f g dp are connected to P0.0 P0.1 P0.2 P0.3 P0.4 P0.5 P0.6 P0.7 pins respectively. Starting from the high position, it should be
1 0 1 1 0 0 0 0 instead of 0 0 0 0 1 1 0 1. This is exactly the same as the result obtained by the digital tube assistant.
Previous article:C language to realize the operation of common cathode digital tube
Next article:Very amazing microcontroller program
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Graduates want to be electronic engineers
- Will removing the R1 resistor in the anti-reverse connection circuit affect the circuit function?
- I would like to ask two questions to my fellow forum members.
- TI C66x DSP instruction set - Operation code (opcode) detailed explanation
- Busy and fulfilling dry cold
- 【ST NUCLEO-G071RB Review】First Look at NUCLEO-G071RB
- Energia upgraded to 1.8.7E21
- Please tell me about the electromagnetic field formula
- [NXP Rapid IoT Review] Detailed operation process from unboxing to cloud programming
- MicroPython Hands-on (41) - Photosensitive element configuration for machine vision