The program flow is shown in Figures 1 to 7.
Figure 1 Main program flow
Figure 2 Interrupt service subroutine flow
Figure 3 Low-pronunciation subroutine flow
Figure 4 High-pitched pronunciation subroutine flow
Figure 5 1s loud sound subroutine flow[page]
Figure 6 3-tone pronunciation subroutine flow
Figure 7 Delay 1s subroutine flow
Modular design of programs is a more commonly used programming method, which can facilitate reading and communication.
(1) Define port and register addresses.
(2) Define the reset vector and interrupt vector.
(3) Main program.
(4) INT interrupt processing function.
(5) R13 interrupt processing function.
(6) Low-pitched voicing subroutine. [page]
(7) High-pitch phonation subroutine.
(8) Sounding 1s subroutine.
(9) Turn off the TRM0 delay subroutine.
(10) The alarm subroutine sounds three times intermittently.
(11) Turn off the software delay subroutine.
Previous article:PIC MCU INT interrupt design ideas and program design
Next article:Design ideas and circuit design of port RB interrupt of PIC microcontroller
- Popular Resources
- Popular amplifiers
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
- Rectification and filter capacitor selection
- The problem of fast charging damaging the battery
- Configuration and use of TMS320F28379D SCID SCIB
- [Domestic RISC-V Linux Board Fang·Starlight VisionFive Trial Report] Create User Data Insertion
- What does the message NETS CONTAINING FLOATING INPUT PINS mean in AD?
- The sorrow of liberal arts students: the recruitment process of HR who does not understand technology
- 【McQueen Trial】Line Patrol Program
- [New version of Zhongke Bluexun AB32VG1 RISC-V development board] - 9: WDT
- CircuitPython-powered bracelet
- Send data to USART1->DR but USART1->DR outputs all 0? ?