CN102566467A - Anti-interference method of singlechip microcomputer system - Google Patents

Anti-interference method of singlechip microcomputer system Download PDF

Info

Publication number
CN102566467A
CN102566467A CN2010106059104A CN201010605910A CN102566467A CN 102566467 A CN102566467 A CN 102566467A CN 2010106059104 A CN2010106059104 A CN 2010106059104A CN 201010605910 A CN201010605910 A CN 201010605910A CN 102566467 A CN102566467 A CN 102566467A
Authority
CN
China
Prior art keywords
count value
timer
singlechip microcomputer
muddled
count
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.)
Pending
Application number
CN2010106059104A
Other languages
Chinese (zh)
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.)
AVIC Guizhou Aircraft Co Ltd
Original Assignee
GUIZHOU SHUANGYANG AIR PLANE MANUFACTURING FACTORY
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 GUIZHOU SHUANGYANG AIR PLANE MANUFACTURING FACTORY filed Critical GUIZHOU SHUANGYANG AIR PLANE MANUFACTURING FACTORY
Priority to CN2010106059104A priority Critical patent/CN102566467A/en
Publication of CN102566467A publication Critical patent/CN102566467A/en
Pending legal-status Critical Current

Links

Landscapes

  • Electric Clocks (AREA)

Abstract

The invention discloses an anti-interference method of a singlechip microcomputer system. The anti-interference method is characterized in that: two timers T0s of a singlechip microcomputer and a timer T1 are made to work at the same time, T0s are used for monitoring the count value of T1 besides accumulating count values, if the count value of T1 disorders, a disorder standard is to check two adjacent count values, if the difference between the two adjacent count values is more than a specified value, disorder is judged to occur, the count values of T0s are used for correcting the count value of T1, and T0s also needs to complement the state of an output base pin corresponding to T0s each time so as to be detected by T1, and outputs a square wave with the frequency being 500Hz for time base verification during complementing; and the work process of T1 is the same as that of T0s. According to the invention, by skillful utilization of the two timers in the singlechip microcomputer, the influence of electromagnetic interferences to a singlechip microcomputer system in the use process of the singlechip microcomputer is eliminated, and the stability of the singlechip microcomputer system is increased.

Description

A kind of SCM system anti-disturbance method
Technical field
The present invention relates to the single-chip microcomputer application, be specifically related to a kind of single-chip microcomputer anti-disturbance method under strong electromagnetic.
Background technology
When single-chip microcomputer is worked as a control system; Can produce extremely serious electromagnetic interference (EMI) when the direct current generator in the control system or other equipment works; As at the center that utilizes single-chip microcomputer for Test Switchboard amount control; The on off operating mode of tested switching value is encoded by scale-of-two, accomplish switching value signals collecting, button identification, time measurement and Presentation Function with single-chip microcomputer.The Single-chip Controlling direct current generator produces switching value, the LCD display unit as control system, LCD can occur and flower screen phenomenon occur, can't carry out proper testing.Extremely serious through looking into the electromagnetic interference (EMI) that produces when reason is direct current generator work; The frequency spectrum that can observe interference with spectrum analyzer is very wide, and this strong electromagnetic causes system's cisco unity malfunction from the 5V direct-current switch power supply that power ground seals in to the control system power supply.After single-chip microcomputer P1 mouth added π type filtering circuit, situation made moderate progress after circuit board carried out layout again, but flower screen phenomenon still often appears in LCD.Singlechip chip is taken off with the artificial head replacement, and with emulator emulation on computers, it is in proper working order to observe single-chip microcomputer.Therefore the reason that can judge LCD flower screen is that the strong electromagnetic radiation that the microprocessor in the display receives direct current generator disturbs and cisco unity malfunction.Through taking shielding measure also can't eliminate interference fully to LCD and data line, control line.Be head it off, changed the stronger LCD of other several kinds of antijamming capabilities and made an experiment that test effect is still very undesirable.Inquire into and demonstration through technology, change design proposal again, adopt charactron to realize the demonstration of measurement data.When the design circuit plate makes an experiment again according to this scheme, disturb still frequent the appearance, caused tester the phenomenon that numeral daps often to occur, and more and more serious trend is arranged.Adopted measures such as power filter, ground connection processing and system mask to handle to this phenomenon, the result is not still effectively improved.So, carry out emulation with emulator once more, through observing the numerical value of each timer of single-chip microcomputer; Finally find that when electromagnetic interference (EMI) occurs disorder has appearred in the timer count value of single-chip microcomputer, the function of the timing Interrupt Process subroutine of single-chip microcomputer is that count value adds up automatically; Count value does not add 1 automatically when timer receives strong electromagnetic; But having jumped to a random number, the phenomenon that reflects thus is exactly digital irregular saltus step, normally timing.
Summary of the invention
For solving the problems of the technologies described above, the invention provides the disorder that a kind of timer that utilizes single-chip microcomputer under the situation that two inner timers of single-chip microcomputer are corrected in electromagnetic interference (EMI) occurs.
A kind of SCM system anti-disturbance method is characterized in that: two timer T0 of single-chip microcomputer and timer T1 are worked simultaneously, T0 also will keep watch on T1 outside the adding up of count value count value; If the count value of T1 gets muddled; Disorderly standard is two adjacent count values of inspection, disorder occurred if the difference of the two greater than setting, is just thought; Just correct the count value of T1 with the count value of T0; T0 also wants negate to the state of own corresponding output pin at every turn, make and oneself can be detected by T1, negate square wave that to export a frequency simultaneously be 500Hz as the time base calibrating use; Equally, T1 also will keep watch on T0 outside the adding up of count value count value is if the count value of T0 gets muddled; Disorderly standard is two adjacent count values of inspection, disorder occurred if the difference of the two greater than 1, is just thought; Just correct the count value of T0 with the count value of T1; T1 also wants negate to the state of own corresponding output pin at every turn, make and oneself can be detected by T0, negate square wave that to export a frequency simultaneously be 500Hz as the time base calibrating use.
The concrete progress of work is following:
Be checked through the low level of T1 at T0 after, the count value of timer T1 put into variable s1_1 store; After being checked through the high level of T1 then, the count value of timer T1 being put into variable s1_2 store, if | s1_1-s1-2|>=setting; Think then to begin to have got muddled that the count value of T0 is corrected the count value of timer T1.Likewise, be checked through the low level of T0 at T1 after, the count value of timer T0 is put into variable s0_1 stores; After being checked through the high level of T0 then, the count value of timer T0 being put into variable s0_2 store, if | s0_1-s0-2|>=setting; Think then to begin to have got muddled that the count value of T1 is corrected the count value of T0.So, T0 and T1 keep watch on the other side mutually, and T0 and timer 1 are normally counted, if there is a timer to get muddled, just can be corrected by the other side at once, thereby fundamentally solve problem.
Possibly have viewpoint thinks: if two timers all disturb simultaneously got muddled; Is not problem still to exist so? Answer as follows: the timer like single-chip microcomputer is set in working method 1; Then counting maximal value is 65535; So the probability that timer gets muddled first is that the probability that 1/65535, two timer gets muddled simultaneously is 1/ (65535 * 65535)=2 * 10 -10, so little probability can be ignored basically.
The present invention is through to the ingenious use of two timers in the single-chip microcomputer, overcome single-chip microcomputer in use electromagnetic interference (EMI) the influence of SCM system has been improved the stability of SCM system.
Protection scope of the present invention is not limited only to two timers and keeps watch on each other and prevent to correct a mistake mutually, all falls into protection scope of the present invention thereby use our ratio juris to correct single-chip microcomputer because of electromagnetic interference (EMI) produces the wrong practice.

Claims (2)

1. SCM system anti-disturbance method is characterized in that: two timer T0 of single-chip microcomputer and timer T1 are worked simultaneously, T0 also will keep watch on T1 outside the adding up of count value count value; If the count value of T1 gets muddled; Disorderly standard is two adjacent count values of inspection, disorder occurred if the difference of the two greater than setting, is just thought; Just correct the count value of T1 with the count value of T0; T0 also wants negate to the state of own corresponding output pin at every turn, make and oneself can be detected by T1, negate square wave that to export a frequency simultaneously be 500Hz as the time base calibrating use; Equally, T1 also will keep watch on T0 outside the adding up of count value count value is if the count value of T0 gets muddled; Disorderly standard is two adjacent count values of inspection, disorder occurred if the difference of the two greater than 1, is just thought; Just correct the count value of T0 with the count value of T1; T1 also wants negate to the state of own corresponding output pin at every turn, make and oneself can be detected by T0, negate square wave that to export a frequency simultaneously be 500Hz as the time base calibrating use.
2. SCM system anti-disturbance method according to claim 1 is characterized in that: be checked through the low level of T1 at T0 after, the count value of timer T1 put into variable s1_1 store; After being checked through the high level of T1 then, the count value of timer T1 being put into variable s1_2 store, if | s1_1-s1-2|>=setting; Think then to begin to have got muddled that the count value of T0 is corrected the count value of timer T1.Likewise, be checked through the low level of T0 at T1 after, the count value of timer T0 is put into variable s0_1 stores; After being checked through the high level of T0 then, the count value of timer T0 being put into variable s0_2 store, if | s0_1-s0-2|>=setting; Think then to begin to have got muddled that the count value of T1 is corrected the count value of T0.So, T0 and T1 keep watch on the other side mutually, and T0 and timer 1 are normally counted, if there is a timer to get muddled, just can be corrected by the other side at once, thereby fundamentally solve problem.
CN2010106059104A 2010-12-27 2010-12-27 Anti-interference method of singlechip microcomputer system Pending CN102566467A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010106059104A CN102566467A (en) 2010-12-27 2010-12-27 Anti-interference method of singlechip microcomputer system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010106059104A CN102566467A (en) 2010-12-27 2010-12-27 Anti-interference method of singlechip microcomputer system

Publications (1)

Publication Number Publication Date
CN102566467A true CN102566467A (en) 2012-07-11

Family

ID=46412117

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010106059104A Pending CN102566467A (en) 2010-12-27 2010-12-27 Anti-interference method of singlechip microcomputer system

Country Status (1)

Country Link
CN (1) CN102566467A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1835233A (en) * 2005-03-17 2006-09-20 联华电子股份有限公司 System single chip with electromagnetic interference shielding functional design
CN101013303A (en) * 2007-01-25 2007-08-08 杭州信雅达系统工程股份有限公司 Industrial timer with power-off protection and timing method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1835233A (en) * 2005-03-17 2006-09-20 联华电子股份有限公司 System single chip with electromagnetic interference shielding functional design
CN101013303A (en) * 2007-01-25 2007-08-08 杭州信雅达系统工程股份有限公司 Industrial timer with power-off protection and timing method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
杜川,付会凯: "单片机抗干扰问题浅析", 《大众科技》, no. 2, 28 February 2010 (2010-02-28) *

Similar Documents

Publication Publication Date Title
CN107831369B (en) Grounding resistance monitor with self-checking and correcting functions
CN105203980B (en) A kind of power quality self-checking system and its self checking method
CN103605097B (en) Distribution line fault indication integrated equipment function and performance detection system
CN104391501B (en) A kind of condition monitoring system and method for Supervisory Computer Control System For Hydroelectic Power Plant
CN104931863B (en) Synchronous generator for cable local discharge test
CN104865493A (en) CELL panel open-short circuit detection device and method
CN206164082U (en) Ore deposit lost circulation electric protection device based on pour into signal method into
CN206248776U (en) Universal multichannel flexible circuit board FPC comprehensive function test devices
CN103954946A (en) T/R module debugging instrument
CN204178528U (en) A kind of smoke detector performance testing device
CN205945239U (en) Overload protection device and system
CN102566467A (en) Anti-interference method of singlechip microcomputer system
CN202025058U (en) Digital display secondary cable core aligner based on wireless technology
CN210894669U (en) Metering error wiring simulation training device
CN207623501U (en) A kind of terminal batch for electric energy quality monitoring tests system
CN202433469U (en) False-plugging prevention system for test table of virtual instrument
CN114006667B (en) Portable short wave radio station circuit electromagnetic compatibility fault finding instrument
CN105422287A (en) Ultra-temperature and ultra-rotation protection device and control method thereof
CN109001578A (en) A kind of test device and method detecting CELL panel signal generator
CN202443330U (en) Combination control unit detector
CN201837697U (en) Analog test device for test carrier plate
CN203930041U (en) Multifunctional electric energy meter is calibration device just
CN208506587U (en) A kind of safe instrument control system cabinet capacitance detecting device
CN104503336B (en) Signal generator based on adaptive interface
CN109343403B (en) Analog beam scheduling control platform

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
ASS Succession or assignment of patent right

Owner name: GUIZHOU AIRCRAFT CO., LTD., AVIATION INDUSTRY CORP

Free format text: FORMER OWNER: GUIZHOU SHUANGYANG AIR PLANE MANUFACTURING FACTORY

Effective date: 20130108

C10 Entry into substantive examination
C41 Transfer of patent application or patent right or utility model
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20130108

Address after: Anshun City, Guizhou province Xixiu District 561018 P.O. Box 8

Applicant after: AVIC GUIZHOU AIRPLANE CO., LTD.

Address before: Anshun City, Guizhou province Xixiu District 561018 P.O. Box 8

Applicant before: Guizhou Shuangyang Air Plane Manufacturing Factory

C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20120711