CN101763886A - Microcontroller programming system and method - Google Patents

Microcontroller programming system and method Download PDF

Info

Publication number
CN101763886A
CN101763886A CN200910253718A CN200910253718A CN101763886A CN 101763886 A CN101763886 A CN 101763886A CN 200910253718 A CN200910253718 A CN 200910253718A CN 200910253718 A CN200910253718 A CN 200910253718A CN 101763886 A CN101763886 A CN 101763886A
Authority
CN
China
Prior art keywords
programming
programmable device
code file
data code
microcontroller
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
CN200910253718A
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.)
SHANGHAI GEZHOU ELECTRONIC CO Ltd
Original Assignee
SHANGHAI GEZHOU ELECTRONIC 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 SHANGHAI GEZHOU ELECTRONIC CO Ltd filed Critical SHANGHAI GEZHOU ELECTRONIC CO Ltd
Priority to CN200910253718A priority Critical patent/CN101763886A/en
Publication of CN101763886A publication Critical patent/CN101763886A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Storage Device Security (AREA)

Abstract

The invention relates to a microcontroller programming system, which includes a server terminal, a client, and a programming unit. The server terminal is used for encrypting a data code file and transmitting the encrypted data code file; the client can be connected remotely with the server terminal and can be communicated with the server terminal; the programming unit can be locally connected with the client, the programming unit receives and stores the encrypted data code file through the client; moreover, when the number of allowable programming times is more than zero, the programming unit can decrypt the encrypted data code file and write the reduced data code file into a microprocessor; after one successful programming, the value obtained by deducting one from the number of the allowable programming times is allowed serving as the number of updated allowable programming times and recorded in the programming unit. The microcontroller programming system can lead users to independently implement programming so as to save cost, and simultaneously control the programming times to avoid the users from illegally copying and programming unboundedly.

Description

Microcontroller programming system and method
Technical field
The present invention relates to a kind of programing system and method for microcontroller, especially a kind of can to microcontroller upgrade the programming system and method.
Background technology
Microcontroller is because cost is more and more lower, and performance from strength to strength, makes that its application is ubiquitous, is widely used in every field such as industry control, consumer electronics, automobile.In Electric Machine Control, bar-code reader/scanner, consumer electronics, game station, phone, HVAC, building safety and gate inhibition's control, Industry Control and robotization and white domestic appliances fields such as (washing machine, micro-wave ovens).
Along with the improvement of product function, often to upgrade to microcontroller, at this moment need the good program of reprogramming, HEX (sexadecimal) program code for example is in the storer of programming in the microcontroller.Existing programming device, as shown in Figure 5, programmable device 50 connects PC 40 and microcontroller (MCU) 60 respectively, earlier the operation PC stores the HEX program code in the storer of programmable device, operate then programmable device with the programming of HEX program code in microcontroller.
From existing programming process as can be seen,, then can not control the bootlegging of user, promptly can produce problem of piracy program if directly give the user programming voluntarily with the HEX program code.Even if the HEX program code encrypted and the programming number of times limited and send the user again to, after the user also can reach higher limit at the programming number of times of HEX program code, again store into the HEX program code in the programmable device again, get final product programming once more, thereby avoid this encryption and number of times limiting means easily, reach the purpose of unrestricted programming.For this reason, present way can only be carried software and programming device and be arrived the user place voluntarily by the technician of the manufacturer of microcontroller, carries out on-the-spot programming, does not allow user direct contact arrive the HEX program code, to avoid taking place the situation of bootlegging.
But such mode needs the technician to reach the spot, and has increased the business travel cost of production firm greatly, under a lot of situation of the client of needs service, also can delay update time, causes client's use inconvenience.
Summary of the invention
For this reason, technical matters to be solved of the present invention is to provide a kind of microcontroller programming system, and it can allow the user carry out programming voluntarily to save cost, simultaneously the programming number of times is controlled, and avoids user's bootlegging and unrestrictedly programming.
In order to reach above-mentioned purpose, the invention provides a kind of programing system of microcontroller, comprising: server end is used for the data code file encryption and transmits this ciphered data code file; Can with the long-range client that is connected of described server end, described client can be communicated by letter with described server end; And the programmable device that can be connected with described client terminal local, described programmable device receives and stores described encrypted data code file via described client, and when allowing programming time numerical value greater than zero the time, data code file after described programmable device can be deciphered the described code file of ciphered data and will reduce writes in the microcontroller, and after successful programming once, with described permission programming time numerical value deduct one as the inferior records of values of the permission programming after upgrading in described programmable device.
Preferably, above-mentioned programmable device also comprises: control module and the storer that links to each other with control module, and the described encrypted data code file that receives is stored in the described storer, and described control module comprises master chip; Deciphering module is used to decipher the encrypted data code file that receives; The programming module is used for the data code file programming after will reducing according to default parameter to microcontroller; And the record judge module, be used for judging whether to allow deciphering module and programming module to operate, and be used to write down the permission programming time numerical value of renewal according to permission programming time numerical value.
Preferably, above-mentioned record judge module, also be used to write down the time that finishes receiving of described encrypted data code file, and according to playing the current time and whether reach that the default programming term of validity judges whether to allow to be decrypted module and the programming module is operated from finishing receiving the time.
Preferably, above-mentioned programmable device also comprises and is used for the transmission interface that is connected with described client, and is used for the programming interface that is connected with described microprocessor.
Preferably, above-mentioned server end and described client are PC, and both carry out long-range connection and communication by network; Described network is the internet.
Preferably, described permission programming time numerical value is included in the described enciphered data code file or sets in advance in the record judge module of described programmable device.
Preferably, the described programming term of validity is included in the described enciphered data code file or sets in advance in the record judge module of described programmable device.
Another technical matters to be solved by this invention is to provide a kind of can allow the user carry out programming voluntarily to save cost, simultaneously the programming number of times is controlled, and avoids the user's bootlegging and the microcontroller programming method of programming unrestrictedly.
For this reason, the invention provides a kind of programmed method of microcontroller, comprising: long-range Connection Service device end and client make and set up communication between described server end and the client; Local described client and the programmable device of connecting; The data code file is encrypted and transmit at server end; Described encrypted data code file is stored in the described programmable device via described client; Connect described programmable device and the microprocessor for the treatment of programming; And whether the inferior numerical value of the permission programming of judging described programmable device is greater than zero, if described permission programming time numerical value is greater than zero, then allow described programmable device operation, with with the deciphering of the described code file of ciphered data and the data code file after will reduce write in the microcontroller, and after programming success once, will allow the inferior numerical value of programming to deduct a permission programming number of times as renewal to record in the described programmable device; If allow programming time numerical value smaller or equal to zero, then do not allow to carry out aforesaid operations.
Preferably, above-mentioned microcontroller programming method, also comprise: judge that whether play the current time from the time that finishes receiving of described encrypted data code file reaches the default programming term of validity, if do not reach the described default term of validity, then allows described programmable device to operate; If reach the described default term of validity, then do not allow described programmable device to operate.
Preferably, in the above-mentioned microcontroller programming method, described permission programming time numerical value is included in the described data file encryption or sets in advance in described programmable device.
Preferably, in the above-mentioned microcontroller programming method, the described programming term of validity is included in the described data file encryption or sets in advance in described programmable device.
After the programing system and method that adopt above-mentioned microcontroller, can be under the control of production firm, allow the client voluntarily to the microcontroller programming of upgrading, production firm needn't send the technician to serve to the scene again, has saved business travel cost greatly.In addition, because the ROMPaq file that is transmitted has carried out encryption and number of times restriction and directly stored in the programmable device, the client can't extract this ROMPaq voluntarily and carry out bootlegging; Simultaneously can not carry out unconfined duplicating to ROMPaq.
Description of drawings
Fig. 1 is the structural representation of microcontroller programming system of the present invention;
Fig. 2 is the process flow diagram of microcontroller programming method of the present invention;
Fig. 3 is the module map of programmable device in the microcontroller programming system of the present invention;
Fig. 4 is the process flow diagram of the programmed method of another embodiment of the present invention;
Fig. 5 is the microcontroller programming system synoptic diagram of prior art.
Embodiment
Shown in Figure 1, be the structural representation of microcontroller programming system of the present invention.The programing system of this microcontroller comprises: server end 1, client 2 and programmable device 3.Server end 1 and client 2 is connected and can communicates for long-range, and client 2 is connected for this locality with programmable device 3 and also can communicates.In one embodiment, this server end 1 can be a PC with client 2, realizes long-range connection by the internet; Realize local the connection by USB interface between client 2 and the programmable device 3.But the present invention does not limit this, can adopt other connection means well known to those skilled in the art yet, for example, realizes that by LAN (Local Area Network), wireless network etc. server end 1 is connected with the long-range of client 2; Perhaps for example serial port, parallel port etc. realize that client 2 is connected with this locality between the programmable device 3 by other interfaces.In addition, programmable device 3 is connected with microcontroller 4 and carries out programming.
An embodiment of programmed method of the present invention as shown in Figure 2, before microcontroller 4 programmings, server end 1 will need programming to carry out data encryption and add to allow the inferior numerical value N (N=100 for example represents that promptly this programmable device at most can 100 microcontrollers of programming) of programming to the HEX code file in the target device (being microcontroller); This encryption back data file is transmitted by client 2 according to predetermined agreement and is saved in the programmable device 3.
Programmable device 3 is kept after the data file encryption, can remove with this locality of client 2 to be connected, and is connected with the microcontroller 4 for the treatment of programming again, carries out actual programming.Before the programming, need to judge earlier to allow programming time numerical value N whether smaller or equal to zero.If N does not then allow to carry out programming smaller or equal to zero; If N then allows to carry out programming greater than zero.Can prevent that like this programmable device from unrestrictedly carrying out programming, reach the purpose of control bootlegging.
In the programming process, programmable device 3 is written to the HEX code file after the deciphering reduction in the microcontroller 4 earlier with the deciphering of HEX code file.After the programming success once, will allow the inferior numerical value N of programming to deduct 1, and the value N after will upgrading notes, whether in order to allow next time programming provides basis for estimation.
The module diagram of programmable device 3 of the present invention as shown in Figure 3, it comprises control module 31, the storer 32, programming interface 33 and the transmission interface 34 that link to each other with this control module 31 respectively.Programmable device 3 is connected with microcontroller 4 by programming interface 33, links to each other with PC as client 2 by transmission interface 34.The encryption HEX code file of downloading by client 2 is kept in the storer 32.Wherein, described storer 32 can be the Flash storer, and programming interface 33 can be 16 common core interfaces, and transmission interface 34 can be USB interface.
Control module 31 comprises a master chip 310, and this master chip can adopt single-chip microcomputer, and for example NEC16 position single-chip microcomputer also can adopt other chips well-known to those skilled in the art, and the present invention does not limit this.Control module 31 also comprises deciphering module 311, is used to decipher the encryption HEX code file of download; Programming module 312 is used for the HEX code file after will reducing according to default parameter by 33 programmings of programming interface to microcontroller 4; And record judge module 313, be used for according to allowing programming time numerical value N to control the operation of deciphering module 311 and programming module 312.That is,, allow deciphering module 311 and programming module 312 to operate, and be used to write down the actual programming number of times after the renewal when allowing programming time numerical value N greater than zero the time; If allow programming time numerical value smaller or equal to zero the time, then do not allow deciphering module and programming module to operate.
In another preferred embodiment, described record judge module 31 can also be controlled the operation of deciphering module 311 and programming module 312 by time parameter.That is, also can add default programming term of validity T in the above-mentioned encrypted data code file.For example, T=30 days, expression finished receiving from data file and allows to carry out programming in 30 days, surpassed 30 days, and then the data code file lost efficacy, even if above-mentioned permission programming limits value N does not allow programming greater than zero yet.
The process flow diagram of this embodiment as shown in Figure 4, its most of step is identical with embodiment shown in Figure 2, difference is, allows also to have added term of validity T the programming number of times limits value N except adding during encrypt file; After judging the step that allows programming time numerical value, judge the step of term of validity T again.That is, allow the programming times N greater than zero prerequisite under, current time and term of validity T are compared, when not exceeding term of validity T, can carry out above-mentioned programming and operate; When exceeding term of validity T, then do not allow to carry out programming.Can further prevent bootlegging like this.
In another embodiment, whether above-mentioned judgement allows the step of programming time numerical value in other words, can judge whether to exceed the term of validity earlier after the step of judging term of validity T, judge to allow the programming times N greater than zero again.
In order to realize the time control function in embodiment illustrated in fig. 4, also need comprise the clock (not shown) in the control module 31 shown in Figure 3, be used for writing time, whether exceed term of validity T so that judge the current time.
As other embodiment of the present invention, above-mentioned permission programming number of times limits value N and term of validity T can set in advance in programmable device 3, and needn't be transferred to programmable device 3 together by data file encryption.

Claims (16)

1. the programing system of a microcontroller is characterized in that, comprising:
Server end is used for the data code file encryption and transmits this ciphered data code file;
Can with the long-range client that is connected of described server end, described client can be communicated by letter with described server end; And
The programmable device that can be connected with described client terminal local, described programmable device receives and stores described encrypted data code file via described client, and when allowing programming time numerical value greater than zero the time, data code file after described programmable device can be deciphered the described code file of ciphered data and will reduce writes in the microcontroller, and after successful programming once, with described permission programming time numerical value deduct one as the inferior records of values of the permission programming after upgrading in described programmable device.
2. programing system according to claim 1, it is characterized in that, described programmable device comprises: control module and the storer that links to each other with control module, and the described encrypted data code file that receives is stored in the described storer, and described control module comprises master chip; Deciphering module is used to decipher the encrypted data code file that receives; The programming module is used for the data code file programming after will reducing according to default parameter to microcontroller; And the record judge module, be used for judging whether to allow deciphering module and programming module to operate, and be used to write down the permission programming time numerical value of renewal according to permission programming time numerical value.
3. programing system according to claim 2, it is characterized in that, described record judge module, also be used to write down the time that finishes receiving of described encrypted data code file, and according to playing the current time and whether reach that the default programming term of validity judges whether to allow to be decrypted module and the programming module is operated from finishing receiving the time.
4. according to claim 2 or 3 described programing systems, it is characterized in that described programmable device also comprises and be used for the transmission interface that is connected with described client, and be used for the programming interface that is connected with described microprocessor.
5. according to claim 1,2 or 3 described programing systems, it is characterized in that described server end and described client are PC, both carry out long-range connection and communication by network.
6. programing system according to claim 5 is characterized in that, described network is the internet.
7. according to claim 1,2 or 3 described programing systems, it is characterized in that described permission programming time numerical value is included in the described enciphered data code file.
8. according to claim 1,2 or 3 described programing systems, it is characterized in that described permission programming time numerical value sets in advance in the record judge module of described programmable device.
9. programing system according to claim 3 is characterized in that, the described programming term of validity is included in the described enciphered data code file.
10. programing system according to claim 3 is characterized in that, the described programming term of validity sets in advance in the record judge module of described programmable device.
11. the programmed method of a microcontroller is characterized in that, comprising:
Long-range Connection Service device end and client make and set up communication between described server end and the client;
Local described client and the programmable device of connecting;
The data code file is encrypted and transmit at server end;
Described encrypted data code file is stored in the described programmable device via described client;
Connect described programmable device and the microprocessor for the treatment of programming; And
Whether the permission programming time numerical value of judging described programmable device is greater than zero, if described permission programming time numerical value is greater than zero, then allow described programmable device operation, with with the deciphering of the described code file of ciphered data and the data code file after will reduce write in the microcontroller, and after programming success once, will allow the inferior numerical value of programming to deduct a permission programming number of times as renewal to record in the described programmable device; If allow programming time numerical value smaller or equal to zero, then do not allow to carry out aforesaid operations.
12. microcontroller programming method according to claim 11 is characterized in that, also comprises:
Judgement is played the current time from the time that finishes receiving of described encrypted data code file and whether is reached the default programming term of validity, if do not reach the described default term of validity, then allows described programmable device to operate; If reach the described default term of validity, then do not allow described programmable device to operate.
13., it is characterized in that described permission programming time numerical value is included in the described data file encryption according to claim 10 or 11 described microcontroller programming methods.
14., it is characterized in that described permission programming time numerical value sets in advance in described programmable device according to claim 10 or 11 described microcontroller programming methods.
15. microcontroller programming method according to claim 11 is characterized in that, the described programming term of validity is included in the described data file encryption.
16. microcontroller programming method according to claim 11 is characterized in that, the described programming term of validity sets in advance in described programmable device.
CN200910253718A 2009-12-10 2009-12-10 Microcontroller programming system and method Pending CN101763886A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200910253718A CN101763886A (en) 2009-12-10 2009-12-10 Microcontroller programming system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200910253718A CN101763886A (en) 2009-12-10 2009-12-10 Microcontroller programming system and method

Publications (1)

Publication Number Publication Date
CN101763886A true CN101763886A (en) 2010-06-30

Family

ID=42494997

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200910253718A Pending CN101763886A (en) 2009-12-10 2009-12-10 Microcontroller programming system and method

Country Status (1)

Country Link
CN (1) CN101763886A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102403037A (en) * 2011-11-15 2012-04-04 苏州欣华锐电子有限公司 Chip burning base and method
CN103561051A (en) * 2013-09-27 2014-02-05 深圳市芯海科技有限公司 Chip data burning remote protection system and method
CN105022651A (en) * 2015-07-29 2015-11-04 北京后易科技有限公司 Anti-piratic method in equipment production process and firmware burning device
CN107357624A (en) * 2017-07-28 2017-11-17 黑龙江连特科技有限公司 The program renewing device and update method of a kind of mobile unit
CN110717149A (en) * 2019-10-09 2020-01-21 湖南国科微电子股份有限公司 Security architecture, operation method and device thereof, and readable storage medium
CN111625248A (en) * 2020-06-01 2020-09-04 杭州万高科技股份有限公司 Programming device and encryption programming method

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102403037A (en) * 2011-11-15 2012-04-04 苏州欣华锐电子有限公司 Chip burning base and method
CN103561051A (en) * 2013-09-27 2014-02-05 深圳市芯海科技有限公司 Chip data burning remote protection system and method
CN105022651A (en) * 2015-07-29 2015-11-04 北京后易科技有限公司 Anti-piratic method in equipment production process and firmware burning device
CN105022651B (en) * 2015-07-29 2018-08-28 北京后易科技有限公司 A kind of method for preventing piracy in equipment production process and firmware programming device
CN107357624A (en) * 2017-07-28 2017-11-17 黑龙江连特科技有限公司 The program renewing device and update method of a kind of mobile unit
CN110717149A (en) * 2019-10-09 2020-01-21 湖南国科微电子股份有限公司 Security architecture, operation method and device thereof, and readable storage medium
CN110717149B (en) * 2019-10-09 2022-03-22 湖南国科微电子股份有限公司 Security architecture, operation method and device thereof, and readable storage medium
CN111625248A (en) * 2020-06-01 2020-09-04 杭州万高科技股份有限公司 Programming device and encryption programming method
CN111625248B (en) * 2020-06-01 2023-04-07 杭州万高科技股份有限公司 Programming device and encryption programming method

Similar Documents

Publication Publication Date Title
CN101390368B (en) Managing secure access to a secure digital content in a portable communicating object
CN101470411B (en) System and method for safely updating ECU data
US9425956B2 (en) Method and system for transferring firmware or software to a plurality of devices
CN101763886A (en) Microcontroller programming system and method
CN103222227B (en) System and method for wireless re-rogramming of memory in a communication system
US20100058463A1 (en) Method of exchanging data between two electronic entities
CN107251106A (en) The method securely transmitted for virtual key and the mirror method for distinguishing for mobile terminal
CN105516962A (en) Account opening method and system based on eUICC (Embedded Universal Integrated Circuit Card)
CN105939515B (en) Car-mounted terminal virtual SIM card information update system and method
CN108156155B (en) Wireless network-based biometric authentication system, mobile device and method
CN101388912A (en) Removable card and a mobile wireless communication device
CN105427106B (en) Authorization processing method and payment processing method of electronic cash data and virtual card
JP2017527892A (en) Transponder module and access module for activating and configuring the transponder module
CN102546172A (en) Access control method of intelligent card, intelligent card, terminal and system
KR20200041276A (en) Method and devices for communicating between an internet of things device and a remote computer system
CN201707918U (en) Programming system of microcontroller
CN106571917B (en) ESAM embedded safety management module of IC card intelligent gas meter
US20060080464A1 (en) System and method of utilizing a MAC address based unlocking key
US9253628B2 (en) Method of exchanging data between two electronic entities
CN108173845B (en) Metering instrument with core chip and information security interaction system
CN110445749B (en) Method for authorizing product production
CN103220133B (en) There is the remote-control intelligent gas meter of information security management function
US11868992B2 (en) Method of data transmission, corresponding device, system and computer program
JP2009163373A5 (en)
CN108494813A (en) A kind of manufacturer's remote equipment operation control system and method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20100630