CN102608908A - Method for adjusting speed of digital display electronic clock - Google Patents

Method for adjusting speed of digital display electronic clock Download PDF

Info

Publication number
CN102608908A
CN102608908A CN2012101043185A CN201210104318A CN102608908A CN 102608908 A CN102608908 A CN 102608908A CN 2012101043185 A CN2012101043185 A CN 2012101043185A CN 201210104318 A CN201210104318 A CN 201210104318A CN 102608908 A CN102608908 A CN 102608908A
Authority
CN
China
Prior art keywords
electronic clock
digital display
timer
variable
microprocessor
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
CN2012101043185A
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.)
Ludong University
Original Assignee
Ludong University
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 Ludong University filed Critical Ludong University
Priority to CN2012101043185A priority Critical patent/CN102608908A/en
Publication of CN102608908A publication Critical patent/CN102608908A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Electric Clocks (AREA)

Abstract

The invention discloses a method for adjusting the speed of a digital display electronic clock, belonging to the technical field of the combination of electronic technology and computer technology. According to the invention, the technical problem of the digital display electronic clock that only the time can be corrected but the running speed cannot be adjusted is solved. According to the method, a microprocessor, a digital display device, a plurality of buttons and a power supply unit are used. The method for adjusting the speed of the digital electronic clock disclosed by the invention is implemented by changing the time interval of interruption of a timer and can be widely applied to various digital electronic clocks in daily life and digital electronic clocks in the fields of scientific research, industrial measure and control and the like.

Description

The implementation method of the adjustable speed of digital display electronic clock
 
Technical field
 
The invention belongs to the technical field that electronic technology combines with computer technology, relate generally to the implementation method of the adjustable speed of digital display electronic clock.
 
Background technology
 
Widely-used digital display electronic clock in our daily life as the digital display electronic clock is all arranged on car, bus and big bus and the telephone set, also has the digital display electronic clock in many public arenas at present.The digitizing of clock and watch brings great convenience not only for people's productive life, and has expanded the original time reporting function of clock and watch widely.Such as timing automatic report to the police, timing automatic is rung a bell, time-program(me) control automatically, fixed time broadcast, timing automatic play closed circuit lamp, time switch baking oven, regularly electric the launching automatically etc. of break-make power-equipment even various timing.But these electronic clocks can only his-and-hers watches, can not transfer speed.The temporal information that those electronic clocks that keep bad time can provide a mistake for people or equipment, and then incur loss through delay the time of people's working or produce misoperation, serious loss or accident finally caused.The electronic clock of being forbidden when walking for these can only make these electronic clocks and standard time consistent sometime through frequent his-and-hers watches, but can not solve the problem that electronic clock keeps bad time at all.
 
Summary of the invention
 
The present invention has been mainly and has addressed the above problem; It is a kind of with single-chip microcomputer and digital display device and some buttons electronic clock that constitutes and the method for regulating the electronic clock timing rate that its purpose is to provide; Not only can his-and-hers watches; Can also regulate the speed of electronic clock through button, thus the purpose when realizing accurately walking.
To achieve these goals, adopt following technical scheme:
1) by a microprocessor, a digital display device (can be charactron, LED dot matrix, LCD LCD), several buttons and some peripheral components constitute an electronic clock system;
Variable when 2) sign being set in the electronic clock program of microprocessor whether walking and a variable of whether regulating speed are also given their all initializes 0, be provided with again timer break period at interval variable and compose a specific initial value to it;
3) pre-install initial value for the THx of timer and TLx according to following formula in timer initialization function and in the timer break in service function:
THx=(65536 – timer interval break period)/256;
TLx=(65536 – timer interval break period) %256;
4) at first press " to table button ", when this moment, electronic clock stopped to walk, then with electronic clock and standard time his-and-hers watches; After good; Click " to table button " again, when electronic clock continues to walk, wait after a while (such as 10 hours or one day) relatively electronic clock and travel-time difference of standard time;
5),, just increase the value of this variable through the "+" button if fast when electronic clock is walked if the electronic clock punctual timing just need not change the initial value of timer discontinuous variable break period when definition; If slow when walking, just reduce the value of this variable through "-" button;
6) carry out the 4th once more) step and the 5th) step operation, till punctual timing.
Its beneficial effect of implementation method of the adjustable speed of digital display electronic clock of embodiment of the present invention is: make digital display electronic clock in this way regulate the timing rate of electronic clock through regulating timing variable in the electronic clock program; Regulate through careful; In the time of finally can realizing accurately walking, temporal information accurately is provided to people; To equipment accurate timing is provided, thereby realizes control accurately.
 
Description of drawings
 
Fig. 1 is a structural representation of the present invention.
Fig. 2 is an accent speed method workflow diagram of the present invention.
 
Embodiment
To combine accompanying drawing and embodiment that the present invention is described further below.
Embodiment 1
With reference to Fig. 1; The electronic clock of adjustable speed is made up of table button (4), the "+" button (5), "-" button (6) and power module (7) microprocessor (1), digital display device (2), accent speed button (3); Power module (7) provides power supply for above each unit, these hardware through one apply mechanically the C language program run.
Its course of work is: with reference to Fig. 2, be to lean on timer/counter in the microprocessor to produce timer at regular intervals to interrupt realizing that this time interval can freely be set, and generally sets a special integer for during the walking of electronic clock.With the timer in 51 single-chip microcomputers 0 is example, can come TH0 and TL0 prepackage initial value to timer 0 according to following formula:
TH0=(65536-produces the time interval that timer interrupts)/256
TL0=(65536-produces the time interval that timer interrupts) %256
Suppose to adopt the crystal oscillator of 12MHz, the input pulse cycle of timer is exactly 1 delicate so, is set at 50 milliseconds if will produce the time interval that timer interrupts, and promptly 50000 is delicate, and so, the time interval that produces the timer interruption is exactly 50000 delicate.So top assignment expression can be write as:
TH0 = (65536?-?50000)/256
TL0 = (65536?-?50000)%256
When each generation timer 0 interrupts, in the break in service function of timer 0, give TH0 and TL0, let a millisecond variable add 1 simultaneously according to the following formula initialize; When walking in the function, when being characterizes when denying the variable ClockGo=0 when walking, and when a millisecond variable is added to 20, just let its zero clearing, let a second variable add 1 simultaneously, in program, write second carry and branch carry the program that lets then with timely carry.
But top assignment expression has individual problem, and that is exactly that the generation time that interrupts of timer can not change at interval, and this just causes electronic clock can not regulate the basic reason of speed.
Why electronic clock can regulate timing rate made in accordance with the present invention, and the time interval that will produce the timer interruption exactly changes variable into by constant, so assignment expression is programmed for:
TH0=(65536?–?t)/256
TL0=(65536?–?t)%256
Electronic clock has composed a specific numerical value when dispatching from the factory, for variable t, if the electronic clock punctual timing just need not change the numerical value of t; It is inaccurate when if electronic clock is walked; Just can change the value of t through " speed adjusting button ", once be out of tune and to transfer again, till being transferred to when accurately walking.
Must be pointed out that above-mentioned instance is just made an indefiniteness to the present invention and illustrated.But person of skill in the art will appreciate that, do not departing under aim of the present invention and the scope that can make various modifications, replacement and change to the present invention, these modifications, replacement and change still belong to protection scope of the present invention.

Claims (3)

1. the implementation method of the adjustable speed of digital display electronic clock; Said digital display electronic clock comprises: a microprocessor, digital display device, some buttons and a power module; Microprocessor links to each other with button with digital display device respectively; Power module provides power supply for microprocessor and display, and said method is characterized in that, may further comprise the steps:
A, the variable when a sign being set in the program of microprocessor whether walking and a variable of whether regulating speed are also given their all initializes 0, be provided with again timer break period at interval variable and compose a specific initial value to it;
B, give the THx and the TLx prepackage initial value of timer in timer initialization function and in the timer break in service function according to following formula:
THx=(65536 – timer interval break period)/256;
TLx=(65536 – timer interval break period) %256;
C, at first press " to table button ", when this moment, electronic clock stopped to walk,, after good, click again " to table button ", when electronic clock continues to walk, wait and compare electronic clock and the travel-time difference of standard time after a while then with electronic clock and standard time his-and-hers watches;
If the punctual timing of d electronic clock just need not change the initial value of timer discontinuous variable break period when definition,, just increase the value of this variable through the "+" button if fast when electronic clock is walked; If slow when walking, just reduce the value of this variable through "-" button;
E, once more carry out c and d this two the step operation, till punctual timing.
2. the method for the adjustable speed of digital display electronic clock according to claim 1 is characterized in that: said microprocessor is single-chip microcomputer or ARM, also can be DSP.
3. the method for the adjustable speed of digital display electronic clock according to claim 1 is characterized in that: said digital display device is charactron or LCD, also can be LED dot matrix screen.
CN2012101043185A 2012-04-11 2012-04-11 Method for adjusting speed of digital display electronic clock Pending CN102608908A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2012101043185A CN102608908A (en) 2012-04-11 2012-04-11 Method for adjusting speed of digital display electronic clock

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2012101043185A CN102608908A (en) 2012-04-11 2012-04-11 Method for adjusting speed of digital display electronic clock

Publications (1)

Publication Number Publication Date
CN102608908A true CN102608908A (en) 2012-07-25

Family

ID=46526365

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2012101043185A Pending CN102608908A (en) 2012-04-11 2012-04-11 Method for adjusting speed of digital display electronic clock

Country Status (1)

Country Link
CN (1) CN102608908A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109782574A (en) * 2019-03-07 2019-05-21 广东外语外贸大学南国商学院 A kind of digital electric clock, the calibration of digital electric clock time method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2079317U (en) * 1990-11-16 1991-06-19 朱桂信 Multi-function digital electronic clock
CN2466689Y (en) * 2000-08-03 2001-12-19 李长刚 Full-automatic time correction clock or watch
CN201087854Y (en) * 2008-02-15 2008-07-16 于琪 Upright displaying clock with arbitrarily bended watchband
JP2009300478A (en) * 2008-06-10 2009-12-24 Seiko Epson Corp Display device and display method
CN101753909A (en) * 2008-12-16 2010-06-23 康佳集团股份有限公司 Television clock control device and method using same

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2079317U (en) * 1990-11-16 1991-06-19 朱桂信 Multi-function digital electronic clock
CN2466689Y (en) * 2000-08-03 2001-12-19 李长刚 Full-automatic time correction clock or watch
CN201087854Y (en) * 2008-02-15 2008-07-16 于琪 Upright displaying clock with arbitrarily bended watchband
JP2009300478A (en) * 2008-06-10 2009-12-24 Seiko Epson Corp Display device and display method
CN101753909A (en) * 2008-12-16 2010-06-23 康佳集团股份有限公司 Television clock control device and method using same

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109782574A (en) * 2019-03-07 2019-05-21 广东外语外贸大学南国商学院 A kind of digital electric clock, the calibration of digital electric clock time method and device

Similar Documents

Publication Publication Date Title
CN106662842B (en) Electronic timer with the electronic watch dial plate display to scheduled event countdown
CN201845183U (en) Wireless wrist watch matched with mobile phone for use
CN104898409B (en) A kind of intelligent watch reduces the method and intelligent watch of power consumption
WO2017073889A1 (en) Method for providing action guide information and electronic device supporting method
CN103413407A (en) Eyesight protection method and system based on time
CN105388991A (en) Timing wake-up processing system and method
CN105093918A (en) Timer and power saving method thereof
CN103791915A (en) Bluetooth connection-supported pedometer device
CN105516234A (en) Wearable intelligent equipment heartbeat control device and method
CN102608908A (en) Method for adjusting speed of digital display electronic clock
Khan et al. Designing smart multipurpose digital clock using real time clock (RTC) and PIC microcontroller
CN104777744A (en) Method for realizing time synchronization of watch hand with Bluetooth technology
CN201015027Y (en) LED electronic clock
CN105183688B (en) A kind of IO digital quantity monitoring port extended methods based on serial network
CN102650850A (en) Electronic timepiece
CN108958012A (en) A kind of method of adjustment of wake-up device, system and wake-up device
CN113206885A (en) Open CPU development platform for intelligent wearable equipment
JP6394951B2 (en) POWER CONTROL DEVICE, ITS CONTROL METHOD, CONTROL PROGRAM, AND ELECTRONIC DEVICE
CN104020661A (en) Multifunctional digital clock
CN208673063U (en) A kind of wake-up device and system
CN205103549U (en) Box -like wrist -watch of two display groups
CN106527102A (en) Electronic watch
CN208506547U (en) A kind of wake-up device and system
CN204595452U (en) A kind of running accutron
CN106804089B (en) Control the method and system of the synchronous variation of lamp

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: 20120725