KR20000009469A - Timer circuit - Google Patents

Timer circuit Download PDF

Info

Publication number
KR20000009469A
KR20000009469A KR1019980029918A KR19980029918A KR20000009469A KR 20000009469 A KR20000009469 A KR 20000009469A KR 1019980029918 A KR1019980029918 A KR 1019980029918A KR 19980029918 A KR19980029918 A KR 19980029918A KR 20000009469 A KR20000009469 A KR 20000009469A
Authority
KR
South Korea
Prior art keywords
period
value
signal
mode
output
Prior art date
Application number
KR1019980029918A
Other languages
Korean (ko)
Other versions
KR100494114B1 (en
Inventor
김수진
Original Assignee
김영환
현대반도체 주식회사
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 김영환, 현대반도체 주식회사 filed Critical 김영환
Priority to KR10-1998-0029918A priority Critical patent/KR100494114B1/en
Publication of KR20000009469A publication Critical patent/KR20000009469A/en
Application granted granted Critical
Publication of KR100494114B1 publication Critical patent/KR100494114B1/en

Links

Classifications

    • HELECTRICITY
    • H01ELECTRIC ELEMENTS
    • H01HELECTRIC SWITCHES; RELAYS; SELECTORS; EMERGENCY PROTECTIVE DEVICES
    • H01H47/00Circuit arrangements not adapted to a particular application of the relay and designed to obtain desired operating characteristics or to provide energising current
    • H01H47/02Circuit arrangements not adapted to a particular application of the relay and designed to obtain desired operating characteristics or to provide energising current for modifying the operation of the relay
    • H01H47/18Circuit arrangements not adapted to a particular application of the relay and designed to obtain desired operating characteristics or to provide energising current for modifying the operation of the relay for introducing delay in the operation of the relay
    • HELECTRICITY
    • H01ELECTRIC ELEMENTS
    • H01HELECTRIC SWITCHES; RELAYS; SELECTORS; EMERGENCY PROTECTIVE DEVICES
    • H01H43/00Time or time-programme switches providing a choice of time-intervals for executing one or more switching actions and automatically terminating their operations after the programme is completed

Landscapes

  • Measurement Of Predetermined Time Intervals (AREA)
  • Microcomputers (AREA)

Abstract

PURPOSE: A timer circuit is provided to improve performance and compatibility thereof. CONSTITUTION: Disclosed is a timer circuit comprising a controller(2), a mode detector(3), a period/limit value applier(4), a first counting/comparing part(6), a second counting/comparing part(8) and an interrupt generator(7). The controller(2) stores data of input address to a register, and outputs a mode signal, a first and second period values of output time according to the stored data. The mode detector(3) outputs a mode signal of timer operation according to the mode signal from the controller(2). The period/limit value applier(4) periodically outputs the first and second period values according to the mode signal from the mode detector(3). The first counting/comparing part(6) counts a clock signal, and compares the first period values from the period/limit value applier(4) with the counting result data. The second counting/comparing part(8) counts the clock signal, and compares the second period values from the period/limit value applier(4) with the counting result data. The interrupt generator(7) outputs a first and a second interrupt signals according to a first and a second enable signals from the controller(2). The first and a second enable signals from the controller(2) are controlled by output signals of the first and second counting/comparing part(6, 8).

Description

타이머 회로Timer circuit

본 발명은 타이머 회로에 관한 것으로, 특히 2회의 인터럽트신호를 출력하는 원샷모드(one-shot mode)와 주기모드(periodic mode)를 포함하여 다양한 시스템에 적용하는데 적당하도록 한 타이머 회로에 관한 것이다.BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a timer circuit, and more particularly, to a timer circuit suitable for various systems including a one-shot mode and a periodic mode for outputting two interrupt signals.

일반적으로, 타이머는 일정한 길이의 펄스신호를 발생하는 원샷모드(one-shot mode)와 일정한 주기마다 펄스신호를 출력하는 주기모드(periodic mode)의 동작을 하는 것으로 분류되어 시스템에서 일정한 기간이 지나면 인터럽트(interrupt)신호를 출력하여 특정 회로의 동작을 정지 또는 동작시키게 된다. 사용자는 시스템을 구성할 때 필요에 따라 적절한 모드의 타이머를 사용해야 하며, 이와 같은 종래 타이머 회로를 첨부한 도면을 참조하여 상세히 설명하면 다음과 같다.In general, timers are classified into one-shot mode for generating a pulse signal of a certain length and periodic mode for outputting a pulse signal at a predetermined period. An interrupt signal is output to stop or operate a specific circuit. When the user configures the system, the user should use a timer in an appropriate mode as necessary. The detailed description will be given below with reference to the accompanying drawings.

도1은 종래 타이머의 블록도로서, 이에 도시한 바와 같이 외부로 부터 어드레스신호(ADD), 데이터(DATA) 및 제어신호(CNTR)를 버스 인터페이스(1)를 통해 인가받으며, 현재의 카운트값과 설정된 주기값을 저장하고, 그 저장된 값을 모드를 결정하는 모드신호(MODE), 출력의 기간을 설정하는 주기값(PERIOD_VALUE) 및 인에이블신호(LOAD_EN),(INTR_EN)로 하여 출력하는 레지스터 및 제어부(2)와; 상기 레지스터 및 제어부(2)의 인에이블신호(LOAD_EN)에 따라 인에이블되어, 상기 모드신호(MODE)를 검출하여 타이머의 동작모드를 결정하는 출력신호를 출력하는 모드검출부(3)와; 상기 레지스터 및 제어부(2)의 인에이블신호(LOAD_EN)에 따라 인에이블되며, 상기 모드검출부(3)의 출력신호와 레지스터 및 제어부(2)의 주기값(PERIOD_VALUE)을 인가받아 설정된 주기값을 출력하는 주기 인가부(4)와; 소정주기의 클럭신호를 발생시키는 클럭발생부(5)와; 상기 클럭발생부(5)의 클럭신호를 카운트하여 상기 주기 인가부(4)에서 인가된 주기와 비교하여 그 결과를 출력하는 카운트 및 비교부(6)와; 상기 카운트 및 비교부(6)에서 카운트한 값과 입력된 주기가 동일한 값일 때 발생하는 레지스터 및 제어부(2)의 인에이블신호(INTR_EN)에 따라 인에이블되어, 인터럽트신호(INTERRUPT)를 외부의 중앙처리장치(도면미도시)로 출력하는 인터럽트 발생부(7)로 구성된다.FIG. 1 is a block diagram of a conventional timer. As shown in FIG. 1, an address signal ADD, data DATA, and a control signal CNTR are applied from the outside through the bus interface 1, and a current count value is applied. A register and control unit that store the set period value and output the stored value as a mode signal MODE for determining a mode, a period value PERIOD_VALUE for setting a period of output, and an enable signal LOAD_EN or INTR_EN. (2); A mode detector (3) which is enabled according to the enable signal (LOAD_EN) of the register and the controller (2), and outputs an output signal for detecting the mode signal (MODE) to determine an operation mode of a timer; It is enabled according to the enable signal LOAD_EN of the register and the controller 2, and outputs the set period value by receiving the output signal of the mode detector 3 and the period value PERIOD_VALUE of the register and the controller 2. A cycle applying unit 4; A clock generator 5 for generating a clock signal of a predetermined period; A counting and comparing section (6) for counting the clock signal of the clock generating section (5) and comparing the period applied by the period applying section (4) and outputting the result; It is enabled according to the enable signal INTR_EN of the register and the controller 2 generated when the value counted by the count and comparator 6 is equal to the input period, and the interrupt signal INTERRUPT is externally centered. It consists of an interrupt generation part 7 which outputs to a processing apparatus (not shown).

이하, 상기와 같이 구성된 종래 타이머 회로의 동작을 설명한다.The operation of the conventional timer circuit constructed as described above will be described below.

먼저, 외부로 부터 버스에 어드레스신호(ADD), 데이터(DATA) 및 제어신호(CNTR)가 인가되면, 이는 버스 인터페이스(1)를 통해 레지스터 및 제어부(2)에 인가된다. 이때의 어드레스신호(ADD)는 상기 레지스터 및 제어부(2)에 포함된 각 레지스터를 인에이블시키고, 시스템 사용자는 필요한 프로그램을 데이터(DATA)로 하여 상기 인에이블된 레지스터에 저장시킬 수 있게 된다.First, when the address signal ADD, the data DATA and the control signal CNTR are applied to the bus from the outside, they are applied to the register and the controller 2 via the bus interface 1. At this time, the address signal ADD enables each register included in the register and the control unit 2, and a system user can store the necessary program as data DATA in the enabled register.

그 다음, 상기 제어신호(CNTR)를 인가받은 레지스터 및 제어부(2)는 그 레지스터에 저장된 값을 주기값(PERIOD_VALUE), 인에이블신호(LOAD_EN) 및 모드신호(MODE)로서 출력한다. 이때, 상기 주기값(PERIOD_VALUE)은 상기 사용자가 설정한 시간이며, 타이머 회로는 이 값만큼의 시간이 경과한 후에 출력신호를 출력하게 된다.Then, the register and the control unit 2 receiving the control signal CNTR output the value stored in the register as the period value PERIOD_VALUE, the enable signal LOAD_EN and the mode signal MODE. At this time, the period value PERIOD_VALUE is a time set by the user, and the timer circuit outputs an output signal after a time elapsed by this value.

또한, 상기 모드신호(MODE)는 타이머가 특정한 시간이 경과하여 한 번의 출력신호를 출력한 다음, 동작을 정지하는 원샷모드로 동작할지, 아니면 한 번의 출력신호를 출력한 후, 다시 그 설정시간을 카운팅하여 반복적으로 일정한 주기마다 출력신호를 출력하는 주기모드로 동작할지를 결정하게 된다.The mode signal MODE may be operated in a one-shot mode in which the timer outputs one output signal after a specific time elapses, and then stops the operation, or outputs one output signal and then resets the set time. By counting, it is determined whether to operate in a cycle mode which repeatedly outputs an output signal at regular intervals.

그 다음, 상기 인에이블신호(LOAD_EN)를 인가받은 모드 검출부(3)는 인에이블되어, 상기 모드신호(MODE)를 검출하고, 그 모드신호(MODE)에 따른 출력신호를 출력한다.Then, the mode detection unit 3 receiving the enable signal LOAD_EN is enabled to detect the mode signal MODE and output an output signal according to the mode signal MODE.

그 다음, 상기 인에이블신호(LOAD_EN)를 인가받은 주기인가부(4)는 상기 레지스터 및 제어부(2)의 출력인 주기값(PERIOD_VALUE)을 상기 모드 검출부(3)의 출력신호에 따라 출력한다. 즉, 모드 검출부(3)의 출력신호가 원샷모드인 경우에는 최초의 단한번의 주기값(PERIOD_VALUE)을 출력하며, 주기모드인 경우 최초 주기값(PERIOD_VALUE)을 인가한 후, 인터럽트신호(INTERRUPT)가 출력된 후 다시 주기값(PERIOD_VALUE)를 인가하는 동작을 한다.Next, the period applying unit 4 receiving the enable signal LOAD_EN outputs a period value PERIOD_VALUE, which is an output of the register and the controller 2, according to the output signal of the mode detector 3. That is, when the output signal of the mode detection unit 3 is the one shot mode, the first single period value PERIOD_VALUE is output. In the case of the periodic mode, the interrupt signal INTERRUPT is applied after the initial period value PERIOD_VALUE is applied. After outputting, the cycle value PERIOD_VALUE is applied again.

그 다음, 상기 주기 인가부(4)로 부터 주기값(PERIOD_VALUE)을 인가받은 카운트 및 비교부(6)는 클럭발생부(5)에서 발생된 클럭을 그 주기값(PERIOD_VALUE)만큼 카운팅하여 카운팅이 완료되면 출력신호를 출력한다.Next, the count and comparison unit 6 that receives the period value PERIOD_VALUE from the period applying unit 4 counts the clock generated by the clock generator 5 by the period value PERIOD_VALUE, so that counting is performed. Output the output signal when complete.

그 다음, 상기 레지스터 및 제어부(2)는 상기 카운트 및 비교부(6)의 출력신호를 인가받아 설정된 시간이 경과한 것으로 판단하여 인에이블신호(INTR_EN)를 출력하며, 그 인에이블신호(INTR_EN)를 인가받은 인터럽트 발생부(7)는 인터럽트신호(INTERRUPT)를 출력한다.Then, the register and the controller 2 receives the output signal of the count and compare unit 6 and determines that the set time has elapsed, and outputs the enable signal INTR_EN, and the enable signal INTR_EN. The interrupt generating unit 7 which is applied to outputs an interrupt signal INTERRUPT.

이와 같이 인터럽트신호(INTERRUPT)를 출력한 후, 원샷모드에서는 타이머의 동작이 종료되며, 주기모드에서는 다시 주기값(PERIOD_VALUE)이 인가되고, 클럭을 그 주기값 만큼 카운팅하여 인터럽트신호(INTERRUPT)를 발생하는 동작을 계속적으로 반복하게 된다.After outputting the interrupt signal INTERRUPT in this way, the timer operation is terminated in one-shot mode. In the periodic mode, the period value PERIOD_VALUE is applied again, and the clock is counted by the period value to generate the interrupt signal INTERRUPT. To repeat the operation continuously.

상기한 바와 같이 종래 타이머 회로는 원샷모드와 주기모드의 한가지를 선택하여 동작하기 때문에 만일 인터럽트신호의 발생 전에 타이머 회로의 출력에 의해 선행되어야할 일이 있으며, 인터럽트신호가 발생된 후에는 타이머의 동작이 멈춰야하는 경우에는 원샷모드와 주기모드에서 해결이 불가능한 문제점이 있었다.As described above, since the conventional timer circuit operates by selecting one of the one-shot mode and the periodic mode, there is a need to be preceded by the output of the timer circuit before the interrupt signal is generated, and after the interrupt signal is generated, the timer is operated. If this stops, there was a problem that can not be solved in one-shot mode and periodic mode.

이와 같은 문제점을 감안한 본 발명은 원샷모드에서 인터럽트신호가 출력되기 이전에 주기모드에서 처럼 동작하는 타이머 회로를 제공함에 그 목적이 있다.It is an object of the present invention to provide a timer circuit that operates in a periodic mode before an interrupt signal is output in a one shot mode.

도1은 종래 타이머 회로의 블록도.1 is a block diagram of a conventional timer circuit.

도2는 본 발명 타이머 회로의 블록도.2 is a block diagram of a timer circuit of the present invention.

*도면의 주요 부분에 대한 부호의 설명** Description of the symbols for the main parts of the drawings *

1:버스 인터페이스 2:레지스터 및 제어부1: Bus Interface 2: Registers and Controls

3:모드검출부 4:주기 및 제한값 인가부3: mode detector 4: cycle and limit value applier

5:클럭 발생부 6:카운터 및 비교부5: Clock generator 6: Counter and comparator

7:인터럽트 발생부 8:제한 카운터 및 비교부7: Interrupt generation unit 8: Limit counter and comparison unit

상기와 같은 목적은 외부로 부터 어드레스신호, 데이터 및 제어신호를 인가받아, 그 어드레스신호에 해당하는 레지스터에 데이터를 저장하며 그 저장된 값을 모드를 결정하는 모드신호, 출력의 기간을 설정하는 제 1주기값 및 제 2주기값으로하여 출력하는 레지스터 및 제어부와; 상기 레지스터 및 제어부의 모드신호를 검출하여 타이머의 동작모드를 결정하는 출력신호를 출력하는 모드검출부와; 상기 모드검출부의 출력신호에따라 레지스터 및 제어부의 제 1 및 제 2주기값을 1회 또는 특정 주기에 따라 계속적으로 출력하는 주기 및 제한값 인가부와; 소정 주기의 클럭신호를 카운트하고, 그 카운트 값을 상기 주기 및 제한값 인가부에서 인가된 제 1주기값과 비교하여 그 결과를 출력하는 제 1카운트 및 비교부와; 상기 소정 주기의 클럭신호를 카운트하고, 그 카운트한 값과 상기 주기 및 제한값 인가부에서 인가되는 제 2주기값을 비교하여 출력하는 제 2카운트 및 비교부와; 상기 제 1 및 제 2카운트 및 비교부의 출력신호에 따라 선택적으로 출력되는 상기 레지스터 및 제어부의 제 1 및 제 2인에이블신호에따라 제 1인터럽트신호 또는 제 2인터럽트신호를 출력하는 인터럽트 발생부로 구성함으로써 달성되는 것으로, 이와 같은 본 발명을 첨부한 도면을 참조하여 상세히 설명하면 다음과 같다.The above object is to receive an address signal, data and a control signal from the outside, store the data in a register corresponding to the address signal, and set a mode signal for determining a mode of the stored value and an output period. A register and a controller for outputting the period value and the second period value; A mode detector for detecting a mode signal of the register and the controller and outputting an output signal for determining an operation mode of a timer; A period and limit value applying unit for continuously outputting the first and second period values of the register and the control unit once or in accordance with a specific period according to the output signal of the mode detector; A first counting and comparing section for counting a clock signal of a predetermined period and comparing the count value with a first period value applied by the period and limit value applying section and outputting a result; A second counting and comparing unit for counting the clock signal of the predetermined period and comparing the counted value with a second period value applied by the period and limit value applying unit; And an interrupt generator for outputting a first interrupt signal or a second interrupt signal in accordance with the registers and the first and second enable signals of the controller selectively output according to the output signals of the first and second counts and the comparator. As described above, the present invention will be described in detail with reference to the accompanying drawings.

도2는 본 발명 타이머 회로의 블록도로서, 이에 도시한 바와 같이 외부로 부터 어드레스신호(ADD), 데이터(DATA) 및 제어신호(CNTR)를 버스 인터페이스(1)를 통해 인가받아, 그 어드레스신호(ADD)에 해당하는 레지스터에 데이터(DATA)를 저장하며 그 저장된 값을 모드를 결정하는 모드신호(MODE), 출력의 기간을 설정하는 주기값(PERIOD_VALUE), 카운트 제한값(CNT_LIMIT_VALUE) 및 인에이블신호(LOAD_EN),(INTR_EN1),(INTR_EN2)로 하여 출력하는 레지스터 및 제어부(2)와; 상기 레지스터 및 제어부(2)의 인에이블신호(LOAD_EN)에 따라 인에이블되어, 상기 모드신호(MODE)를 검출하여 타이머의 동작모드를 결정하는 출력신호를 출력하는 모드검출부(3)와; 상기 레지스터 및 제어부(2)의 인에이블신호(LOAD_EN)에 따라 인에이블되며, 상기 모드검출부(3)의 출력신호에따라 레지스터 및 제어부(2)의 주기값(PERIOD_VALUE) 및 카운트 제한값(CNT_LIMIT_VALUE)을 인가받아 출력하는 주기 및 제한값 인가부(4)와; 소정주기의 클럭신호를 발생시키는 클럭발생부(5)와; 상기 클럭발생부(5)의 클럭신호를 카운트하고, 그 카운트값을 상기 주기 및 제한값 인가부(4)에서 인가된 주기값(PERIOD_VALUE)을 비교하여 그 결과를 출력하는 카운트 및 비교부(6)와; 상기 클럭발생부(5)의 클럭신호를 카운트하고, 그 카운트한 값과 상기 주기 및 제한값 인가부(4)에서 인가되는 제한값(CNT_LIMIT_VALUE)을 비교하여 출력하는 제한값 카운트 및 비교부(8)와; 상기 카운트 및 비교부(6)와 제한값 카운트 및 비교부(8)의 출력신호에 따라 선택적으로 출력되는 상기 레지스터 및 제어부(2)의 인에이블신호(INTR_EN1),(INTR_EN2)에 따라 제 1인터럽트신호(INTERRUPT1) 또는 제 2인터럽트신호(INTERRUPT2)를 출력하는 인터럽트 발생부(7)로 구성된다.FIG. 2 is a block diagram of a timer circuit of the present invention. As shown in FIG. 2, an address signal ADD, data DATA, and a control signal CNTR are externally received through a bus interface 1, and the address signal is received. Data DATA is stored in the register corresponding to (ADD) and the stored value is the mode signal MODE for determining the mode, the period value (PERIOD_VALUE) for setting the output period, the count limit value (CNT_LIMIT_VALUE), and the enable signal. A register and a control unit 2 outputting (LOAD_EN), (INTR_EN1), and (INTR_EN2); A mode detector (3) which is enabled according to the enable signal (LOAD_EN) of the register and the controller (2), and outputs an output signal for detecting the mode signal (MODE) to determine an operation mode of a timer; It is enabled according to the enable signal LOAD_EN of the register and the controller 2, and the period value PERIOD_VALUE and the count limit value CNT_LIMIT_VALUE of the register and the controller 2 are adjusted according to the output signal of the mode detector 3. A period and limit value applying unit 4 for receiving and outputting; A clock generator 5 for generating a clock signal of a predetermined period; The counting and comparing section 6 which counts the clock signal of the clock generating section 5 and compares the count value with the period value PERIOD_VALUE applied by the period and limit value applying section 4 and outputs the result. Wow; A limit value counting and comparing section (8) which counts the clock signal of the clock generating section (5) and compares the counted value with the limit value (CNT_LIMIT_VALUE) applied by the period and limit value applying section (4); A first interrupt signal according to the enable signals INTR_EN1 and INTR_EN2 of the register and the controller 2 which are selectively output according to the output signal of the count and compare unit 6 and the limit value count and compare unit 8. And an interrupt generator 7 for outputting INTERRUPT1 or the second interrupt signal INTERRUPT2.

이하, 상기와 같이 구성된 본 발명 타이머 회로의 동작을 상세히 설명한다.Hereinafter, the operation of the timer circuit of the present invention configured as described above will be described in detail.

먼저, 외부로 부터 버스에 어드레스신호(ADD), 데이터(DATA) 및 제어신호(CNTR)가 인가되면, 이는 버스 인터페이스(1)를 통해 레지스터 및 제어부(2)에 인가되어 저장되며, 그 제어신호(CNTR)에 따라 그 레지스터 및 제어부(2)에 저장된 데이터가 출력된다. 즉, 상기 제어신호(CNTR)를 인가받은 레지스터 및 제어부(2)는 그 레지스터에 저장된 값을 주기값(PERIOD_VALUE), 카운트 제한값(CNT_LIMIT_VALUE), 인에이블신호(LOAD_EN) 및 모드신호(MODE)로서 출력한다. 이때, 상기 주기값(PERIOD_VALUE)은 상기 사용자가 설정한 시간이며, 카운트 제한값(CNT_LIMIT_VALUE)은 상기 주기값(PERIOD_VALUE)보다 작은 값이다.First, when the address signal ADD, the data DATA and the control signal CNTR are applied to the bus from the outside, it is applied to the register and the controller 2 via the bus interface 1 and stored therein, and the control signal According to CNTR, the data stored in the register and the control unit 2 are output. That is, the register and control unit 2 receiving the control signal CNTR output the value stored in the register as a period value PERIOD_VALUE, a count limit value CNT_LIMIT_VALUE, an enable signal LOAD_EN, and a mode signal MODE. do. In this case, the period value PERIOD_VALUE is a time set by the user, and the count limit value CNT_LIMIT_VALUE is smaller than the period value PERIOD_VALUE.

또한, 상기 모드신호(MODE)는 타이머가 특정한 시간이 경과하여 한 번의 출력신호를 출력한 다음, 동작을 정지하는 원샷모드로 동작할지, 아니면 한 번의 출력신호를 출력한 후, 다시 그 설정시간을 카운팅하여 반복적으로 일정한 주기마다 출력신호를 출력하는 주기모드로 동작할지를 결정하게 된다.The mode signal MODE may be operated in a one-shot mode in which the timer outputs one output signal after a specific time elapses, and then stops the operation, or outputs one output signal and then resets the set time. By counting, it is determined whether to operate in a cycle mode which repeatedly outputs an output signal at regular intervals.

그 다음, 상기 인에이블신호(LOAD_EN)를 인가받은 모드 검출부(3)는 인에이블되어, 상기 모드신호(MODE)를 검출하고, 그 모드신호(MODE)에 따른 출력신호를 출력한다.Then, the mode detection unit 3 receiving the enable signal LOAD_EN is enabled to detect the mode signal MODE and output an output signal according to the mode signal MODE.

그 다음, 상기 인에이블신호(LOAD_EN)를 인가받은 주기 및 제한값 인가부(4)는 상기 레지스터 및 제어부(2)의 출력인 주기값(PERIOD_VALUE)과 카운트 제한값(CNT_LIMIT_VALUE)을 상기 모드 검출부(3)의 출력신호에 따라 출력한다. 즉, 모드 검출부(3)의 출력신호가 원샷모드인 경우에는 최초의 단한번의 주기값(PERIOD_VALUE)과 카운트 제한값(CNT_LIMIT_VALUE)을 출력하며, 주기모드인 경우 최초 주기값(PERIOD_VALUE)을 인가한 후, 인터럽트신호(INTERRUPT)가 출력된 후 다시 주기값(PERIOD_VALUE)를 인가하는 동작을 한다. 만일 타이머가 주기모드로 동작하는 경우에는 상기 카운트 제한값(CNT_LIMIT_VALUE)을 사용할 필요는 없으며 그 카운트 제한값(CNT_LIMIT_VALUE)을 사용하지 않을 경우 카운트 제한값(CNT_LIMIT_VALUE)과 주기값(PERIOD_VALUE)을 동일한 값으로 설정한다. 또한, 원샷모드에서도 종래와 같이 단 한 번의 인터럽트신호의 출력이 요구되는 경우에도 카운트 제한값(CNT_LIMIT_VALUE)과 주기값(PERIOD_VALUE)을 동일한 값으로 설정한다.Next, the period and limit value applying unit 4 receiving the enable signal LOAD_EN receives the period value PERIOD_VALUE and the count limit value CNT_LIMIT_VALUE, which are outputs of the register and the controller 2, from the mode detector 3. Output according to the output signal of. That is, when the output signal of the mode detector 3 is in the one shot mode, the first single period value (PERIOD_VALUE) and the count limit value (CNT_LIMIT_VALUE) are output.In the case of the periodic mode, the first period value (PERIOD_VALUE) is applied. After the interrupt signal INTERRUPT is output, the cycle value PERIOD_VALUE is applied again. If the timer operates in the periodic mode, it is not necessary to use the count limit value CNT_LIMIT_VALUE. If the count limit value CNT_LIMIT_VALUE is not used, the count limit value CNT_LIMIT_VALUE and the period value PERIOD_VALUE are set to the same value. In the one-shot mode, the count limit value CNT_LIMIT_VALUE and the period value PERIOD_VALUE are set to the same value even when the output of only one interrupt signal is required as in the prior art.

그 다음, 상기 주기 및 제한값 인가부(4)로부터 주기값(PERIOD_VALUE)을 인가받은 카운트 및 비교부(6)는 클럭발생부(5)에서 발생된 클럭을 그 주기값(PERIOD_VALUE)만큼 카운팅하여 카운팅이 완료되면 출력신호를 출력한다. 이와 동시에 상기 주기 및 제한값 인가부(4)로부터 카운트 제한값(CNT_LIMIT_VALUE)을 인가받은 제한값 카운트 및 비교부(8)는 상기 클럭발생부(5)에서 발생된 클럭을 그 카운트 제한값(CNT_LIMIT_VALUE)만큼 카운트하고, 그 카운팅이 완료되면 출력신호를 출력한다.Next, the count and comparison unit 6 that receives the period value PERIOD_VALUE from the period and limit value applying unit 4 counts the clock generated by the clock generator 5 by the period value PERIOD_VALUE. Upon completion, output signal is output. At the same time, the limit value count and comparison unit 8 that receives the count limit value CNT_LIMIT_VALUE from the period and limit value applying unit 4 counts the clock generated by the clock generator 5 by the count limit value CNT_LIMIT_VALUE. When the counting is completed, the output signal is output.

이때, 원샷모드에서는 상기 카운트 제한값(CNT_LIMIT_VALUE)이 주기값(PERIOD_VALUE)보다 작은 값이므로, 제한값 카운트 및 비교부(8)의 출력신호가 상기 카운트 및 비교부(6)의 출력신호보다 빨리 출력된다.At this time, since the count limit value CNT_LIMIT_VALUE is smaller than the period value PERIOD_VALUE in the one-shot mode, the limit value count and the output signal of the comparator 8 are output earlier than the output signal of the count and comparator 6.

그 다음, 상기 레지스터 및 제어부(2)는 카운트 및 비교부(6)의 출력신호보다 빨리 출력되는 상기 제한값 카운트 및 비교부(8)의 출력신호를 인가받아 인에이블신호(INTR_EN1)를 출력하며, 그 인에이블신호(INTR_EN1)를 인가받은 인터럽트 발생부(7)는 인터럽트신호(INTERRUPT1)를 출력한다.Then, the register and the controller 2 receives the limit value count and the output signal of the comparator 8 which is output earlier than the output signal of the count and comparator 6, and outputs the enable signal INTR_EN1. The interrupt generator 7, which has received the enable signal INTR_EN1, outputs the interrupt signal INTERRUPT1.

그 다음, 상기 카운트 및 비교부(6)의 출력신호가 레지스터 및 제어부(2)에 인가되면, 그 레지스터 및 제어부(2)는 설정된 시간이 경과한 것으로 판단하여 인에이블신호(INTR_EN2)를 출력하며, 그 인에이블신호(INTR_EN2)를 인가받은 인터럽트 발생부(7)는 인터럽트신호(INTERRUPT2)를 출력한다.Then, when the output signal of the count and compare section 6 is applied to the register and the controller 2, the register and the controller 2 determines that the set time has elapsed and outputs the enable signal INTR_EN2. The interrupt generator 7 receiving the enable signal INTR_EN2 outputs the interrupt signal INTERRUPT2.

이와 같이 원샷모드로 동작하는 과정에서 두 번의 인터럽트신호를 출력할 수 있게 되어, 처음에 카운트 제한값(CNT_LIMIT_VALUE) 만큼의 시간이 경과한 다음 출력되는 인터럽트신호(INTERRUPT1)를 염원하는 회로의 인터럽트가 이루어지기 전에 수행되어야 할 일의 시작을 알리는 신호로 사용할 수 있다.In this way, two interrupt signals can be output in the process of operating in one-shot mode, and the interrupt of the circuit wishing for the interrupt signal INTERRUPT1 that is output after the first time as the count limit value (CNT_LIMIT_VALUE) has elapsed is made. Can be used as a signal to indicate the beginning of a task to be performed before.

상기한 바와 같이 본 발명은 설정 시간보다 짧은 제 2의 설정시간을 두고, 그 제 2의 설정 시간이 경과하면 인터럽트신호를 출력하고, 다시 설정 시간이 경과하면 다시 인터럽트신호를 출력하여 원샷모드에서도 2회의 인터럽트신호를 발생시킴으로써, 인터럽트신호의 발생 전에 타이머 회로의 출력에 의해 선행되어야할 일이 있으며, 인터럽트신호가 발생된 후에는 타이머의 동작이 멈춰야하는 경우가 있는 시스템에 용이하게 적용할 수 있어 그 사용효율이 증가하는 효과가 있다.As described above, the present invention has a second setting time that is shorter than the setting time, and outputs an interrupt signal when the second setting time elapses, and outputs an interrupt signal again when the setting time elapses. By generating the interrupt signal, it is necessary to be preceded by the output of the timer circuit before the interrupt signal is generated, and it can be easily applied to a system where the timer operation should be stopped after the interrupt signal is generated. There is an effect of increasing the efficiency of use.

Claims (3)

외부로 부터 어드레스신호, 데이터 및 제어신호를 인가받아, 그 어드레스신호에 해당하는 레지스터에 데이터를 저장하며 그 저장된 값을 모드를 결정하는 모드신호, 출력의 기간을 설정하는 제 1주기값 및 제 2주기값으로하여 출력하는 레지스터 및 제어부와; 상기 레지스터 및 제어부의 모드신호를 검출하여 타이머의 동작모드를 결정하는 출력신호를 출력하는 모드검출부와; 상기 모드검출부의 출력신호에따라 레지스터 및 제어부의 제 1 및 제 2주기값을 1회 또는 특정 주기에 따라 계속적으로 출력하는 주기 및 제한값 인가부와; 소정 주기의 클럭신호를 카운트하고, 그 카운트 값을 상기 주기 및 제한값 인가부에서 인가된 제 1주기값과 비교하여 그 결과를 출력하는 제 1카운트 및 비교부와; 상기 소정 주기의 클럭신호를 카운트하고, 그 카운트한 값과 상기 주기 및 제한값 인가부에서 인가되는 제 2주기값을 비교하여 출력하는 제 2카운트 및 비교부와; 상기 제 1 및 제 2카운트 및 비교부의 출력신호에 따라 선택적으로 출력되는 상기 레지스터 및 제어부의 제 1 및 제 2인에이블신호에따라 제 1인터럽트신호 또는 제 2인터럽트신호를 출력하는 인터럽트 발생부로 구성하여 된 것을 특징으로 하는 타이머 회로.Receives an address signal, data and a control signal from the outside, stores the data in a register corresponding to the address signal, and stores the stored value as a mode signal for determining a mode, and a first period value and a second period for setting an output period. A register and a controller for outputting a periodic value; A mode detector for detecting a mode signal of the register and the controller and outputting an output signal for determining an operation mode of a timer; A period and limit value applying unit for continuously outputting the first and second period values of the register and the control unit once or in accordance with a specific period according to the output signal of the mode detector; A first counting and comparing section for counting a clock signal of a predetermined period and comparing the count value with a first period value applied by the period and limit value applying section and outputting a result; A second counting and comparing unit for counting the clock signal of the predetermined period and comparing the counted value with a second period value applied by the period and limit value applying unit; And an interrupt generator for outputting a first interrupt signal or a second interrupt signal according to the registers and the first and second enable signals of the controller selectively output according to the output signals of the first and second counts and the comparator. Timer circuit characterized in that. 제 1항에 있어서, 모드검출부의 출력신호가 타이머의 출력인 인터럽트신호가 한 번출력되고, 타이머의 동작이 정지되는 원샷모드(ONE SHOT MODE)일 때, 상기 제 2주기값을 제 1주기값보다 짧게 설정하거나, 제 1주기값과 제 2주기값을 동일한 값으로 설정하여, 인터럽트신호가 2회 또는 1회 출력되도록 하는 것을 특징으로 하는 타이머 회로.2. The method of claim 1, wherein when the output signal of the mode detector is an one-shot mode in which an interrupt signal, which is an output of a timer, is output once and the timer is stopped, the second period value is converted into a first period value. A shorter setting or a first cycle value and a second cycle value are set to the same value so that the interrupt signal is output twice or once. 제 1항에 있어서, 모드검출부의 출력신호가 설정시간이 경과할 때마다 인터럽트신호를 출력하는 주기모드(PERIODIC MODE)일 때, 상기 제 1 및 제 2주기값을 동일하게 설정하여 주기적으로 인터럽트신호가 발생되도록 하는 것을 특징으로 하는 타이머 회로.The interrupt signal of claim 1, wherein when the output signal of the mode detector is in a periodic mode in which an interrupt signal is output every time a set time elapses, the first and second period values are set to be the same, and the interrupt signal is periodically set. The timer circuit, characterized in that to generate.
KR10-1998-0029918A 1998-07-24 1998-07-24 Timer circuit KR100494114B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR10-1998-0029918A KR100494114B1 (en) 1998-07-24 1998-07-24 Timer circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR10-1998-0029918A KR100494114B1 (en) 1998-07-24 1998-07-24 Timer circuit

Publications (2)

Publication Number Publication Date
KR20000009469A true KR20000009469A (en) 2000-02-15
KR100494114B1 KR100494114B1 (en) 2005-08-01

Family

ID=19545122

Family Applications (1)

Application Number Title Priority Date Filing Date
KR10-1998-0029918A KR100494114B1 (en) 1998-07-24 1998-07-24 Timer circuit

Country Status (1)

Country Link
KR (1) KR100494114B1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020085627A (en) * 2001-05-09 2002-11-16 주식회사 에스오이엔지 Dual timer
KR100462736B1 (en) * 2003-04-30 2004-12-23 삼성전자주식회사 Timer capable of generating a plural time interrupt signal
US6982917B2 (en) 2001-11-06 2006-01-03 Samsung Electronics Co., Ltd. DRAM partial refresh circuits and methods

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020085627A (en) * 2001-05-09 2002-11-16 주식회사 에스오이엔지 Dual timer
US6982917B2 (en) 2001-11-06 2006-01-03 Samsung Electronics Co., Ltd. DRAM partial refresh circuits and methods
KR100462736B1 (en) * 2003-04-30 2004-12-23 삼성전자주식회사 Timer capable of generating a plural time interrupt signal

Also Published As

Publication number Publication date
KR100494114B1 (en) 2005-08-01

Similar Documents

Publication Publication Date Title
JP3322893B2 (en) Microcomputer
KR100494114B1 (en) Timer circuit
KR100347557B1 (en) Pulse signal generating apparatus and pulse signal generating method
KR960032138A (en) Microcomputer
KR100215849B1 (en) Method for managementing power suspend
KR100209595B1 (en) Device and method of interrupt generation
JP2707778B2 (en) Noise removal circuit
JPS62145440A (en) Runaway detection circuit
JP2000209076A (en) Noise detection circuit
KR0163926B1 (en) Programmable data coinciding detecting circuit
KR100366800B1 (en) Apparatus for detecting error of external clock in transmission system
JPH06225454A (en) Pule input processor
JPH04106637A (en) Stall detection circuit
JP2000055958A (en) Duty ratio deciding circuit and method for deciding duty rato
SU1126965A1 (en) Device for detecting and recording instable faults
JPH11143819A (en) Bus size circuit
KR100384783B1 (en) Test mode enable signal generator for micom
KR20000008601A (en) Motor speed detector
JP2977584B2 (en) Specific frequency signal detection device
JPH1165893A (en) Watchdog time-out detection time reset system
KR0182956B1 (en) Wait function implementation apparatus of microprocess using clock signal
JPH11212663A (en) Clock signal interruption detecting circuit
JPH04308909A (en) Pulse generator
JPH01173916A (en) Timing signal generation system
US20040113674A1 (en) Method and apparatus for on die clock shrink burst mode

Legal Events

Date Code Title Description
N231 Notification of change of applicant
A201 Request for examination
N231 Notification of change of applicant
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20080418

Year of fee payment: 4

LAPS Lapse due to unpaid annual fee