CN103915051B - Method for controlling display of nixie tube - Google Patents

Method for controlling display of nixie tube Download PDF

Info

Publication number
CN103915051B
CN103915051B CN201210592302.3A CN201210592302A CN103915051B CN 103915051 B CN103915051 B CN 103915051B CN 201210592302 A CN201210592302 A CN 201210592302A CN 103915051 B CN103915051 B CN 103915051B
Authority
CN
China
Prior art keywords
queue
filtering process
signal
time threshold
sampled signal
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
Application number
CN201210592302.3A
Other languages
Chinese (zh)
Other versions
CN103915051A (en
Inventor
闫海英
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Aeonmed Co Ltd
Original Assignee
Beijing Aeonmed Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Aeonmed Co Ltd filed Critical Beijing Aeonmed Co Ltd
Priority to CN201210592302.3A priority Critical patent/CN103915051B/en
Publication of CN103915051A publication Critical patent/CN103915051A/en
Application granted granted Critical
Publication of CN103915051B publication Critical patent/CN103915051B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Control Of Indicators Other Than Cathode Ray Tubes (AREA)

Abstract

The invention discloses a method for controlling the display of a nixie tube. The display of the nixie tube is controlled through precise signal acquisition, acquired signal filtering and special signal processing in display. The implementation process is simple, the stability of the display of the nixie tube is improved, and the generation of error messages is minimized.

Description

A kind of method for controlling numeral method
Technical field
The present invention relates to numeral method technical field, more particularly to a kind of method for controlling numeral method.
Background technology
Charactron is widely used in various fields, such as automobile, household electrical appliances, instrument as the component with information prompting function Instruments and meters etc..The display of charactron is divided into static state display and dynamic scanning displaying, and display information comes from various sensor collections Signal.Because static state display can take more processor I/O mouth lines, normally only suitable for applied field that figure place showing is less Close.When charactron is worked in dynamic scanning displaying mode, driving chip is when the data of sensor collection are received, it is necessary to stop number Code pipe scanning, due to the various interference sources of sensor, charactron can be caused to occur, and display brightness is unstable and display mistake is believed The phenomenon of breath.
Regarding to the issue above, the present invention proposes a kind of method for controlling numeral method, to solve to be driven due to charactron Attribute feature causes charactron the problem of display brightness stability difference and display error message occur to chip in itself.
The content of the invention
The technical problem to be solved in the present invention is to provide a kind of method for controlling numeral method, is adopted by accurate signal The display of the mode logarithmic code pipe that specially treated is carried out to signal when collection, collection signal filtering, display is controlled, and improves number The stability that code pipe shows, reduces the generation of error message to greatest extent, and the method is realized simple.
To reach above-mentioned purpose, the present invention is achieved through the following technical solutions:
A kind of method for controlling numeral method, including,
Obtain sampled signal;
Treatment is filtered to the sampled signal for obtaining using recurrence average filtering algorithm;
By the signal write driver chip after the filtering process, charactron is driven to be shown.
It is described acquisition sampled signal the step of include,
The data-signal that sensor is gathered is sampled using A/D modular converters;
When A/D sample complete when, sampled signal is obtained by filtering process, using recursion mode by the sampled signal according to It is secondary to be put into the first queue with predetermined amount of storage;
When A/D samplings are not completed, the sampled signal in the first queue with predetermined amount of storage keeps constant.
Wherein, a kind of recurrence average filtering algorithm of implementation method includes,
Every the time of the first filtering process time threshold, sampled signal in the first queue is found by sort algorithm Minimum and maximum value, and be respectively placed in the head of the queue and tail of the queue of first queue;
The minimum and maximum value in first queue is excluded, other sampled signals in queue are carried out being averaging computing, will The result that computing acquisition is averaging to first queue is used as the signal after filtering process.
The recurrence average filtering algorithm of another embodiment includes,
Every the time of the first filtering process time threshold, sampled signal in the first queue is found by sort algorithm Minimum and maximum value, and be respectively placed in the head of the queue and tail of the queue of first queue;
The minimum and maximum value in first queue is excluded, other sampled signals in the queue is carried out being averaging computing, The result that computing acquisition is averaging to first queue is put into the second queue with predetermined amount of storage in recursion mode;
Every the time of the second filtering process time threshold, sampled signal in the second queue is found by sort algorithm Maximum and minimum value, and be respectively placed in the head of the queue and tail of the queue of second queue;
The minimum and maximum value in second queue is excluded, other sampled signals in the second queue are averaging Computing, using the result that computing acquisition is averaging to second queue as the signal after filtering process.
Technical scheme, signal is carried out during by accurate signal acquisition, collection signal filtering, display special The display of the mode logarithmic code pipe for the treatment of is controlled, and the method implementation process is simple, it is not necessary to complicated Mathematical Modeling, improves The stability of numeral method, reduces the generation of error message to greatest extent.
Brief description of the drawings
Fig. 1 is the method flow diagram of the control numeral method of first embodiment of the invention;
Fig. 2 is the method flow diagram of the control numeral method of second embodiment of the invention.
Specific embodiment
The invention will be further described with reference to the accompanying drawings and examples.
In technical solution of the present invention, charactron is worked in dynamic scanning displaying mode, for driving chip attribute in itself Feature(When the data of sensor collection are received, it is necessary to stop charactron scanning), using targetedly algorithm to write driver Data in chip are processed, and make up the interference that the various interference sources of sensor are caused, and solve numeral method brightness unstable Fixed and display error message problem.The process of present invention control numeral method is divided into three steps:
1)Obtain sampled signal;
2)Treatment is filtered to the sampled signal using recurrence average filtering algorithm;
3)Signal after the filtering process drives numeral method.
Fig. 1 is the method flow diagram of the control numeral method of first embodiment of the invention.As shown in figure 1, the method bag Include following steps:
Step 101:The data-signal that sensor is gathered is sampled using A/D modular converters;
In the present embodiment, A/D modular converters are deposited using 12 A/D converters inside singlechip chip by clock Device overflows the mode of triggering, and A/D collection translation functions are started in timer interrupt service program, and 12 A/D converters can Reach accurately sampling rate:
Wherein, sampling rate needs to consider the display speed of charactron, in addition it is also necessary to consider the frequency of noise, theory sampling speed Rate needs to reach more than the twice of numeral method frequency, just can guarantee that distortionless recovering signal.
Step 102:Judge whether A/D samplings complete;When A/D samples to be completed, sampled signal is obtained by filtering process, The sampled signal is sequentially placed into the first queue of default predetermined amount of storage using recursion mode, performs step 103;When When A/D samplings are not completed, the sampled signal in the first queue with predetermined amount of storage keeps constant, performs step 103;
In the present embodiment, judge that A/D changes success or not in main program, the whole main program cycle time is more than sampling week Phase.
After the completion of A/D samplings, preliminary sampling value filtering is carried out by simple limit filtration mode, removal pulse is done Disturb, then filtering numerical value storage to numerical value buffering area.
A first queue for predetermined amount of storage is pre-defined, the queue is empty queue, by the sampled signal successively Be put into queue, after first sampled signal is put into, sampled data be located at queue afterbody, queue due to not being occupied full, Subsequent step is not carried out, and is to continue with being put into sampled signal toward queue the inside, after being put into second sampled signal, first The sampled signal being put into can move one to Head-of-line, be always ensured that the last data being put into are located at the afterbody of queue, according to Above-mentioned recursion mode takes in placing data into the queue up to queue is sampled signal.
Step 103:Judge whether timer timing statisticses and the first filtering process time threshold meet predetermined condition;As completely Foot, performs step 104;Such as it is unsatisfactory for, jumps out this and perform flow;
The timer is single-chip microcomputer internal timing/counter, can program when performing clock keep synchronous.
The predetermined condition can be configured according to actual conditions, and in the present embodiment, predetermined condition is counted for timer Time is 0 with filtering process time threshold remainder result(Timer timing statisticses % filtering process time threshold==0), according to sentencing Disconnected result performs corresponding step.
Step 104:The minimum and maximum value of sampled signal in the queue is found by sort algorithm, and is respectively placed in team The head of the queue and tail of the queue of row;
Strict limitation is not done to the sort algorithm, can be using Bubble Sort Algorithm, quick sorting algorithm etc..This Bubble Sort Algorithm is used in embodiment, adjacent two sampled signals in queue are compared successively, small sampled signal is placed on Head of the queue, big sampled signal is put behind, and the step is repeated, until can not again exchange.
Step 105:The minimum and maximum value in queue is excluded, other sampled signals in queue are carried out being averaging fortune Calculate, the result of computing acquisition will be averaging to the first queue as the signal after filtering process;
Step 106:Numeral method is carried out to the signal after the filtering process.
Because the attribute feature of driving chip itself, it is necessary to when digital die is driven, reduce and number as far as possible The call duration time of pipe driving chip.Therefore, when the sampled signal average value after by filtration treatment writes to driving chip, open The register protection mechanism of digital pipe driving chip, the sampled signal average value such as after filtration treatment is protected in scheduled time threshold value Hold constant, then not to writing data in driving chip;When keeping constant state to exceed predetermined such as the signal after filtration treatment Between threshold value, then driving chip is refreshed, re-write data.So be prevented from write error in register data and Cause to show mistake.
Fig. 2 is the method flow diagram of the control numeral method of second embodiment of the invention.As shown in Fig. 2 methods described Comprise the following steps:
Step 201:The data-signal that sensor is gathered is sampled using A/D modular converters;
In the present embodiment, A/D modular converters are deposited using 12 A/D converters inside singlechip chip by clock Device overflows the mode of triggering, and A/D collection translation functions are started in timer interrupt service program, and 12 A/D converters can Reach accurately sampling rate:
Wherein, sampling rate needs to consider the display speed of charactron, in addition it is also necessary to consider the frequency of noise, theory sampling speed Rate needs to reach more than the twice of numeral method frequency, just can guarantee that distortionless recovering signal.
Step 202:Judge whether A/D samplings complete;When A/D samples to be completed, sampled signal is obtained by filtering process, The sampled signal is sequentially placed into the first queue of default predetermined amount of storage using recursion mode, performs step 203;When When A/D samplings are not completed, the sampled signal in the first queue with predetermined amount of storage keeps constant, performs step 203;
In the present embodiment, judge that A/D changes success or not in main program, the whole main program cycle time is more than sampling week Phase.
After the completion of A/D samplings, preliminary sampling value filtering is carried out by simple limit filtration mode, removal pulse is done Disturb, then filtering numerical value storage to numerical value buffering area.
A first queue for predetermined amount of storage is pre-defined, the queue is empty queue, by the sampled signal successively Be put into queue, after first sampled signal is put into, sampled data be located at queue afterbody, queue due to not being occupied full, Subsequent step is not carried out, and is to continue with being put into sampled signal toward queue the inside, after being put into second sampled signal, first The sampled signal being put into can move one to Head-of-line, be always ensured that the last data being put into are located at the afterbody of queue, according to Above-mentioned recursion mode takes in placing data into the queue up to queue is sampled signal.
Step 203:Judge whether first timer timing statisticses and the first filtering process time threshold meet predetermined condition; As met, treatment is filtered to the first queue, recursion side will be used to the signal after the first queue filtering process Formula is put into the second queue with predetermined amount of storage, performs step 204;Such as it is unsatisfactory for, described with predetermined amount of storage Signal in two queues keeps constant, performs step 204;
The predetermined condition can be configured according to actual conditions, and in the present embodiment, predetermined condition is first timer Timing statisticses and the first filtering process time threshold remainder result are 0(First timer timing statisticses % the first filtering process times Threshold value==0), corresponding step is performed according to judged result.
Treatment is filtered to the first queue to be included finding sampled signal in the first queue by sort algorithm Minimum and maximum value, and be respectively placed in the head of the queue and tail of the queue of first queue;The minimum and maximum value in first queue is excluded, it is right Other sampled signals in queue carry out being averaging computing;To be filtered what treatment was tried to achieve to first queue using recursion mode Result is sequentially placed into the second queue of default predetermined amount of storage.
Strict limitation is not done to the sort algorithm, can be using Bubble Sort Algorithm, quick sorting algorithm etc..This Bubble Sort Algorithm is used in embodiment, adjacent two sampled signals in queue are compared successively, small sampled signal is placed on Head of the queue, big sampled signal is put behind, and the step is repeated, until can not again exchange.
A pre-defined queue for predetermined amount of storage is second queue, and the queue is empty queue, by described to first Queue is filtered the result tried to achieve for the treatment of and is sequentially placed into second queue, and first is put into second queue to described first Queue is filtered the signal tried to achieve for the treatment of, and the signal is located at the afterbody of second queue, second queue due to not being occupied full, no Subsequent step can be performed, and is to continue with being put into sampled signal toward queue the inside, be put into second and the first queue is filtered After the ripple signal tried to achieve for the treatment of, first signal being put into can move one to Head-of-line, be always ensured that last being put into Data are located at the afterbody of second queue, are placed data into the queue according to above-mentioned recursion mode until queue is sampled signal Take.
Step 204:Judge whether second timer timing statisticses and the second filtering process time threshold meet predetermined condition; As met, treatment is filtered to the second queue;Such as it is unsatisfactory for, jumps out this and perform flow;
The predetermined condition can be configured according to actual conditions, and in the present embodiment, predetermined condition is second timer Timing statisticses and the second filtering process time threshold remainder result are 0(Second timer timing statisticses % the second filtering process times Threshold value==0), corresponding step is performed according to judged result.
Being filtered treatment to the second queue includes, sampled signal in the second queue is found by sort algorithm The minimum and maximum value of average value, and it is respectively placed in the head of the queue and tail of the queue of second queue;Exclude minimum in second queue and most Other sampled signal average values in queue are carried out being averaging computing by big value;By to the result after second queue filtering process Carry out numeral method.
Strict limitation is not done to the sort algorithm, can be using Bubble Sort Algorithm, quick sorting algorithm etc..This Bubble Sort Algorithm is used in embodiment, adjacent two sampled signals in queue are compared successively, small sampled signal is placed on Head of the queue, big sampled signal is put behind, and the step is repeated, until can not again exchange.
Wherein, the first filtering process time threshold and the second filtering process time threshold can be carried out according to actual conditions Set.If the first filtering process time threshold and the second filtering process time threshold are identical, in first timer and first When filtering process time threshold meets predetermined condition, recurrence average filtering process is carried out to first queue, at first queue filtering After reason terminates, when second timer and the second filtering process time threshold meet predetermined condition, recursion is carried out to second queue and is put down Equal filtering process, the result to second queue recurrence average filtering process is used as the signal write driver core after filtering process Piece, drives numeral method, i.e. first queue and second queue are filtered according to identical frequency.
Because the attribute feature of driving chip itself, it is necessary to when digital die is driven, reduce and number as far as possible The call duration time of pipe driving chip.Therefore, when the sampled signal average value after by filtration treatment writes to driving chip, open The register protection mechanism of digital pipe driving chip, the sampled signal average value such as after filtration treatment is protected in scheduled time threshold value Hold constant, then not to writing data in driving chip;When keeping constant state to exceed predetermined such as the signal after filtration treatment Between threshold value, then driving chip is refreshed, re-write data.So be prevented from write error in register data and Cause to show mistake.
Technical scheme, when carrying out second-order filter treatment by accurate signal acquisition, to gathering signal, showing The display that the mode logarithmic code pipe of specially treated is carried out to signal is controlled, and the method is realized simply, at second-order filter Reason, further increases the stability of numeral method, and the generation of error message is reduced to greatest extent.
One of ordinary skill in the art will appreciate that all or part of step in realizing above-described embodiment method can be The hardware of correlation is instructed to complete by program, described program can be stored in a computer read/write memory medium, Described storage medium, such as:ROM/RAM, magnetic disc, CD.
Above are only presently preferred embodiments of the present invention and institute's application technology principle, any technology people for being familiar with the art In the technical scope of present disclosure, the change or replacement that can be readily occurred in should all be covered in protection scope of the present invention member It is interior.

Claims (8)

1. it is a kind of control numeral method method, it is characterised in that including,
Obtain sampled signal;
Treatment is filtered to the sampled signal for obtaining using recurrence average filtering algorithm;
By the signal write driver chip after the filtering process, charactron is driven to be shown;
When wherein, by the signal write driver chip after the filtering process, such as the signal after filtering process is in scheduled time threshold Keep constant in value, then not to writing data in driving chip;As the signal after filtering process keeps constant state to exceed in advance Fixed time threshold, then refresh to driving chip, re-writes data.
2. it is according to claim 1 control numeral method method, it is characterised in that the step of the acquisition sampled signal Suddenly include,
The data-signal that sensor is gathered is sampled using A/D modular converters;
When A/D samples to be completed, sampled signal is obtained by filtering process, put the sampled signal successively using recursion mode In entering the first queue with predetermined amount of storage;
When A/D samplings are not completed, the sampled signal in the first queue with predetermined amount of storage keeps constant.
3. it is according to claim 2 control numeral method method, it is characterised in that the recurrence average filtering algorithm Including,
Every the time of the first filtering process time threshold, in finding the first queue by sort algorithm, sampled signal is most Small and maximum, and it is respectively placed in the head of the queue and tail of the queue of first queue;
The minimum and maximum value in first queue is excluded, other sampled signals in queue are carried out to be averaging computing, will be described The result of computing acquisition is averaging to first queue as the signal after filtering process.
4. it is according to claim 3 control numeral method method, it is characterised in that the realization every first filtering The time of process time threshold value includes that it is whole that timer timing statisticses carry out remainder result with the first filtering process time threshold Number.
5. it is according to claim 2 control numeral method method, it is characterised in that the recurrence average filtering algorithm Including,
Every the time of the first filtering process time threshold, in finding the first queue by sort algorithm, sampled signal is most Small and maximum, and it is respectively placed in the head of the queue and tail of the queue of first queue;
The minimum and maximum value in first queue is excluded, other sampled signals in the queue is carried out being averaging computing, by institute State first queue is averaging computing acquisition result be put into the second queue with predetermined amount of storage in recursion mode;
Every the time of the second filtering process time threshold, in finding the second queue by sort algorithm, sampled signal is most Big and minimum value, and it is respectively placed in the head of the queue and tail of the queue of second queue;
The minimum and maximum value in second queue is excluded, other sampled signals in the second queue are carried out being averaging fortune Calculate, using the result that computing acquisition is averaging to second queue as the signal after filtering process.
6. it is according to claim 5 control numeral method method, it is characterised in that the realization every first filtering The time of process time threshold value includes that first timer timing statisticses carry out remainder result and are with the first filtering process time threshold Integer;The realization includes that second timer timing statisticses and second are filtered every the time of the second filtering process time threshold Process time threshold value carries out remainder result for integer.
7. it is according to claim 6 control numeral method method, it is characterised in that the first filtering process time Threshold value is identical with the second filtering process time threshold.
8. the method for control numeral method according to claim 2, it is characterised in that the A/D modular converters are used The A/D converter of 12.
CN201210592302.3A 2012-12-29 2012-12-29 Method for controlling display of nixie tube Active CN103915051B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210592302.3A CN103915051B (en) 2012-12-29 2012-12-29 Method for controlling display of nixie tube

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210592302.3A CN103915051B (en) 2012-12-29 2012-12-29 Method for controlling display of nixie tube

Publications (2)

Publication Number Publication Date
CN103915051A CN103915051A (en) 2014-07-09
CN103915051B true CN103915051B (en) 2017-05-24

Family

ID=51040692

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210592302.3A Active CN103915051B (en) 2012-12-29 2012-12-29 Method for controlling display of nixie tube

Country Status (1)

Country Link
CN (1) CN103915051B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112284582B (en) * 2020-10-27 2021-12-07 南京信息工程大学滨江学院 Sensing detection signal filtering method, pressure detection system and application

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2598086Y (en) * 2003-01-28 2004-01-07 广东科龙电器股份有限公司 Small charactron display
CN2800231Y (en) * 2005-04-29 2006-07-26 上海海事大学 Circuit structure of intelligent meter with digital display
CN102305659B (en) * 2011-07-28 2016-10-05 鲁东大学 Continuous weight metering instrument and weight continuous metering method thereof
CN102410868B (en) * 2011-07-29 2016-10-05 鲁东大学 Batching controller and ingredient control method thereof
CN202352297U (en) * 2011-11-25 2012-07-25 天津市深蓝电控设备技术有限公司 Parameter display panel applicable to lifting equipment

Also Published As

Publication number Publication date
CN103915051A (en) 2014-07-09

Similar Documents

Publication Publication Date Title
CN102692563B (en) Clock frequency detector
CN104461972B (en) A kind of method and apparatus of data signal samples
CN108734036A (en) A kind of coding/decoding method and device of magnetic stripe card
CN110672899B (en) Eye pattern reconstruction method for digital oscilloscope and storage medium
JP2021528644A (en) Encoder signal sampling method and equipment
CN106227293A (en) A kind of system clock
CN206149241U (en) Pulse count device
CN109102361A (en) A kind of article order confirmation method and system based on intelligent electronic-scale
CN109088621A (en) A kind of signal filtering method and device
CN106941399A (en) A kind of dual rate CAN FD baud rate measuring method and device
CN103915051B (en) Method for controlling display of nixie tube
CN104063223B (en) A kind of method that FPGA realizes the controllable watchdog function of software programming device
CN109870172B (en) Step counting detection method, device, equipment and storage medium
CN116299643A (en) Digital peak-flat-top double-channel forming method and system for processing nuclear pulse signals
CN106500718A (en) Step number assay method
CN212159910U (en) MCU integrated uncapping detection circuit and electric energy meter control chip
CN106774638B (en) A kind of timer calibration method
CN106821336A (en) Sleep monitor method and system
CN105376041A (en) Start-stop synchronous type serial data acquisition device and start-stop synchronous type serial data acquisition method
CN113933601B (en) Pulse width modulation signal acquisition method, device, computer equipment and storage medium
CN108981744B (en) Step frequency real-time calculation method based on machine learning and low-pass filtering
CN102855172B (en) Method for recording network card receiving time at high precision
CN106485295B (en) A kind of RFID data cleaning method and device
CN117146990B (en) Low-frame-frequency external triggering method and system based on uncooled infrared detector
JP2007004577A (en) Integrated circuit device and pedometer

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant