The content of the invention
The purpose of the present invention is the shortcomings that overcoming above-mentioned prior art, there is provided one kind is realized electric in fever writes chips
The system and method for time Self Adaptive Control, the automatic adjusument of the power-on time of fever writes chips can be realized, obtaining can
A so that power-on time of the normal programming of chip.
In order to realize above-mentioned at least one purpose, the present invention has following form:
This realizes the system of fever writes chips power-on time Self Adaptive Control, and it is mainly characterized by, described system bag
Chip attachment component, operating element, control element and electrifying control circuit are included, described electrifying control circuit is connected by chip
Element with treating that programming chip is connected, described control element simultaneously with described chip attachment component, operating element and upper electricity
Control circuit is connected, wherein described system has following mode of operation:
The operation of described operating element detection user, when described operating element detects that operation is opened in automatic adjusument
When, automatic adjusument open signal is sent to described control element;
When described control element receives automatic adjusument open signal, described control element uses currently pre-
If power-on time treats programming chip and carries out programming test, and when programming test crash after the current default power-on time of adjustment
Programming test is re-started, stops programming test when being successfully tested to programming, and record the default power-on time after adjustment;
When each programming test starts, described control element control electrifying control circuit is treated programming chip and carried out
Electricity, and after current default power-on time, treat programming chip and carry out programming content importing, programming is received after programming terminates
As a result.
It is preferred that described chip attachment component is treats programming chip pocket or treats programming chip interface.
It is preferred that described system also has following mode of operation:
When described operating element detects that programming starts operation, programming commencing signal is sent to described control member
Part;
When described control element receives programming commencing signal, control electrifying control circuit treats the progress of programming chip
Upper electricity, and after current default power-on time, treat programming chip and carry out programming content importing.
More preferably, described operating element is button, when user's depresses button duration is less than the default regulation opening time,
The operation is that programming starts to operate, and when user's depresses button duration is more than or equal to the default regulation opening time, the operation is
Operation is opened in automatic adjusument.
More preferably, described system also includes display element, and described display element is connected with described control element,
The programming state or automatic adjusument state that described display element is in the current chip of display control element.
It is preferred that described treats to be provided with fault control switch between the upper electric end of programming chip and earth terminal, waiting to burn
Write in the programming test process of chip, the switch control of described fault control is treated between the upper electric end of programming chip and earth terminal
Connection disconnects, programming test complete when, the switch control of described fault control treat the upper electric end of programming chip and earth terminal it
Between connect.
More preferably, described fault control switch includes triode QM21, described triode QM21 colelctor electrode and hair
Emitter-base bandgap grading, which is connected to, to be treated between the upper electric end of programming chip and earth terminal, described in the programming test process of programming chip is treated
Voltage at triode QM21 base stage is low level, when completion is tested in programming, at described triode QM21 base stage
Voltage is high level.
It is preferred that described electrifying control circuit includes triode Q12, resistance R55 and triode Q4, triode Q12's
Emitter stage is connected with upper electric control end, and triode Q12 colelctor electrode is with treating that the upper electric end of programming chip is connected, resistance R55
Both ends are connected to triode Q12 collector and emitter, and triode Q12 base stage is connected to triode Q4 colelctor electrode, and three
Pole pipe Q4 grounded emitter, triode Q4 base stage are treating the burning of programming chip with treating that the upper electric end of programming chip is connected
Write in test process, it is high level that control element, which controls electric control end, and at the end of programming is tested, control element control is upper automatically controlled
End processed is low level.
More preferably, resistance R49, triode Q3, resistance are additionally provided between described upper electric control end and triode Q12
R51 and triode Q11, described upper electric control end are connected to triode Q3 base stage, triode Q3 transmitting by resistance R49
Pole is grounded, and triode Q3 colelctor electrode is connected to triode Q11 base stage, triode Q11 colelctor electrode and three by resistance R51
Pole pipe Q12 emitter stage is connected.
The invention further relates to a kind of side that fever writes chips power-on time Self Adaptive Control is realized based on described system
Method, it is characterised in that described method comprises the following steps:
(1) operation of the operating element detection user described in simultaneously judges the action type of user;
(2) operating element described in sends out automatic adjusument open signal when detecting that operation is opened in automatic adjusument
Deliver to described control element;
(3) control element described in treats programming chip using current default power-on time and carries out programming test, and in
Programming test is re-started after current default power-on time is adjusted during programming test crash, stops burning when being successfully tested to programming
Test is write, and records the default power-on time after adjustment.
It is preferred that described step (1), comprises the following steps:
The operation of operating element detection user described in (1-1);
Operating element described in (1-2) judges the action type of user, if operation is opened in automatic adjusument, then continues
Step (2), if programming starts to operate, then continue step (1-3);
Operating element described in (1-3) sends programming commencing signal to described control element;
Control element control electrifying control circuit described in (1-4) treats programming chip and carries out electricity, and in current pre-
If after power-on time, treat programming chip and carry out programming content importing, then terminate to exit.
More preferably, described operating element is button, described step (1-2), is specially:
Described button judges whether user's depresses button duration is more than or equal to the default regulation opening time, if it is,
Then continue step (2), otherwise continue step (1-3).
It is preferred that described step (3), comprises the following steps:
Control element described in (3-1) treats programming chip using current default power-on time and carries out programming test;
Control element described in (3-2) obtains programming result and judges that programming tests whether success, if it is, continuing to walk
Suddenly (3-3), step (3-4) is otherwise continued;
The default power-on time of control element adjustment currently described in (3-3), then proceedes to step (3-1);
The default power-on time after control element record adjustment and end described in (3-4) exit.
More preferably, the default power-on time of described control element adjustment, it is specially:
Described control element increases default variable quantity on current default power-on time, as presetting after adjustment
The electric time.
More preferably, it is described to treat to be provided with triode QM21 between the upper electric end of programming chip and earth terminal, described three
Pole pipe QM21 collector and emitter, which is connected to, to be treated between the upper electric end of programming chip and earth terminal, described step (3-1),
Comprise the following steps:
Control element control electrifying control circuit described in (3-1-1) treats programming chip and carries out electricity, and controls three poles
Level at pipe QM21 base stage is low level;
Control element described in (3-1-2) treats programming chip and carries out programming content after current default power-on time
Import;
Control element described in (3-1-3) stops treating electric on programming chip, reception programming knot after programming test terminates
Fruit, and it is high level to control the voltage at triode QM21 base stage.
Further, described electrifying control circuit includes triode Q12, resistance R55 and triode Q4, triode
Q12 emitter stage is connected with upper electric control end, and triode Q12 colelctor electrode is with treating that the upper electric end of programming chip is connected, electricity
Resistance R55 both ends are connected to triode Q12 collector and emitter, and triode Q12 base stage is connected to triode Q4 current collection
Pole, triode Q4 grounded emitter, triode Q4 base stage with treating that the upper electric end of programming chip is connected,
Described control element control electrifying control circuit treats programming chip and carries out electricity, is specially:
It is high level that described control element, which controls electric control end,;
Described control element stops treating electricity on programming chip after programming test terminates, and is specially:
It is low level that described control element, which controls electric control end,.
The system and method for realizing fever writes chips power-on time Self Adaptive Control in the invention is employed, is had such as
Lower beneficial effect:
(1) employing button adaptively sets the scheme of power-on time to realize to the controllable of power-on time, in regulating time
During, the power-on time that can make the normal programming of chip is obtained, the time can meet the burning of the chip of a batch
Write demand, in power process, using discharge circuit, reach the process faster discharged, it is short that the program does not influence fever writes not only
The function of road protection, compared with extending the set time, also substantially reduce the time;
(2) present invention can have various power-on time demands in the case where ensureing to protect fever writes for programming
Chip;
(3) without carrying out the electric capacity on different time modifications, or dismounting PCB to different PCB again;
(4) for batch programming, shortening time that can be relatively good, programming efficiency is ensured.
Embodiment
In order to more clearly describe the technology contents of the present invention, carried out with reference to specific embodiment further
Description.
For above-mentioned during MCU chip programming, need to burn on the pcb board for be welded with component in some cases
Write, and the electric capacity of the component on PCB, particularly power end, understand electricity and power-off time in strong influence.Present invention employs
A kind of system and method for realizing fever writes chips power-on time Self Adaptive Control, realized using software and hardware power is opened
With pass, and power supply is turned on ground during power-off and discharged, and by squeezing into programming sequential during constantly regulate programming MCU chip
The power-on time of preceding needs, power-on time and power-off time required for the programming chip are automatically derived, improve programming chip
Efficiency.
This realize fever writes chips power-on time Self Adaptive Control system include chip attachment component, operating element,
Control element and electrifying control circuit, described electrifying control circuit by chip attachment component with treating that programming chip is connected,
Described control element is connected with described chip attachment component, operating element and electrifying control circuit simultaneously, wherein described
System there is following mode of operation:
The operation of described operating element detection user, when described operating element detects that operation is opened in automatic adjusument
When, automatic adjusument open signal is sent to described control element;When described control element receives automatic adjusument
During open signal, described control element using current default power-on time treat programming chip carry out programming test, and in
Programming test is re-started after current default power-on time is adjusted during programming test crash, stops burning when being successfully tested to programming
Test is write, and records the default power-on time after adjustment;When each programming test starts, the control of described control element is upper automatically controlled
Circuit processed treats programming chip and carries out electricity, and after current default power-on time, treats programming chip and carry out programming content
Import, programming result is received after programming terminates.
A kind of preferably in embodiment, described chip attachment component for place treat programming chip treat programming chip
Slot treats programming chip interface.Interface and slot, the purpose that both are set is consistent, is provided to and treats that programming chip is led to
Letter, is intended merely to the different demands for meeting user, can use interface or slot according to the type selecting for treating programming chip.
The core of control element is a piece of STM32 microprocessors, for realizing the control to whole system.
In a kind of preferably embodiment, described system also has following mode of operation:
When described operating element detects that programming starts operation, programming commencing signal is sent to described control member
Part;
When described control element receives programming commencing signal, control electrifying control circuit treats the progress of programming chip
Upper electricity, and after current default power-on time, treat programming chip and carry out programming content importing.
Default power-on time during programming test process and programming is same storage value, i.e. two different processes
But same value can be all used, the value that can preset power-on time to this according to test case when programming is tested is adjusted
It is whole, and the default power-on time after each adjustment is stored as new default power-on time, in the test of programming next time or
During programming, current default power-on time as next time;And if user selects direct programming, then it can directly select this
Default power-on time carries out programming (no matter this default power-on time is before adjusting or after adjustment).
This mode of operation is applied to when one after the default power-on time automatic adjusument of programming chip is good, acquisition
Meet the default power-on time of the chip, and for treating programming chip with a batch of, the default power-on time can be applied straight
Row programming is tapped into, and without re-starting power-on time Self Adaptive Control again.It is possible thereby to greatly improve operating efficiency.
In a kind of more preferably embodiment, described operating element is button, when user's depresses button duration is less than in advance
If adjust the opening time, the operation is that programming starts to operate, and is opened when user's depresses button duration is more than or equal to default regulation
When opening the time, the operation is that operation is opened in automatic adjusument.
In a kind of more preferably embodiment, described system also includes display element, described display element with it is described
Control element be connected, described display element is to the current chip programming state of display control element or automatic adjusument
State.As shown in figure 1, the display element can be LCD display or other are adapted to the display device that uses.
It is described to treat to be provided with short circuit between the upper electric end of programming chip and earth terminal a kind of preferably in embodiment
Controlling switch, in the programming test process of programming chip is treated, the upper electricity of programming chip is treated in the switch control of described fault control
Connection is disconnected between end and earth terminal, when completion is tested in programming, programming chip is treated in the switch control of described fault control
Connected between upper electric end and earth terminal.
In a kind of more preferably embodiment, described fault control switch includes triode QM21, described triode
QM21 collector and emitter, which is connected to, to be treated between the upper electric end of programming chip and earth terminal, is surveyed in the programming for treating programming chip
During examination, the voltage at described triode QM21 base stage is low level, when completion is tested in programming, described triode
Voltage at QM21 base stage is high level.
In a kind of preferably embodiment, described electrifying control circuit includes triode Q12, resistance R55 and three poles
Pipe Q4, triode Q12 emitter stage are connected with upper electric control end VddCtrl, and triode Q12 colelctor electrode is with treating programming chip
Upper electric end VDD be connected, resistance R55 both ends are connected to triode Q12 collector and emitter, triode Q12 base stage
It is connected to triode Q4 colelctor electrode, triode Q4 grounded emitter, triode Q4 base stage and the upper electricity for treating programming chip
End is connected, and in the programming test process of programming chip is treated, it is high level that control element, which controls electric control end, and programming is tested
At the end of, it is low level that control element, which controls electric control end,.
In a kind of more preferably embodiment, resistance is additionally provided between described upper electric control end and triode Q12
R49, triode Q3, resistance R51 and triode Q11, described upper electric control end are connected to triode Q3 base by resistance R49
Pole, triode Q3 grounded emitter, triode Q3 colelctor electrode are connected to triode Q11 base stage, three poles by resistance R51
Pipe Q11 colelctor electrode is connected with triode Q12 emitter stage.
With the structure in Fig. 2, to further illustrate, fever writes carry out upper electricity and programming to chip in one embodiment below
Principle:
VDD is to be added in the voltage treated on programming chip in Fig. 2, is defined as electric terminal voltage in the present invention, VddCtrl,
PDA is the I/O port of control element.VddCtrl is the open and close for controlling vdd voltage, is defined as in the present invention automatically controlled
Terminal voltage processed.PDA pins are whether control VDD is connected with GND.Before treating that programming chip starts programming, programming chip is treated
It is not added with power supply, that is to say, that vdd voltage 0.
When programming flow starts, PDA is low level, and it is high level that VddCtrl, which is opened, and due to R55 presence, VDD can not
The magnitude of voltage at VDD_I points in Fig. 2 is directly reached, only reaches certain voltage value, when triode Q12 is turned on, VDD can just reach
The process of one fast powering-up, the flow are to prevent when VDD and the GND short circuit of programming chip, to fever writes hardware strap
To damage.So the protection circuit in dotted line frame is particularly significant.
In software, after it be high level to set pin VddCtrl, delay certain time interval T 1, i.e., when current default electric
Between, then start to squeeze into the burning sequential for treating programming chip.Now, there is electric capacity if treating the power end of programming chip, i.e. vdd terminal has
Electric capacity, VDD can be caused to be lengthened in the time for rising to the voltage that can turn on triode Q12, if VDD is electric within the T1 times
Pressure does not rise to predetermined voltage, and fever writes start to squeeze into sequential after current default power-on time remains set to T1, then just
Can not normal programming, now need current default power-on time T1 increase to adjustment after default power-on time T2,
Can normal programming.
It is during chip programming, it is necessary to upper electric again after being powered off to chip.Power process due to electric capacity presence, it is necessary to
The process of one electric discharge.If now VDD is not reduced to 0 completely, just to electricity on chip, some chips can be caused not to be normally carried out
Programming.Herein, it is necessary to which pin PDA is set into high level after VDD is powered off, one is carried out quickly by VDD and GND short circuits
Discharge process.Herein, the default power-on time T2 that discharge time is also adjusted with automatic time after obtained adjustment is relevant.By reality
Test, herein increase by 3 × T2 times discharge time, can discharge completely, vdd voltage is down to 0.
The invention further relates to a kind of side that fever writes chips power-on time Self Adaptive Control is realized based on described system
Method, it is characterised in that described method comprises the following steps:
(1) operation of the operating element detection user described in simultaneously judges the action type of user;
(2) operating element described in sends out automatic adjusument open signal when detecting that operation is opened in automatic adjusument
Deliver to described control element;
(3) control element described in treats programming chip using current default power-on time and carries out programming test, and in
Programming test is re-started after current default power-on time is adjusted during programming test crash, stops burning when being successfully tested to programming
Test is write, and records the default power-on time after adjustment.
In a kind of preferably embodiment, described step (1), comprise the following steps:
The operation of operating element detection user described in (1-1);
Operating element described in (1-2) judges the action type of user, if operation is opened in automatic adjusument, then continues
Step (2), if programming starts to operate, then continue step (1-3);
Operating element described in (1-3) sends programming commencing signal to described control element;
Control element control electrifying control circuit described in (1-4) treats programming chip and carries out electricity, and in current pre-
If after power-on time, treat programming chip and carry out programming content importing, then terminate to exit.
In a kind of more preferably embodiment, described operating element is button, described step (1-2), is specially:
Described button judges whether user's depresses button duration is more than or equal to the default regulation opening time, if it is,
Then continue step (2), otherwise continue step (1-3).
In a kind of preferably embodiment, described step (3), comprise the following steps:
Control element described in (3-1) treats programming chip using current default power-on time and carries out programming test;
Control element described in (3-2) obtains programming result and judges that programming tests whether success, if it is, continuing to walk
Suddenly (3-3), step (3-4) is otherwise continued;
The default power-on time of control element adjustment currently described in (3-3), then proceedes to step (3-1);
The default power-on time after control element record adjustment and end described in (3-4) exit.
In a kind of more preferably embodiment, the default power-on time of described control element adjustment, it is specially:
Described control element increases default variable quantity on current default power-on time, as presetting after adjustment
The electric time.
It is described to treat to be provided with three poles between the upper electric end of programming chip and earth terminal in a kind of more preferably embodiment
Pipe QM21, described triode QM21 collector and emitter, which is connected to, to be treated between the upper electric end of programming chip and earth terminal,
Described step (3-1), comprises the following steps:
Control element control electrifying control circuit described in (3-1-1) treats programming chip and carries out electricity, and controls three poles
Level at pipe QM21 base stage is low level;
Control element described in (3-1-2) treats programming chip and carries out programming content after current default power-on time
Import;
Control element described in (3-1-3) stops treating electric on programming chip, reception programming knot after programming test terminates
Fruit, and it is high level to control the voltage at triode QM21 base stage.
In a kind of further embodiment, described electrifying control circuit include triode Q12, resistance R55 and
Triode Q4, triode Q12 emitter stage are connected with upper electric control end, and triode Q12 colelctor electrode is with treating programming chip
Upper electric end is connected, and resistance R55 both ends are connected to triode Q12 collector and emitter, and triode Q12 base stage is connected to
Triode Q4 colelctor electrode, triode Q4 grounded emitter, triode Q4 base stage is with treating that the upper electric end of programming chip is connected
Connect, described control element control electrifying control circuit treats programming chip and carries out electricity, is specially:Described control element control
Electric control end is high level in system;Described control element stops treating electricity on programming chip after programming test terminates, specifically
For:It is low level that described control element, which controls electric control end,.
One of the method for the power-on time Self Adaptive Control in the present invention is further illustrated with the flow in Fig. 3 below
Embodiment:
During using fever writes programming chip, programming operation can be carried out by button.Herein, long-button function is changed,
, can be with entry time automatic adjusument pattern after long keying 3 seconds, this 3 seconds are the default regulation opening time recited above, should
Time value can be modified and set, and " Time Testing ... ", regulation are completed for display on the LCD display of fever writes
Afterwards, display " TimeTest OK ", can not such as be adjusted, for example non-correct placement chip situation, LCD display show on LCD display
Show " TimeTest Err ".Default power-on time T2 after being adjusted.
Herein, so that the control flow in the electrifying control circuit and Fig. 3 in using Fig. 2 is come programming MCU chip as an example, write from memory
In the case of recognizing, on VDD after electricity, time delay 200us, you can normal programming.If necessary in the case where there is external capacitor
Programming is carried out, it is necessary to increase time delay, the time is relevant with external capacitive size.Now in the case of default time 200us,
Normal programming can not be carried out, if now needing the programming chip, in the case where program can not be changed, external capacitive can only be torn open
Or modification fever writes hardware.Now push button 3 seconds, fever writes, which enter, automatically adjusts time state, internal after adjusting successfully
Default power-on time T2 after being adjusted, subsequently again programming when, the upper electric extension time increases to T2, during programming
The power-off delay time also increases to 3 × T2 so that during vdd voltage can rise to VDD_I, and earth terminal and drop to 0, i.e.,
Level it is identical.The current default power-on time of the T1 as present invention in Fig. 3, T2=T1+2ms;T2 is the present invention's
Default power-on time after adjustment, then the default power-on time value after adjustment is carried out more to current default power-on time
Newly.
In addition, the technical scheme described in the present embodiment is before programming chip, by way of long keying, automatic
To the upper electricity required for the programming batch chip and power-off delay time, the power on delay time is current default upper electricity herein
Time, power-off delay time are discharge time mentioned above, to meet the normal programming of the batch chip.It is same from now on
During the normal programming of batch chip, it is only necessary to short-press button, open normal programming flow.
In consideration of it, upper computer software can be utilized, allow and be manually entered time parameter values, to obtain the upper electricity of relatively good one
And power-off delay, for ensureing the normal programming of a batch chip.But the program is disadvantageous in that, it is necessary to first connect
Computer, and need to continuously attempt to be manually entered time value, can just get one can be with the parameter value of programming chip.Cause
This, is a kind of preferred embodiment by the way of by key control, but the present invention is not limited only to such a regulative mode.
The system and method for realizing fever writes chips power-on time Self Adaptive Control in the invention is employed, is had such as
Lower beneficial effect:
(1) employing button adaptively sets the scheme of power-on time to realize to the controllable of power-on time, in regulating time
During, the power-on time that can make the normal programming of chip is obtained, the time can meet the burning of the chip of a batch
Write demand, in power process, using discharge circuit, reach the process faster discharged, it is short that the program does not influence fever writes not only
The function of road protection, compared with extending the set time, also substantially reduce the time;
(2) present invention can have various power-on time demands in the case where ensureing to protect fever writes for programming
Chip;
(3) without carrying out the electric capacity on different time modifications, or dismounting PCB to different PCB again;
(4) for batch programming, shortening time that can be relatively good, programming efficiency is ensured.
In this description, the present invention is described with reference to its specific embodiment.But it is clear that it can still make
Various modifications and alterations are without departing from the spirit and scope of the present invention.Therefore, specification and drawings are considered as illustrative
It is and nonrestrictive.