two
1. When we use a single-chip microcomputer to count a pulse, how do we determine the upper limit of the frequency allowed for the pulse?
When set to counting mode, the external pulse signal is counted through pin T0 (P3, 4) or T1 (P3-5). When the input pulse signal has a negative jump (or positive jump, the specific situation depends on your register settings), the timer value is increased by 1. During S5P2 of each machine cycle, the external input is sampled. If the value sampled in the first cycle is 1, and the value sampled in the next cycle is 0, then during S3P1 of the next cycle, that is, 24 oscillation cycles, the highest frequency of the external input count pulse is 1/24 of the oscillation frequency.
There is no limit on the duty cycle of the external input signal, but in order to ensure that a given level is sampled at least once before changing, this level must be maintained for at least one machine cycle. (Tcy is the machine cycle)
△ Conclusion: The maximum frequency of the counting pulse is 1/24 of the oscillation frequency, and the level (high, low) of the input pulse is maintained for more than one machine cycle.
The MCU divides a machine cycle into six state cycles and twelve beats. In each state cycle, the beat completes different actions, realizing time-sharing multiplexing on the hardware. For example, when the input pulse is sampled in S5P2, the count value is increased by 1 in the S3P2 MCU. These two actions are completed by different hardware in different state cycles in the same machine cycle.
Previous article:51 MCU Series Knowledge 10--Serial Communication (1)
Next article:Simple PCB production - the smallest system of single chip microcomputer
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Download from the Internet--ARM Getting Started Notes
- Learn ARM development(22)
- Learn ARM development(21)
- Learn ARM development(20)
- Learn ARM development(19)
- Learn ARM development(14)
- Learn ARM development(15)
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- Detailed description of I2C bus protocol and timing, getting started is no longer difficult
- Send a WDS configuration software for SI4463
- LM1875 Op Amp
- OpenBLT is an open source bootloader with comprehensive functional information, supporting USB, CAN, 232 and TCP/IP
- About the Minimum System
- Magic online translation
- Quick Start on RISC-V Architecture and Embedded Development
- Please teach me how to connect a voltage regulator diode to this circuit
- EEWORLD University ---- HVI training series
- There is a difference between the MSP430FR2111 official website routine and the actual running results