Summary of the invention
Main purpose of the present invention provides a kind of data-updating method that is convenient for people to carry out the ID identity device of Data Update;
Another object of the present invention provides a kind of data-updating method of saving the ID identity device of power consumption.
For realizing above-mentioned main purpose; In the ID identity device data-updating method provided by the invention; The ID identity device is provided with microprocessor; This microprocessor has interconnective microprocessing unit and online programming timer; And be provided with can be by the memory of microprocessing unit access; This memory stores has the environmental light brightness threshold value; The ID identity device also is provided with by the power unit of power processor to microprocessor power supply; The wireless signal delivery unit that is connected with microprocessor; And the environmental light brightness detection module that is connected with microprocessor
This method comprises
Microprocessor is by environmental light brightness detection module testing environment brightness actual value, judge that whether the environmental light brightness actual value is less than the environmental light brightness threshold value, in this way, microprocessing unit enters the dormancy program, as denying, the initial value of online programming timer is set, and the online programming timer is from the initial value timing of successively decreasing, and is zero to stop timing until clocking value;
Microprocessor before promptly the online programming timer stops timing, receives data updated by the wireless signal delivery unit in the timing time of online programming timer.
By such scheme as seen, microprocessor is to receive data updated by the wireless signal delivery unit, therefore, when the ID identity device is carried out more new data, only need to use the equipment that can send wireless signal, have the wireless signal that upgrades data to the wireless signal delivery unit emission of ID identity device and get final product.Like this, more during new data, do not need the ID identity device taken off with external equipment and carry out wired connection, make things convenient for the staff that the data of ID identity device are upgraded greatly.
A preferred scheme is, after microprocessor is provided with the initial value of online programming timer, judge whether the wireless signal delivery unit receives wireless signal, in this way, microprocessing unit enters the online programming pattern, as denying, whether the clocking value of judging the online programming timer is zero, in this way, and the end data refresh routine, as not, continue to judge whether to receive wireless signal.
This shows that microprocessor is to receive data updated before the clocking value of online programming timer is zero, and no longer receives data updated after online programming timer clocking value is zero.Therefore, the ID identity device only is in the state of emission data after the timer clocking value is zero, need not switch back and forth in emission data and the state that receives new data more, reduces the consumption of ID identity device to electric energy.
Embodiment
Referring to Fig. 1, be the structural representation block diagram of ID identity device among the data-updating method embodiment of ID identity device of the present invention.In the present embodiment, the ID identity device comprises power unit 1, power processor 2, environmental light brightness detection module 4, microprocessor 5, infrared ray transceiver module 6, radio frequency transceiving module 8 and data download interface 9.Wherein, infrared ray transceiver module 6 and radio frequency transceiving module 8 are formed the wireless signal delivery unit of ID identity device.
Microprocessor 5 is cores of ID identity device, and it has microprocessing unit 51, memory 52 and online programming timer 53 etc.Wherein, microprocessing unit 51 is controlled various message pick-ups and transmissions, and the information of receiving is handled, and microprocessing unit 51 can also enter operating state or park mode according to power supply situation, surrounding environment brightness situation simultaneously.
Memory 52 can be by microprocessing unit 51 visit, and stores information such as the ID identification code of multiple program, one or more particular commodities and surrounding environment light luminance threshold.Certainly, the memory of present embodiment can be multiple different memory, and as RAM, FLASH etc., these all are memories well-known to those skilled in the art.
Online programming timer 53 is timers of the timing of successively decreasing automatically, and after microprocessing unit 51 was provided with the initial value of its timing, online programming timer 53 promptly began to successively decrease automatically timing from initial value, and timing always to clocking value is the zero timing that just stops.
Power unit 1 can be storage batterys such as nickel-cadmium, nickel-metal hydrides, lithium ion, and it provides power supply by power processor 2 to microprocessor 5.Power processor 2 comprises toggle switch, rectification circuit and a voltage stabilizing circuit etc., and the power supply that power unit 1 is provided provides stable driving power to microprocessor 5 after over commutation, voltage stabilizing are handled.
Environmental light brightness detection module 4 mainly comprises environmental luminance sensor, be used to detect the situation of ID identity device surrounding environment brightness, and detected environmental light brightness actual value is sent to microprocessor 5, if little processing is judged when surrounding environment brightness actual value is lower than threshold value for single 51 yuan, enter the dormancy program, to reduce the consumption of electric energy.
Infrared ray transceiver module 6 and radio frequency transceiving module 8 are formed the wireless signal delivery unit of present embodiment, can infrared signal or the mode of radio frequency signal receive wireless signal from external equipment, and to the infrared signal or the radio frequency signal of the ID identification code of reader emission expression ID commodity that identity device identifies.Certainly, infrared signal, the radio frequency signal of infrared ray transceiver module 6, radio frequency transceiving module 8 receptions include the ID identification code that needs upgrade.
Data transfer interface 9 is used for primary data is sent to microprocessor 5, as the driver of microprocessor 5, initial ID identification code etc.Certainly, if the supermarket staff need be updated to lot of data in the microprocessor 5, also can will need data updated to be sent to microprocessor 5 by data transfer interface 9.
After the ID identity device is started working, microcontroller 5 will detect the actual value of surrounding environment brightness by environmental light brightness detection module 4, with the actual value of environmental light brightness be stored in the memory 52 the environmental light brightness threshold ratio, when judging the environmental light brightness actual value greater than the environmental light brightness threshold value, in the time of a setting, carry out the renewal of data, promptly receive and store the information such as ID identification code that external equipment sends.
Therefore, when the staff need carry out Data Update to the ID identity device, should make the environmental light brightness detection module 4 of ID identity device detect the surrounding environment brightness and be lower than threshold value, promptly allow the ID identity device place dark state, be placed on the state of light thereupon, and after the ID identity device places than bright state, comprise the wireless signal that needs data updated to its emission rapidly.
Referring to Fig. 2, be the schematic appearance of ID identity device and sleeve among the data-updating method embodiment of ID identity device of the present invention.As seen from Figure 2, ID identity device 11 is vertically hung at the supermarket on the ceiling, and it comprises housing 12, offers a plurality of lightlng holes 13 on housing 12.Lightlng hole 13 is a manhole, and environmental light brightness detection module 4 can detect surrounding environment brightness actual value by lightlng hole 13.
Sleeve 21 is made up of cylindrical shell 22 and cramp bar 23, and cylindrical shell 22 is the annular tube of an end opening, and its outer wall is by opaque material, as formation such as black plastics.Cramp bar 23 is arranged on the below of cylindrical shell 22, and is connected with cylindrical shell 22 lower ends, makes things convenient for the staff that cylindrical shell 22 is lifted.
When ID identity device 11 is carried out Data Update, with the cylindrical shell 22 of sleeve 21 be placed on ID identity device 11 under, as shown in Figure 2.Then, cramp bar 23 is upwards lifted, then cylindrical shell 22 is enclosed within on the ID identity device 11, and the environmental light brightness detection module 4 of ID identity device 11 promptly detects surrounding environment brightness actual value and is lower than threshold value.After the staff took off sleeve 21, environmental light brightness detection module 4 just detected surrounding environment brightness actual value greater than threshold value, and infrared ray transceiver module 6 and radio frequency transceiving module 8 be receiving infrared-ray signal and radio frequency signal just.
The ID identity device more new data flow chart as shown in Figure 3.After the ID identity device is started working, at first start microprocessing unit and all circuit of microprocessor, and finish the guiding of required software and the initialization of interior each assembly of elements of microprocessor.
Then, microprocessor detects surrounding environment brightness actual value by the environmental light brightness detection module, and execution in step S1, environmental light brightness actual value and the environmental light brightness threshold value that is stored in the memory are compared, whether judge the environmental light brightness actual value greater than the environmental light brightness threshold value, execution in step S3 then in this way, otherwise, execution in step S2, microprocessing unit enter the dormancy program.After microprocessing unit enters the dormancy program, to be in park mode, park mode can be the park mode that microprocessing unit carries, it also can be the park mode of realizing by programming, microprocessing unit consumed power under park mode is far smaller than the electric energy that consumes under the operate as normal, to save the consumption of electric energy.
Certainly, microprocessing unit will be set dormancy time before entering park mode at every turn, as 30 seconds, dormancy time to after promptly wake up, and execution in step S1 once more judges that whether the environmental light brightness actual value is greater than the environmental light brightness threshold value, with this continuous periodic duty, greater than threshold value, carry out Data Update work until judgement environmental light brightness actual value, perhaps the power module power consumption of ID identity device finishes.
As shown in Figure 2, sleeve 21 is enclosed within on the ID identity device 11, and environmental light brightness detection module 4 will judge that surrounding environment brightness actual value is lower than the environmental light brightness threshold value, enters the dormancy program.After sleeve 21 taken off, environmental light brightness detection module 4 just detected the environmental light brightness actual value greater than the environmental light brightness threshold value, and microprocessing unit promptly is waken up, and carried out following operation.
Referring to Fig. 3, after microprocessing unit wakes up, execution in step S3, the initial value of setting online programming timer, the online programming timer promptly begins to successively decrease automatically timing from initial value.Then, whether microprocessor judges receives radio frequency signal, be execution in step S4, if receive radio frequency signal, execution in step S6 then, otherwise execution in step S5, whether the clocking value of further judging the online programming timer is zero, if the clocking value of online programming timer is zero, then the time of expression reception radio frequency signal finishes, and the Data Update program also finishes simultaneously.If the clocking value of online programming timer is non-vanishing, then return execution in step S4, continue to wait for the reception radio frequency signal.
After microprocessing unit receives radio frequency signal, just enter the online programming pattern, at first execution in step S6 judges that whether the radio frequency signal that receives includes the data that are fit to form, promptly comprises the ID identification code that is fit to form, if have, then execution in step S7 is stored in the ID identification code that receives on the address of appointment in the memory, if the ID identification code form that the radio frequency signal that receives comprises is not suitable for, then execution in step S5 judges whether the clocking value of online programming timer is zero.
Among the step S8, whether the microprocessor judges radio frequency signal receives, if do not receive, then continue to receive radio frequency signal, and execution in step S6, judge whether the radio frequency signal that receives includes the ID identification code that is fit to form.If radio frequency signal receives, zero clearing online programming timer then, promptly execution in step S9 returns execution in step S5 then, judges further whether the clocking value of online programming timer is zero.At this moment, microprocessing unit can judge that the clocking value of online programming timer is zero, the end data refresh routine.
After the Data Update EP (end of program), microprocessor just begins to launch the ID identification code that is stored in the memory by infrared ray transceiver module or radio frequency transceiving module, just enters the data transmission state.
Certainly, in the present embodiment, the ID identity device receives radio frequency signal by radio frequency transceiving module, to realize receiving the ID identification code of upgrading.During practical application of the present invention, can also receive the infrared signal that include the ID identification code, receive data updated, also can realize purpose of the present invention with this by infrared module.
This shows, the ID identity device is that the mode with wireless signal receives and needs data updated, radio frequency transceiving module or infrared ray transceiver module that the staff in supermarket only need use the memory device with emission wireless signal function to transmit data to the ID identity device get final product, do not need the ID identity device taken off with computer and be connected, greatly make things convenient for the staff to carry out the operation of Data Update.
Simultaneously, microprocessing unit could receive the also data of storage update before the clocking value of online programming timer is zero, after the clocking value of online programming timer is zero, when just the online programming timer is not in timing time, microprocessing unit does not carry out the work of Data Update, can avoid microprocessing unit to switch back and forth between Data Update state and emission data mode like this.
Because microprocessor needs to consume more electric energy under the Data Update state, and consumed power is less under the emission data mode, therefore, if microprocessor does not switch between Data Update state and emission data mode back and forth, and be in the emission data mode for a long time, can significantly reduce the consumption of electric energy.
Certainly, ID identity device of the present invention is not limited to be applied in sign extensive stock in the supermarket, can also use as places such as conference and exhibition center, museum, airports at other.For example, can place it in each sight spot of tourist district, the employing wireless radio frequency signal is emitted to the information of each sight spot ID identification code on visitor's the reader, and is introduced the relevant information at each sight spot to the visitor by reader.
At last, it is emphasized that to the invention is not restricted to above-mentioned execution mode, such as the change of wireless signal delivery unit, use and increase progressively timer automatically and substitute minor variations such as online programming timer and also should be included in protection scope of the present invention.