CN206149241U - Pulse count device - Google Patents
Pulse count device Download PDFInfo
- Publication number
- CN206149241U CN206149241U CN201621201427.9U CN201621201427U CN206149241U CN 206149241 U CN206149241 U CN 206149241U CN 201621201427 U CN201621201427 U CN 201621201427U CN 206149241 U CN206149241 U CN 206149241U
- Authority
- CN
- China
- Prior art keywords
- pulse
- module
- count
- counting equipment
- counting
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Landscapes
- Measuring Volume Flow (AREA)
Abstract
The utility model provides a pulse count device, select module, control module, count module and storage module including the clock, control module respectively with clock selection module the count module with storage module connects, the clock selects the module to be used for selecting internal clock's kind, the count module is used for counting the pulse of input to store counting result into storage module, storage module be used for the storage operation parameter with counting result, and control module is used for control the clock select the module with the operation of count module, and counting result produces when reaching the count threshold value and suspends. Above -mentioned pulse count device can also avoid appearing because microcontroller results in missing the defect of calculating pulse and so on with the interior data interaction of card when realizing that accurate impulse detection and pulse are accumulated.
Description
Technical field
This utility model is usually related to metering field, more particularly to a kind of pulse counting equipment.
Background technology
Using Hall element, tongue tube sensor etc. realizing metering more than current instrument, such instrument mainly passes through
Sensor carrys out accumulated pulse output.The use of tongue tube and Hall element is widely.For example, the pointer in water meter carries magnetic
Ferrum, when the pointer goes to certain position, makes tongue tube and magnet attraction, pointer every revolution water meter just count once just.
In addition, double dry-reed pipe may also be employed, i.e., when a tongue tube adhesive is detected, first record, only detect it is another
Just think effective after individual tongue tube adhesive, now recording impulse and pulse is added up.Obtained by calculating the rotating shaft number of turns
Go out corresponding water consumption, alternately output pulse signal.
Mainly by gathering, the trailing edge and rising edge of microcontroller ports interrupt prior art and level width is come real
The validation checking of existing pulse.First, the validation checking of each pulse need by microcontroller perform corresponding program come
Realize, so due to needing to open the corresponding program of microcontroller clock execution, therefore cause the power consumption of microcontroller to increase
Plus, so as to reduce the service life of water meter internal cell in normal operating conditions.Secondly, if water meter is processing which this moment
Its real-time event, such as prepaid card are operated, then very likely as now microcontroller and the interior data of card are interacted
Not as good as detection pulse, and then cause pulse-losing, so that the water consumption for calculating is inaccurate.
Utility model content
The utility model proposes a kind of pulse counting equipment that can reduce equipment power dissipation, is realizing accurate pulse detection
While with pulse accumulation, moreover it is possible to avoid the occurrence of due to the interior data interaction of microcontroller and card and lead to miss calculating pulse etc
Defect.
The utility model proposes a kind of pulse counting equipment, including clock selection module, control module, counting module and deposit
Storage module;The control module is connected with the clock selection module, the counting module and the memory module respectively;It is described
Clock selection module is used for the species for selecting internal clocking;The counting module is counted for the pulse to being input into, and will
Count results storage is to the memory module;The memory module is used to store operating parameter and the count results;And institute
Control module is stated for controlling the operation of the clock selection module and the counting module, and meter is reached in the count results
Interruption is produced during number threshold value.
Preferably, the operating parameter includes one or more in the following:The filtering time of pulse, pulse are most
The order of arrival of little width, count threshold, time-out time and multiplex pulse.
Preferably, the mode of operation of the pulse counting equipment includes one of the following:Single channel count mode, multichannel meter
Digital modeling.
Preferably, when the control module detects qualified effective impulse, the count results are recalculated;
And when the count results reach the count threshold, send interrupt signal;And during the condition includes the following
One or more:The width of pulse reaches the minimum widith of pulse;The persistent period of pulse reaches the stipulated time;Multiplex pulse
Priority order of arrival meet default order of arrival.
Preferably, the control module is additionally operable to the original levels state for detecting input pulse.
Preferably, the pulse counting equipment also includes setup module, and the setup module is used to initialize and/or arrange
The operating parameter of the pulse counting equipment.
This utility model also proposes a kind of microcontroller, including central processing unit and above-mentioned pulse counting equipment;It is described
Pulse counting equipment, including clock selection module, control module, counting module and memory module;The control module respectively with
The connection of the clock selection module, the counting module and the memory module;The clock selection module is used to select inside
The species of clock;The counting module is counted for the pulse to being input into, and by count results storage to the storage mould
Block;The memory module is used to store operating parameter and the count results;And the control module is for when controlling described
The operation of clock selecting module and the counting module, and when the count results reach the count threshold, the control
Module sends interrupt signal to the central processing unit.
Preferably, the operating parameter includes one or more in the following:The filtering time of pulse, pulse are most
The order of arrival of little width, count threshold, time-out time and multiplex pulse.
Preferably, the mode of operation of the pulse counting equipment includes one of the following:Single channel count mode and many
Road count mode;When the control module detects qualified effective impulse, the count results are recalculated;And
When the count results reach the count threshold, interrupt signal is sent;And the condition includes in the following one
It is individual or multiple:The width of pulse reaches the minimum widith of pulse;The persistent period of pulse reaches the stipulated time;The elder generation of multiplex pulse
Order of arrival meets default order of arrival afterwards.
Preferably, the control module is additionally operable to the original levels state for detecting input pulse.
Description of the drawings
It is present disclosure to be further understood to provide including accompanying drawing.Accompanying drawing shows the enforcement of present disclosure
Example, and play a part of to explain present disclosure principle together with this specification.Combining accompanying drawing and reading following to spy
After the embodiment of fixed non-limiting present disclosure, the technical scheme and its advantage of present disclosure will become aobvious and easy
See.Wherein:
Fig. 1 shows the structural representation of the pulse counting equipment according to one embodiment of the present utility model.
Fig. 2 shows the schematic diagram of the dual input pulse according to one embodiment of the present utility model.
Fig. 3 shows the structural representation of the microcontroller according to one embodiment of the present utility model.
Specific embodiment
With reference to the non-limiting example being shown in the drawings He describe in detail in the following description, the disclosure is more completely illustrated
Multiple technical characteristics of content and Advantageous details.Also, below description is have ignored to known original material, treatment technology, group
The description of part and equipment, in order to avoid unnecessarily obscure the technical essential of present disclosure.However, those skilled in the art can
It is understood that when the embodiment of present disclosure is described below, description and particular example are only as illustrative and not limiting side
Formula is being given.
In the case of any possible, same or analogous portion will be represented in all of the figs using identical labelling
Point.Additionally, although the term used in present disclosure is selected from public term, present disclosure
Description mentioned in some terms be probably that disclosure people carrys out selection by his or her judgement, its detailed meanings exists
Explanation in the relevant portion of description herein.In addition, it is desirable to not only by the actual terms for being used, and be also to by every
The meaning contained by individual term is understanding present disclosure.
Fig. 1 shows the schematic diagram of the pulse counting equipment according to one embodiment of the present utility model.Step-by-step counting is filled
Putting 10 includes clock selection module 101, counting module 102, memory module 103, control module 104 and setup module 105.Control
Molding block 104 is connected with clock selection module 101, setup module 105, counting module 102 and memory module 103 respectively.
Wherein, clock selection module 101 can be used for the species for selecting internal clocking, and such as inner high speed crystal oscillator, inside are low
Fast crystal oscillator, outside high speed crystal oscillator or outside low speed crystal oscillator.
Setup module 105 can be used for the relevant parameter for initializing and/or arranging pulse counting equipment 10, including but not limited to
The filtering time of pulse, minimum widith, count threshold and time-out time etc..Preferably, if the width of the pulse for detecting is little
In minimum widith, then effective impulse is not calculated as;And/or, if the persistent period of the pulse for detecting is more than time-out time,
Effective impulse is not calculated as.It will be appreciated by persons skilled in the art that can be so that the ginseng of other correlations be arranged according to practical situation
Number.
Further, if effectively counted number of pulses reaches count threshold, then it represents that this counting load is completed, by controlling
The triggering of molding block 104 is interrupted, the work below of the central processing unit adapter in microcontroller.
Counting module 102 is counted to the pulse being input into according to internal clocking and set parameters, and will
Count results are stored in memory module 103.Counting module 102 can adopt such as 16 (or 32) enumerators or other types
Counting unit etc. realizing.
Memory module 103 is used for the counted number of pulses for storing the write of counting module 102.Further, it is set all kinds of
Parameter (such as count threshold etc.) is may be alternatively stored in memory module 103.It will be understood by those skilled in the art that memory module
103 can be realized using common storage devices such as depositors.
Control module 104 is used for the operation for controlling clock selection module 101, setup module 105 and counting module 102.
In one embodiment, when detecting current count results and reaching count threshold, control module 104 is by interrupt identification position
Position, and interrupt signal is sent to the central processing unit in microcontroller.The control module can by the hardware devices such as single-chip microcomputer come
Realize.It will be appreciated by persons skilled in the art that above-mentioned setup module 105 can be used for pulse count device being initialized
And parameter configuration.In another embodiment, the setup module can be omitted (accompanying drawing is not shown), and its corresponding function can
Realized by central processing unit 20 or control module 104.
In this utility model, pulse counting equipment 10 can the work in one of following mode of operation:Single channel count mode
With multiple metering pattern.In one embodiment, pulse counting equipment works under single channel count mode, i.e. pulse counting equipment
Single channel pulse to being input into is counted.Before starting counting up, can by the initial state of input pulse be set to for example high level (or
Low level).When the control module in pulse counting equipment detects effective low level (or high level) pulse, calculate
Counted number of pulses, such as by counted number of pulses plus or minus one.Interruption is produced when effective counted number of pulses reaches count threshold.
As shown in Fig. 2 in another embodiment, pulse counting equipment 10 can be in multiple metering MODE of operation.When many
Road count mode specifically two-way count mode when, i.e., pulse counting equipment to be input into two-way pulse (i.e. pulse A and pulse B)
Counted.Before starting counting up, the initial state of input pulse can be set to such as high level.Arrive when two priorities are detected
During the effective low level pulse for coming, if for example effectively low level pulse A arrived before effective low level pulse B, pulsimeter
Numerical value plus or minus one.Interruption can be produced when effective counted number of pulses reaches count threshold.
Further, if the arrival sequencing of two-way pulse is different from setting value can also to produce interruption.One
In individual preferred embodiment, if the arrival sequencing of two-way pulse is different, i.e., not in accordance with sequencing set in advance
Reach, then, by taking water meter as an example, flow direction of the explanation for water is had that opposite direction is measured.Now, should produce interruption with
Notify that central processing unit metering now is reciprocal, that is, break down.
Or, if two-way pulse is low level and the time-out time more than setting simultaneously, can also produce interruption.At one
In embodiment, water meter is measured using two-way tongue tube.If the two-way pulse for receiving is while for low level and persistently
Predetermined time-out time, then illustrate now to have outside magnetic disturbance to cause two-way tongue tube to be closed at.Now, in should producing
It is disconnected to be processed with notifying that central processing unit is waited accordingly.The relative mechanical position of two tongue tubes determines that water meter is normal
It is not in situation that two tongue tubes are closed in running.
The utility model proposes pulse counting equipment basic functional principle it is as follows:After upper electricity, control module (or arrange
Module) initialized, initialized content is included but is not limited to:Configuration work pattern (such as single channel count mode or multichannel
Count mode), multiplexed port pattern is configured, interrupt flag bit is configured, time-out time, pulse minimum widith, count threshold are set
Deng.
After the completion of initialization, pulse counting equipment is examined to corresponding input pulse according to the mode of operation for being configured
Survey.When qualified effective impulse is detected, by counted number of pulses plus or minus one.When counted number of pulses reaches count threshold
When, by interrupt flag bit set, and interrupt signal is sent to the central processing unit of microcontroller.Above-mentioned condition includes the following
In one or more:Pulse width reaches pulse minimum widith;Pulse duration reaches the stipulated time;The elder generation of multiplex pulse
After reach order meet default order.
It will be appreciated by persons skilled in the art that above-mentioned plus or minus one computing is not limited to the method for counting of pulse,
Can also be using other computational methods common in art.
In another embodiment, the control module in pulse counting equipment can be entered to the original levels state of input pulse
Row detection.So that pulse counting equipment works under two-way count mode as an example, input pulse now is respectively pulse A and pulse
B (as shown in Figure 2).Assume that the original state of pulse A and pulse B should be high level, then after the power-up, in pulse counting equipment
Control module detect the level state of pulse A and pulse B first:
If a. pulse A and pulse B are high level, pulse counting equipment enters count status.
If b. pulse A is high level and pulse B is low level, pulse counting equipment starts timing, if arranged
Time-out time in pulse B do not have level to change, then it represents that pulse B ports exception, interrupt signal can be produced to notify centre
Reason device;If pulse B is changed into high level in the time-out time for arranging, pulse counting equipment enters count status.
If c. pulse A is low level and pulse is high level, pulse counting equipment starts timing, if in setting
In time-out time, pulse A does not have level to change, then it represents that pulse A ports exception, can produce interrupt signal to notify central process
Device;If pulse A is changed into high level in the time-out time for arranging, pulse counting equipment enters count status.
According to above-described embodiment, those skilled in the art can be derived that and be when the original levels state of two-way input pulse
During low level or when pulse counting equipment works under single channel count mode, the initial electricity that the pulse counting equipment can be taken
Flat detection action.
Those skilled in the art are will be further appreciated that when pulse counting equipment is in multiple metering MODE of operation
When, validation checking and counting can be carried out to input pulse more than two-way.
Each transmitted to outside port with microcontroller in prior art itself is risen (or decline) and rushes in row along the pulse
Validation checking and pulse accumulation are compared, the utility model proposes above-mentioned pulse counting equipment itself i.e. be capable of achieving to pulse
Validation checking and counting, and interrupt signal is sent to the central processing unit in microcontroller when count threshold is reached.Exist
Before reaching count threshold, the part such as central processing unit, clock, depositor, bus in microcontroller can be at dormancy shape
State, and the central processing unit only receive pulse counting equipment transmission interrupt request singal when be waken up, this is greatly
Reduce the overall power of microcontroller.
As shown in figure 3, this utility model also proposes a kind of microprocessor 30, the microprocessor 30 includes above-mentioned step-by-step counting
Device 10 and central processing unit 20.When pulse counting equipment 10 detects counted number of pulses reaches set count threshold,
Interrupt signal is sent to central processing unit 20.After central processing unit 20 has performed corresponding process, pulse counting equipment 10
Reenter count status.
From existing microcontroller using software pulse count method it is different, the utility model proposes step-by-step counting
Device is intervened without the need for the central processing unit in microcontroller, it might even be possible to stop in the master clock and mastery routine of microcontroller
Complete independently step-by-step counting task in the case of work, this greatly reduces microcontroller is used for the power consumption of step-by-step counting, carries
The high work efficiency of microcontroller.Pulse counting equipment can be powered by microcontroller.When pulse counting equipment performs counting
During task, whole microcontroller only has pulse counting equipment in work.
Further, since single control module and internal clocking are provided with pulse counting equipment, step-by-step counting task can
To be independently completed by pulse counting equipment, this is not only able to the reliability for strengthening microcontroller, moreover it is possible to improve microcontroller
Speed is performed, and reduces the risk of pulse-losing.
Although some embodiments of the present utility model are described in present specification, to this area
It is obvious to the skilled person that these embodiments are merely possible to shown in example.It may occur to persons skilled in the art that
Numerous flexible program, replacement scheme and improvement project and without departing from scope of the present utility model.Appended claims are intended to
Scope of the present utility model is limited, and thereby covers these claim itself and its method and knot in the range of equivalents
Structure.
Claims (10)
1. a kind of pulse counting equipment, including clock selection module, control module, counting module and memory module;The control
Module is connected with the clock selection module, the counting module and the memory module respectively;
The clock selection module is used for the species for selecting internal clocking;
The counting module is counted for the pulse to being input into, and by count results storage to the memory module;
The memory module is used to store operating parameter and the count results;And
The control module is used for the operation for controlling the clock selection module and the counting module, and in the count results
Interruption is produced when reaching count threshold.
2. pulse counting equipment as claimed in claim 1, it is characterised in that the operating parameter includes in the following
It is individual or multiple:The arrival of the filtering time of pulse, the minimum widith of pulse, count threshold, time-out time and multiplex pulse is suitable
Sequence.
3. pulse counting equipment as claimed in claim 1 or 2, it is characterised in that the mode of operation of the pulse counting equipment
Including one of the following:Single channel count mode, multiple metering pattern.
4. pulse counting equipment as claimed in claim 3, it is characterised in that when the control module detect it is qualified
During effective impulse, the count results are recalculated;And when the count results reach the count threshold, send and interrupt
Signal;
The condition includes one or more in the following:The width of pulse reaches the minimum widith of pulse;Pulse is held
The continuous time reaches the stipulated time;The priority order of arrival of multiplex pulse meets default order of arrival.
5. pulse counting equipment as claimed in claim 1 or 2, it is characterised in that the control module is additionally operable to detection input
The original levels state of pulse.
6. pulse counting equipment as claimed in claim 1, it is characterised in that also including setup module, the setup module are used
In the operating parameter for initializing and/or arranging the pulse counting equipment.
7. a kind of microcontroller, including central processing unit and pulse counting equipment as claimed in claim 1;And when described
When count results reach the count threshold, the control module sends interrupt signal to the central processing unit.
8. microcontroller as claimed in claim 7, it is characterised in that the operating parameter include in the following or
It is multiple:The order of arrival of the filtering time of pulse, the minimum widith of pulse, count threshold, time-out time and multiplex pulse.
9. microcontroller as claimed in claim 7, it is characterised in that the mode of operation of the pulse counting equipment includes following
One of items:Single channel count mode and multiple metering pattern;
When the control module detects qualified effective impulse, the count results are recalculated;And when described
When count results reach the count threshold, interrupt signal is sent;
The condition includes one or more in the following:The width of pulse reaches the minimum widith of pulse;Pulse is held
The continuous time reaches the stipulated time;The priority order of arrival of multiplex pulse meets default order of arrival.
10. microcontroller as claimed in claim 7, it is characterised in that the control module is additionally operable to detect input pulse
Original levels state.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201621201427.9U CN206149241U (en) | 2016-11-08 | 2016-11-08 | Pulse count device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201621201427.9U CN206149241U (en) | 2016-11-08 | 2016-11-08 | Pulse count device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN206149241U true CN206149241U (en) | 2017-05-03 |
Family
ID=58624842
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201621201427.9U Active CN206149241U (en) | 2016-11-08 | 2016-11-08 | Pulse count device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN206149241U (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108107777A (en) * | 2017-12-11 | 2018-06-01 | 深圳市显控科技股份有限公司 | A kind of pulse sending method and system |
CN109259785A (en) * | 2018-09-10 | 2019-01-25 | 苏州瑞派宁科技有限公司 | Counting device and its method of counting for single-chip microcontroller |
CN112002066A (en) * | 2020-08-28 | 2020-11-27 | 湖北骏翔电子科技有限公司 | Double-reed-tube counting device based on timed interruption triggering |
CN113934257A (en) * | 2021-10-15 | 2022-01-14 | 广州极飞科技股份有限公司 | System time calculation method, device, equipment and storage medium |
CN114764607A (en) * | 2021-01-11 | 2022-07-19 | 青岛海信宽带多媒体技术有限公司 | Counting method, counting device and optical module |
-
2016
- 2016-11-08 CN CN201621201427.9U patent/CN206149241U/en active Active
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108107777A (en) * | 2017-12-11 | 2018-06-01 | 深圳市显控科技股份有限公司 | A kind of pulse sending method and system |
CN109259785A (en) * | 2018-09-10 | 2019-01-25 | 苏州瑞派宁科技有限公司 | Counting device and its method of counting for single-chip microcontroller |
CN112002066A (en) * | 2020-08-28 | 2020-11-27 | 湖北骏翔电子科技有限公司 | Double-reed-tube counting device based on timed interruption triggering |
CN112002066B (en) * | 2020-08-28 | 2022-06-17 | 湖北骏翔电子科技有限公司 | Double-reed-tube counting device based on timed interruption triggering |
CN114764607A (en) * | 2021-01-11 | 2022-07-19 | 青岛海信宽带多媒体技术有限公司 | Counting method, counting device and optical module |
CN113934257A (en) * | 2021-10-15 | 2022-01-14 | 广州极飞科技股份有限公司 | System time calculation method, device, equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN206149241U (en) | Pulse count device | |
CN104503565B (en) | Power consumption management method, device and the mobile device of mobile device | |
CN102035455B (en) | M/T speed measuring method for frequency converter | |
CN104330177B (en) | The portable ground temperature harvester of super low-power consumption and method | |
CN204346515U (en) | The electronic water meter flow sensor of rotating signal can be gathered | |
CN105488913A (en) | One-card and multi-meter multi-mode charging radio frequency card prepaid intelligent water meter and charging method | |
CN103440216A (en) | Chip and method for debugging MCU through I2C slave unit | |
CN202422270U (en) | Intelligent water meter controller with IC (intelligent circuit) card | |
CN104606784B (en) | A kind of cardiac pacemaker system and its control method | |
CN103591961A (en) | DSP and FPGA based strapdown compass navigation computer | |
CN101545916B (en) | Measurement circuit and measurement method for rotation speed of CW type electric eddy current dynamometer | |
CN107340021A (en) | A kind of intelligent telemetering water meter system based on Zigbee network | |
CN107886702A (en) | Telecommunication electric energy meter and its workflow based on carrier communication | |
CN111323626A (en) | Uncovering detection circuit integrated in MCU and uncovering detection method based on MCU | |
CN110687316B (en) | System and method for measuring target motion amount with low power consumption | |
CN101370443B (en) | Toothbrush and method for monitoring and reminding user of toothbrushing | |
CN212159910U (en) | MCU integrated uncapping detection circuit and electric energy meter control chip | |
CN103201687B (en) | Low energy sensor interface | |
CN107870780A (en) | Data processing equipment and method | |
CN110160594A (en) | A kind of NB-IoT mould group with intellectual water meter dedicated pin | |
CN100499311C (en) | Digital synchronous indication, control method for ship power station generator | |
CN106289306A (en) | Step-recording method and device | |
RU2008149062A (en) | METHOD FOR MEASURING FREQUENCY AND DEVICE FOR ITS IMPLEMENTATION | |
CN108809299A (en) | signal frequency measuring system | |
CN111007406B (en) | Internet of things node power consumption statistical learning method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20220706 Address after: 201210 floor 10, block a, building 1, No. 1867, Zhongke Road, pilot Free Trade Zone, Pudong New Area, Shanghai Patentee after: Xiaohua Semiconductor Co.,Ltd. Address before: Room 303-304, block a, 112 liangxiu Road, pilot Free Trade Zone, Pudong New Area, Shanghai Patentee before: HUADA SEMICONDUCTOR Co.,Ltd. |