The online program updates circuit of a kind of embedded microcontroller
Technical field
The utility model relates to a kind of online program updates circuit, and the online program updates circuit of especially a kind of embedded microcontroller belongs to embedded-type control field.
Background technology
At present, the application of embedded microcontroller is very extensive, can send out embedded microcontroller as core devices like domestic electric appliances controller, commercial unit controller, digital product controller and power-supply management system, realizes the steering logic of product.The program of the steering logic of product burning just on embedded microcontroller; In the use of product, running into steering logic through regular meeting has some part not too reasonably to need adjustment in the place; If steering logic needs to revise; Just need to upgrade the program on the embedded microcontroller, the following two kinds of technology of the general use of the renewal of embedded microcontroller program:
1) the most original embedded microcontroller program updates technology does not need special program updates circuit, and is earlier good the new burning program of embedded microcontroller with the off-line cd-rom recorder, changes the renewal that embedded microcontroller original on the control panel is realized program then.This technology is directly perceived, simple; But using this technological precondition is that embedded microcontroller need disassemble from control panel; If use chip carrier to connect microcontroller and can realize dismantling easily, but influence the EMC and the interference free performance of control panel greatly with control panel; If use the mode of directly welding to make microcontroller be difficult to dismantle from control panel again, the maintenance cost of product is high.And the personnel of this Technology Need specialty use the off-line cd-rom recorder, and the maintenance cost of product is further improved, this grown place of product with make the land used maintenance cost of being separated by when far away quite outstanding, can not be as desirable microcontroller method for updating program.
2) another kind of comparatively advanced embedded microcontroller program updates technology is to use the embedded microcontroller that has ICP (at circuit programming) or ISP (in-system programming) function; Interface and circuit that online program updates is arranged on control panel; Use the online programming device to connect embedded microcontroller and computer; From computer, download to embedded microcontroller to program through the online programming device, to reach the purpose of refresh routine with burn recording software.This technology can be on control panel the direct-on-line refresh routine, reduced or remitted the inconvenience of microcontroller dismounting, but whole operation process need professional and technical personnel operation; The batch that is unfavorable for product is safeguarded; The remote maintenance that also is unfavorable for product runs into the subproblem of first kind of technology equally, and the maintenance difficulties of product is big; Maintenance cost is high, fails fundamentally well to solve the problem of embedded microcontroller program updates.
In sum, for the embedded microcontroller program updates, need be a kind of simple in structure, cheap, need not to dismantle microcontroller, the online program updates circuit of embedded microcontroller simple to operate solves above problem.
Summary of the invention
The purpose of the utility model is in order to solve the weak point of above-mentioned prior art, to provide a kind of simple in structure, cheap, need not to dismantle microcontroller, the online program updates circuit of embedded microcontroller simple to operate.
The purpose of the utility model can reach through following technical scheme:
The online program updates circuit of a kind of embedded microcontroller comprises microcontroller U1, reset controller U2, SD deck; Said microcontroller U1 is connected with the resetting pin of reset controller U2, and the resetting pin of reset controller U2 is through pull down resistor R11 ground connection; Microcontroller U1 is connected with the SD deck that inserts the SD card.
Further, the pin of said microcontroller U1 is connected with the pin of SD deck through current-limiting resistance R1, R2, R3, R4 respectively.
Wherein microcontroller U1, SD deck, the control chip U3 that resets can connect the 3.3V power supply.
Further, said microcontroller U1 is connected with the SD deck through serial ports.
The utility model adopts the SD card to deposit the program that embedded microcontroller need upgrade; The SD card is inserted into the SD deck; Microcontroller U1 extracts the program in the SD card through serial communication protocol; Through inner IAP (at the application programming) function of microcontroller U1, be burnt to the inner program storage of microcontroller U1 to the new procedures that extracts, the new procedures after burning finishes in the automatic running program storer; Need not to change components and parts, can realize the online program updates of embedded microcontroller U1 through simple operations.Because whole operation only need be inserted the SD deck with the SD card and start shooting under the situation of product shutdown, refresh routine need not to remake any operation automatically; Reduce greatly the upgrading product maintenance cost, entire circuit only need increase a cheap SD deck and 4 current-limiting resistances, and the price of entire product not have to influence basically; Entire circuit is simple in structure; Cost is low, and automaticity is high, has broad application prospects.
Description of drawings
Fig. 1 is the circuit theory diagrams of the utility model specific embodiment.
Embodiment
Be illustrated in figure 1 as the circuit theory diagrams of the utility model specific embodiment; Present embodiment comprises embedded microcontroller U1, SD deck, current-limiting resistance R1~R4, reset controller U3, pull down resistor R11; Wherein SD deck, current-limiting resistance R1~R4 configuration program refresh circuit; 14 pin of microcontroller U1 are connected with 1 pin of SD deck through current-limiting resistance R1, and 15 pin of microcontroller U1 are connected with 5 pin of SD deck through current-limiting resistance R3, and 16 pin of microcontroller U1 are connected with 7 pin of SD deck through current-limiting resistance R4; 17 pin of microcontroller U1 are connected with 2 pin of SD deck through current-limiting resistance R2, and 30 pin of microcontroller U1 are connected with 10 pin of SD deck; Reset controller U3, pull down resistor R11 constitute reset circuit, and the 7th pin of microcontroller U1 is connected with the 3rd pin preset pin of the end of following connecting resistance R11 and reset controller U3.
In the present embodiment, said microcontroller U1 the 9th, 24,36,48 pin, SD deck the 4th pin, reset controller U3 the 1st pin can connect the 3.3V power supply.Said microcontroller U1 the 8th, 23,35,47 pin, SD deck the 3rd, 6,12,13,14,15 pin, reset controller U3 the 2nd pin can ground connection.Said SD deck is used for for reading the SD card interface circuit being provided.
The principle of work of present embodiment:
Do not insert at the SD card under the situation of SD deck, provide the reduction with good signal that microcontroller U1 is resetted by reset controller U3 after circuit powers on, then the program of microcontroller U1 operation internal program memory.Insert when the SD card under the situation of SD deck; Circuit powers on after microcontroller U1 completion resets; Before the program of operation internal program memory; Detect the SD card through 30 pin and inserted the SD deck, start COM immediately and read and search that to have in the SD card deny suitable refresh routine, if there is not the just direct program of operation microcontroller U1 internal program memory of suitable refresh routine; If detect IAP (at the application programming) function that suitable refresh routine promptly starts microcontroller U1; Be burnt to the inner program storage of microcontroller U1 to the new procedures that extracts, the new procedures after burning finishes in the automatic running program storer, the online program updates of realization embedded microcontroller.
The above; Be merely the preferable specific embodiment of the utility model; But the protection domain of the utility model is not limited thereto; Any technician who is familiar with the present technique field is equal to replacement or changes according to the technical scheme of the utility model and utility model design thereof in the scope that the utility model discloses, and all belongs to the protection domain of the utility model.