Electronic counting frequency meter principle watchdog port interrupt implementation counting circuit function

The frequency is the number of repetitions, cycles or vibrations of the periodic process per unit time, denoted as f. Therefore, a certain signal changes N times in T seconds, and the frequency of the signal is known as: f = N / T. The following figure is a block diagram of the electronic counting frequency meter, which is mainly composed of four parts.

Electronic counting frequency meter principle Watchdog port interrupt implementation counting circuit function

Counting pulse forming circuit: The function of this part is to convert the measured periodic signal into a countable pulse after being amplified and shaped.

Time Base T Generation Circuit: The purpose of this part is to provide an accurate count time T, also known as a gate (time) pulse.

Counting circuit: The function of this part is to count the number of repetitions of the measured periodic signal. The time reference generating circuit generates a gate pulse, and the measured signal is allowed to be input to the counting circuit for counting only during the time T during which the gate pulse continues.

Electronic counting frequency meter principle Watchdog port interrupt implementation counting circuit function

Waveform

Display circuit: The function of this part is to visually display the results of the measurement.

Due to the wide application of single-chip microcomputers, and the functions of single-chip microcomputers are becoming more and more powerful, the development of electronic counting frequency meters has also shifted to the basis of single-chip microcomputers. Nowadays, the MCU basically has more than one timer/counter function module. Therefore, the timer/counter function module in the MCU becomes the easiest to realize the functions of the time reference generation circuit and the counting circuit, instead of the traditional discrete components. Circuit function module. Among them, the counter function of the timer/counter function module of the single chip is almost the only choice for the developer as the counting circuit. The realization of the i-time reference T generating circuit is also dependent on the timer function of the timer/counter function module of the single chip. A new method based on the MSP430 family of microcontrollers to generate time reference and counting circuits will be introduced.

The MSP430 series of microcontrollers is a class of ultra-low power 16-bit microcontrollers from Texas Instruments. It uses a RISC core structure to integrate a large number of peripheral modules such as watchdogs, A/D converters, etc. into the chip.

Realize time function generation circuit function by using watchdog

The Watchdog Timer (WDT) is a module for system monitoring and internal timing use in the MSP430 series of microcontrollers. It is a 16-bit counter with two modes: watchdog and timer. There are 8 options. Timing. In this paper, the watchdog timer (WDT) is treated as an internal timer, and then the watchdog timer (WDT) is set to one of eight selectable timing times according to the actual needs of the measurement (1000ms in this article). ), as the time reference T, that is, the time during which the gate pulse lasts.

When one end of the MSP430 series MCU [detects the edge of the measured pulse level (can be used on the rising edge of the rising edge), the timing function of the watchdog is turned on, and the signal to be measured is started to count at the same time. When the watchdog's timing time expires, that is, when the gate pulse continues to smell T (time reference T), it enters the watchdog interrupt service routine and stops counting the measured signal, which is called by the dog's interrupt service routine. The display program subroutine displays the frequency of the signal being measured.

One problem worth discussing here is the accuracy of the time base T. The author thinks that the time precision of the watchdog circuit of the MCU should be relatively high, otherwise the watchdog circuit is difficult to apply to system monitoring and internal timing.

ZGAR Accessories

ZGAR Accessories


ZGAR electronic cigarette uses high-tech R&D, food grade disposable pod device and high-quality raw material. All package designs are Original IP. Our designer team is from Hong Kong. We have very high requirements for product quality, flavors taste and packaging design. The E-liquid is imported, materials are food grade, and assembly plant is medical-grade dust-free workshops.


Our products include disposable e-cigarettes, rechargeable e-cigarettes, rechargreable disposable vape pen, and various of flavors of cigarette cartridges. From 600puffs to 5000puffs, ZGAR bar Disposable offer high-tech R&D, E-cigarette improves battery capacity, We offer various of flavors and support customization. And printing designs can be customized. We have our own professional team and competitive quotations for any OEM or ODM works.


We supply OEM rechargeable disposable vape pen,OEM disposable electronic cigarette,ODM disposable vape pen,ODM disposable electronic cigarette,OEM/ODM vape pen e-cigarette,OEM/ODM atomizer device.

Disposable Pod Vape,Disposable Vape Pen,Disposable E-Cigarette,Electronic Cigarette,OEM vape pen,OEM electronic cigarette.

ZGAR INTERNATIONAL(HK)CO., LIMITED , https://www.zgarpods.com