CN110554979A - time-piece device and method for operating same - Google Patents
time-piece device and method for operating same Download PDFInfo
- Publication number
- CN110554979A CN110554979A CN201810552772.4A CN201810552772A CN110554979A CN 110554979 A CN110554979 A CN 110554979A CN 201810552772 A CN201810552772 A CN 201810552772A CN 110554979 A CN110554979 A CN 110554979A
- Authority
- CN
- China
- Prior art keywords
- timing
- single chip
- chip module
- interrupt signal
- module
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/04—Generating or distributing clock signals or signals derived directly therefrom
- G06F1/14—Time supervision arrangements, e.g. real time clock
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/14—Handling requests for interconnection or transfer
- G06F13/20—Handling requests for interconnection or transfer for access to input/output bus
- G06F13/24—Handling requests for interconnection or transfer for access to input/output bus using interrupt
- G06F13/26—Handling requests for interconnection or transfer for access to input/output bus using interrupt with priority control
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Microcomputers (AREA)
Abstract
A timing device and a method of operating the same. The timing device includes: single-chip module and digital timing module. The single chip module is configured to perform event processing according to at least two internal interrupt signals inside. The digital timing module is configured to time and generate a timing interrupt signal to the single chip module when a timing event occurs; the priority level of the timing interrupt signal is higher than that of the at least two internal interrupt signals, so that the single chip module performs priority processing on the interrupt service program corresponding to the timing interrupt signal when receiving the timing interrupt signal.
Description
Technical Field
The present invention relates to timing technology, and more particularly, to a timing device and a method for operating the same.
Background
a single chip module such as (but not limited to) an 8051 chip integrates various basic circuits into a single chip, and is widely applied to many electronic devices as a controller due to its small size. When the single chip module is used for processing data, the more urgent events can be processed according to the internal interrupt signals. However, as applications become more complex and more events need to be processed, when the priority level of the internal interrupt signal is not sufficient to distinguish more types of events, the internal module, such as (but not limited to) a timer, cannot notify the single-chip module of the occurrence of the event in time by the internal interrupt signal.
Therefore, how to design a new timing device and its operation method to solve the above-mentioned drawbacks is an urgent problem to be solved in the art.
Disclosure of Invention
An object of the present invention is to provide a timepiece including: single-chip module and digital timing module. The single chip module is configured to perform event processing according to at least two internal interrupt (interrupt) signals inside. The digital timing module is configured to time and generate a timing interrupt signal to the single chip module when a timing event occurs, wherein the priority level of the timing interrupt signal is higher than that of at least two internal interrupt signals, so that the single chip module preferentially processes and executes an interrupt service program corresponding to the timing interrupt signal when receiving the timing interrupt signal.
Another object of the present invention is to provide a method for operating a timepiece, including: enabling the single chip module to process events according to at least two internal interrupt signals inside; and enabling the digital timing module to time and generating a timing interrupt signal to the single chip module when a timing event occurs, wherein the priority level of the timing interrupt signal is higher than that of at least two internal interrupt signals; and enabling the single chip module to preferentially process and execute the interrupt service program corresponding to the timing interrupt signal when the timing interrupt signal is received.
The digital timing module can process timing events by priority through timing interrupt signals with priority levels higher than internal interrupt signals through the design of the timing device.
Drawings
FIG. 1 is a block diagram of a timing device according to an embodiment of the present invention; and
Fig. 2 is a flowchart illustrating a method for operating a timing device according to an embodiment of the invention.
Description of the symbols
1: the timer device 10: single chip module
100: the central processing unit 101: internal interrupt signal
102: the memory 103: setting signal
104: the timer 105: interrupt service routine
106: input/output interface 12: digital timing module
121: timer interrupt signal 200: method for operating a timing device
201-203: step (ii) of
Detailed Description
Please refer to fig. 1. Fig. 1 is a block diagram of a timing device 1 according to an embodiment of the present invention. The timepiece device 1 includes: a single chip module 10 and a digital timing module 12.
The single chip module 10 can be any microcomputer such as, but not limited to, a cpu 100, a memory 102, a timer 104, various i/o interfaces 106, etc. all integrated on one ic chip. In one embodiment, the CPU 100 may be electrically connected to and communicate with the memory 102, the timer 104, and the I/O interface 106 via a bus (not shown). In one embodiment, the single chip module 100 is, for example but not limited to, an 8051 chip.
The single chip module 10 can process and calculate various data through the cpu 100, and can process events according to the internal interrupt signal 101. For example, when the input/output interface 106 receives an external signal to be processed, an internal interrupt signal 101 is generated and transmitted to the cpu 100 through the bus. The cpu 100 temporarily stops processing data and preferentially processes the request of the internal interrupt signal 101.
The circuitry included in the single chip module 10 can generate at least two priority levels of internal interrupt signals 101. In one embodiment, the internal interrupt signal 101 may have two priority levels. Thus, the internal interrupt signal 101 will include a high priority level internal interrupt signal and a low priority level internal interrupt signal.
When an internal interrupt signal having a high priority level is generated, another internal interrupt signal having a low priority level may be forcibly stopped. When the internal interrupt signal of the low priority level is generated, it can be executed by the single chip module 10 only under the condition that no internal interrupt signal is running. For internal interrupts of high priority level, no internal interrupts of lower or same priority level can stop their operation.
The digital timing module 12 is a digital timing circuit disposed outside the single chip module 10 and configured to perform timing. In one embodiment, the cpu 100 of the single chip module 10 is further configured to set the digital timing module 12 by, for example (but not limited to), a setting signal 103.
In one embodiment, the single chip module 10 configures the digital timing module 12 to operate in, for example but not limited to, an auto reload (auto load) mode. That is, digital timing module 12 will auto-zero upon an overrun (overflow) parameter being timed. In one embodiment, it is the occurrence of a timing event for digital timing module 12 during a parameter overflow.
In one embodiment, the single chip module 10 can set the timing precision of the digital timing module 12.
The digital timing module 12 generates a timing interrupt signal 121 to the single chip module 10 when a timing event (such as, but not limited to, the parameter overflow) occurs. More specifically, the digital clock module 12 can generate a clock interrupt signal 121 to the cpu 100 of the single chip module 10. The priority level of the timer interrupt signal 121 is higher than the two internal interrupt signals, so that the single chip module 10 can preferentially process and execute the interrupt service routine 105 corresponding to the timer interrupt signal 121 when receiving the timer interrupt signal 121.
In one embodiment, the timer interrupt signal 121 is, for example but not limited to, a power fail (power fail) interrupt signal.
The interrupt service routine 105 may be stored, for example, but not limited to, in the memory 102. In one embodiment, the single chip module 10 executes the interrupt service routine 105 to accumulate the internal timing variables. In one embodiment, each time the single chip module 10 receives a timer interrupt signal 121, the interrupt service routine 105 is executed to add 1 to the timer variable, thereby achieving the technical effect of timing.
Since the single chip module 10 needs to handle a great variety of events in the current application, when the priority level of the internal interrupt signal is not enough to distinguish more types of events, the internal timer 104 cannot notify the single chip module 10 of the occurrence of the timing event in time by the internal interrupt signal. Therefore, by the design of the timing device 1, the digital timing module 12 can make the single chip module 10 process the timing event preferentially by the timing interrupt signal 121 with a higher priority level than the internal interrupt signal.
Please refer to fig. 2. FIG. 2 is a flow chart of a method 200 for operating a timing device according to an embodiment of the invention. Can be applied to the timing device 1 of fig. 1. The method 200 includes the following steps (it should be understood that the steps mentioned in the present embodiment, except for the sequence specifically mentioned, can be performed simultaneously or partially simultaneously according to the actual requirement.
In step 201, the single chip module 10 performs event processing according to at least two internal interrupt signals 101.
In step 202, the digital timing module 12 is enabled to perform timing and generate a timing interrupt signal 121 to the single chip module 10 when a timing event occurs, wherein the priority level of the timing interrupt signal 121 is higher than that of the at least two internal interrupt signals 101.
In step 203, the single chip module 10 preferentially processes and executes the interrupt service routine 105 corresponding to the timer interrupt signal 121 when receiving the timer interrupt signal 121.
the above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit of the present invention are intended to be included within the scope of the present invention.
Claims (10)
1. A time keeping device comprising:
A single chip module configured to perform event processing according to at least two internal interrupt signals inside; and
A digital timing module configured to perform timing and generate a timing interrupt signal to the single chip module when a timing event occurs, wherein a priority level of the timing interrupt signal is higher than the at least two internal interrupt signals, so that the single chip module preferentially processes and executes an interrupt service program corresponding to the timing interrupt signal when receiving the timing interrupt signal.
2. The timing device of claim 1, wherein the single chip module is further configured to configure the digital timing module to operate in an automatic reload mode.
3. The timing device according to claim 2, wherein the single chip module is further configured to set the digital timing module to generate the timing interrupt signal at regular intervals.
4. The timing device of claim 1, wherein the single chip module executes the interrupt service routine to accumulate a timing variable.
5. The timing device of claim 1, wherein the timing interrupt signal is a power fail interrupt signal.
6. the timing device of claim 1, wherein the single chip module is an 8051 chip.
7. A method of operating a timing device, comprising:
Making a single chip module perform event processing according to at least two internal interrupt signals inside;
A digital timing module is used for timing, and when a timing event occurs, a timing interrupt signal is generated to the single chip module, wherein the priority level of the timing interrupt signal is higher than that of the at least two internal interrupt signals; and
When the single chip module receives the timing interrupt signal, the single chip module is enabled to preferentially process and execute an interrupt service program corresponding to the timing interrupt signal.
8. the method of operating a timing device of claim 7, further comprising:
The single chip module is also configured to set the digital timing module to operate in an automatic reload mode.
9. the method of operating a timing device of claim 8, further comprising:
The single chip module is also configured to set the digital timing module to generate the timing interrupt signal at regular time intervals.
10. The method of operating a timing device of claim 7, further comprising:
The single chip module executes the interrupt service program to accumulate a timing variable.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810552772.4A CN110554979A (en) | 2018-05-31 | 2018-05-31 | time-piece device and method for operating same |
TW107129153A TWI681338B (en) | 2018-05-31 | 2018-08-21 | Timer apparatus and operation method of the same |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810552772.4A CN110554979A (en) | 2018-05-31 | 2018-05-31 | time-piece device and method for operating same |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110554979A true CN110554979A (en) | 2019-12-10 |
Family
ID=68734560
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810552772.4A Pending CN110554979A (en) | 2018-05-31 | 2018-05-31 | time-piece device and method for operating same |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN110554979A (en) |
TW (1) | TWI681338B (en) |
Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020089881A1 (en) * | 1999-09-30 | 2002-07-11 | Hitachi Ltd. | High speed semiconductor memory device with short word line switching time |
CN1737766A (en) * | 2005-08-31 | 2006-02-22 | 上海海尔集成电路有限公司 | Interrupt system realizing method |
CN101196836A (en) * | 2007-12-29 | 2008-06-11 | 上海华为技术有限公司 | Method and device for resetting circuit of watchdog |
CN101221518A (en) * | 2008-01-29 | 2008-07-16 | 福建星网锐捷网络有限公司 | Method, device and system for preventing timing device overflow of hardware watchdog |
CN101859260A (en) * | 2010-05-14 | 2010-10-13 | 中国科学院计算技术研究所 | Timer management device and management method for operating system |
CN101964724A (en) * | 2010-08-30 | 2011-02-02 | 华为技术有限公司 | Energy conservation method of communication single plate and communication single plate |
CN102012881A (en) * | 2010-11-29 | 2011-04-13 | 杭州中天微系统有限公司 | Bus monitor-based system chip bus priority dynamic configuration device |
CN203243019U (en) * | 2012-11-26 | 2013-10-16 | 浙江金美电动工具有限公司 | Power-off protector |
CN104062896A (en) * | 2014-06-24 | 2014-09-24 | 北京航天自动控制研究所 | Synchronization signal periodic control redundancy realization method |
CN104281217A (en) * | 2013-07-11 | 2015-01-14 | 瑞萨电子株式会社 | Microcomputer |
CN104915254A (en) * | 2014-12-31 | 2015-09-16 | 杰瑞石油天然气工程有限公司 | Embedded system multi-task scheduling method and system |
CN107251001A (en) * | 2015-03-06 | 2017-10-13 | 密克罗奇普技术公司 | Microcontroller or microprocessor with double mode interruption |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TW200521855A (en) * | 2003-12-19 | 2005-07-01 | Kinpo Elect Inc | Timing interrupt service method |
US20120271968A1 (en) * | 2011-04-21 | 2012-10-25 | Microchip Technology Incorporated | Logic device for combining various interrupt sources into a single interrupt source and various signal sources to control drive strength |
KR102168987B1 (en) * | 2012-10-17 | 2020-10-22 | 가부시키가이샤 한도오따이 에네루기 켄큐쇼 | Microcontroller and method for manufacturing the same |
-
2018
- 2018-05-31 CN CN201810552772.4A patent/CN110554979A/en active Pending
- 2018-08-21 TW TW107129153A patent/TWI681338B/en active
Patent Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020089881A1 (en) * | 1999-09-30 | 2002-07-11 | Hitachi Ltd. | High speed semiconductor memory device with short word line switching time |
CN1737766A (en) * | 2005-08-31 | 2006-02-22 | 上海海尔集成电路有限公司 | Interrupt system realizing method |
CN101196836A (en) * | 2007-12-29 | 2008-06-11 | 上海华为技术有限公司 | Method and device for resetting circuit of watchdog |
CN101221518A (en) * | 2008-01-29 | 2008-07-16 | 福建星网锐捷网络有限公司 | Method, device and system for preventing timing device overflow of hardware watchdog |
CN101859260A (en) * | 2010-05-14 | 2010-10-13 | 中国科学院计算技术研究所 | Timer management device and management method for operating system |
CN101964724A (en) * | 2010-08-30 | 2011-02-02 | 华为技术有限公司 | Energy conservation method of communication single plate and communication single plate |
CN102012881A (en) * | 2010-11-29 | 2011-04-13 | 杭州中天微系统有限公司 | Bus monitor-based system chip bus priority dynamic configuration device |
CN203243019U (en) * | 2012-11-26 | 2013-10-16 | 浙江金美电动工具有限公司 | Power-off protector |
CN104281217A (en) * | 2013-07-11 | 2015-01-14 | 瑞萨电子株式会社 | Microcomputer |
CN104062896A (en) * | 2014-06-24 | 2014-09-24 | 北京航天自动控制研究所 | Synchronization signal periodic control redundancy realization method |
CN104915254A (en) * | 2014-12-31 | 2015-09-16 | 杰瑞石油天然气工程有限公司 | Embedded system multi-task scheduling method and system |
CN107251001A (en) * | 2015-03-06 | 2017-10-13 | 密克罗奇普技术公司 | Microcontroller or microprocessor with double mode interruption |
Also Published As
Publication number | Publication date |
---|---|
TWI681338B (en) | 2020-01-01 |
TW202004498A (en) | 2020-01-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP2783266B1 (en) | Microprocessor, and method of managing reset events therefor | |
KR20180017035A (en) | Test for 50 nanosecond spike filter | |
US9685953B1 (en) | Low latency asynchronous interface circuits | |
CN109799870B (en) | Clock control circuit and control method | |
CN108196181B (en) | Chip test mode entering method and system and chip | |
CN109669524B (en) | Power-on reset circuit of chip | |
CN108292236B (en) | Information processing method and device | |
CN101151584B (en) | Timer circuit, mobile communication terminal using the same, and electronic device using the same | |
CN106776091B (en) | Watchdog circuit | |
CN105378650B (en) | Method and apparatus for controlling the operation mode of processing module | |
CN110554979A (en) | time-piece device and method for operating same | |
CN103873031A (en) | Non-clock trigger register | |
US20170344502A1 (en) | Communication Apparatus with Direct Control and Associated Methods | |
US20180287835A1 (en) | Radio frequency front-end slew and jitter consistency for voltages below 1.8 volts | |
US9274170B2 (en) | Semiconductor device | |
CN111158758B (en) | Method and device for waking up central processing unit | |
CN111897763A (en) | Control method, control device and electronic equipment | |
CN108388481B (en) | Intelligent watchdog circuit system of OLT equipment | |
CN111552617A (en) | NAND Flash temperature acquisition method and device, computer equipment and storage medium | |
CN113341780A (en) | Mode selection circuit for low cost integrated circuits such as microcontrollers | |
CN108233916B (en) | Discrete magnitude signal processing system and method capable of flexibly configuring threshold | |
CN108446204B (en) | Chip and electronic equipment | |
TWI766521B (en) | Electronic device and method for solving transient pulse output of communication interface | |
JP2014131283A (en) | Crystal oscillator frequency adjustment device | |
KR102602246B1 (en) | Comparator circuit and switch control device including the same |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20191210 |