KR890003479B1 - Method for provide instant interruption of electric power of micro computer - Google Patents

Method for provide instant interruption of electric power of micro computer Download PDF

Info

Publication number
KR890003479B1
KR890003479B1 KR1019860009033A KR860009033A KR890003479B1 KR 890003479 B1 KR890003479 B1 KR 890003479B1 KR 1019860009033 A KR1019860009033 A KR 1019860009033A KR 860009033 A KR860009033 A KR 860009033A KR 890003479 B1 KR890003479 B1 KR 890003479B1
Authority
KR
South Korea
Prior art keywords
interrupt
internal
microcomputer
external
power failure
Prior art date
Application number
KR1019860009033A
Other languages
Korean (ko)
Other versions
KR880005502A (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 KR1019860009033A priority Critical patent/KR890003479B1/en
Publication of KR880005502A publication Critical patent/KR880005502A/en
Application granted granted Critical
Publication of KR890003479B1 publication Critical patent/KR890003479B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Power Sources (AREA)

Abstract

The voltage level sensing circuit which is constructed to determine whether the power failure occurs or not is eliminated and the determination function is performed by the microcomputer software. The internal main program of microcomputer is forced to be driven by the external and internal interruptions respectively. The source of external interruption is the frequency (65/60Hz) of AC source. The internal interruption is operated when the external interruption is not operated and so the current information is maintained. Therefore, the simplification of the circuit and the reduction of the fabrication cost can be obtained.

Description

마이콤의 순간 정전 대비 방법How to Prepare for Micom's Power Failure

제1도는 순간 정전 대비 마이콤 구성도.1 is a diagram of the microcomputer compared to the momentary power failure.

제2도는 인터럽트에 의한 순간 정전 감지 타이밍도.2 is a timing diagram of a momentary power failure detection by an interrupt.

제3도는 본 발명의 구동 풀로우챠트.3 is a drive pull chart of the present invention.

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

1 : 전원부 C1: 콘덴서(백업용)1: power supply part C 1 : capacitor (for backup)

2 : 마이콤 3 : 출력부2: micom 3: output unit

본 발명은 마이콤의 순간 정전 대비 방법에 관한 것이다. 가정용 전자제품에 널리 사용되고 있는 마이콤(단일칩)들은 정전시 이전의 상태를 유지하기 위한 스텐바이(Stand-By)기능이 내장되어 있으나 이러한 스텐바이 기능을 동작시키기 위하여 종래에는 마이콤에 백업용 콘덴서를 연결하고 비교기나 트랜지스터 등으로 구성된 전압 레벨 감지회로에서 전압 레벨을 감지하여 순간 정전 여부를 판단하게 하여 순간 정전시 마이콤에서 외부로 입, 출력되는 모든 신호를 차단하고 현재의 정보 상태만을 백업 콘덴서에 충전된 전력을 이용하여 유지하도록 하였기 때문에 단일칩 마이콤에서 정전 상태를 판단 검출하는 하드웨어적인 전압 레벨감지회로의 구성이 필요한 것이었다.The present invention relates to a method for preparing an instant power failure of a microcomputer. Micoms (single chips), which are widely used in home electronics, have a built-in stand-by function to maintain the state before power failure. However, in order to operate the standby function, a backup capacitor is connected to the micom. The voltage level sensing circuit composed of comparator or transistor detects the voltage level and judges whether there is a momentary power failure. Since it was maintained by using power, it was necessary to construct a hardware voltage level detection circuit that detects and detects a power failure state in a single chip microcomputer.

본 발명은 이와같은 점을 감안하여 정전 여부를 판단하기 위하여 구성되는 하드웨어적인 전압 레벨 감지회로를 제거하고 정전 여부의 판단 기능을 마이콤의 소프트웨어적으로 처리할 수 있는 순간 정전 대비 방법을 제공하고자 하는 것으로 마이콤 내부의 주프로그램을 외부인터럽트 및 내부 인터럽트에 의하여 각기 구동되게 하고 외부 인터럽트는 교류전원 주파수(65/60HZ)를 인터럽트 원으로 하고 내부 인터럽트는 외부 인터럽트가 걸리지 않을 때 걸리게 하여 교류 전원의 공급 여부를 판단할 수 있도록 한 것이다. 이를 첨부도면에 의하여 상세히 설명하면 다음과 같다.The present invention is to provide a method for preparing for a momentary power failure that can remove the hardware voltage level detection circuit is configured to determine whether there is a power failure, and can be processed by the software of the microcomputer to determine whether the power failure. The main program inside the microcomputer is driven by the external interrupt and the internal interrupt, and the external interrupt is the source of AC power supply (65 / 60HZ) as the interrupt source, and the internal interrupt is caught when the external interrupt is not applied. It is to be judged. When described in detail by the accompanying drawings as follows.

제1도는 본 발명의 회로도로서 전원부(1)의 출력이 일측으로 백업용 콘덴서(C1)를 통하여 마이콤(2)의 전원단자(Vcc)와 연결되게 구성하고 타측으로 마이콤(2)의 인터럽트 단자(INT)에 인가되게 구성한후 출력부(3)와 연결시켜 된 것이며 제3도와 같이 마이콤 내부의 프로그램은 (나)도의 외부 인터럽트 루틴 및 (다)도의 내부 인터럽트 루틴의 수행에 따라 (가)도와 같은 주프로그램의 「정상메인 루틴 수행」과 「비구동 수행」루틴을 수행할 수 있도록 구성한 것이다.FIG. 1 is a circuit diagram of the present invention, in which the output of the power supply unit 1 is connected to the power terminal Vcc of the microcomputer 2 through the backup capacitor C 1 on one side, and the interrupt terminal of the microcomputer 2 to the other side. It is configured to be applied to INT), and then it is connected to the output part 3. As shown in FIG. 3, the program inside the microcomputer is similar to the one shown in (A) according to the execution of the external interrupt routine of (B) and the internal interrupt routine of (C). It is configured to execute the normal main routine and non-driven routines of the main program.

이때 마이콤(2)의 외부 인터럽트는 50/60HZ의 교류전원을 인터럽트 원으로 하여 50/60HZ교류 주파수 인가시마다 제2도에 도시된 바와같이 외부 인터럽트가 걸리게 되어 「정상 메인 루틴 수행」동작을 하게 되고 이와 동시에 내부 타이머를 세트시킴으로써 외부인터럽트가 걸리지 않으면 내부 타이머 동작에 의한 내부 인터럽트가 걸리게 되어 전원 공급이 정지됨을 인식하여 「비구동 수행」루틴을 수행하게 된다.At this time, the external interrupt of the microcomputer 2 uses an AC power source of 50 / 60HZ as the interrupt source, and whenever the 50 / 60HZ AC frequency is applied, an external interrupt occurs as shown in FIG. At the same time, if an external interrupt is not applied by setting an internal timer, an internal interrupt by an internal timer operation is applied, and the power supply is stopped, thereby performing a "non-driven execution" routine.

이와 같은 본 발명에서 제2도와 같이 주파수 50/60HZ의 교류 전원이 일반적 구성의 전원부(1)에 정상적으로 인가되면 백업용 콘덴서 (C1)를 통하여 마이콤(2)의 전원단자(Vcc)에 정류된 직류 전원을 공급하게 되고 전원부(1)에서 정류되기전의 교류 전원은 직접 마이콤(2)의 인터럽트단자(INT)에 외부 인터럽트의 인터럽트원으로 인가되게 된다. 그리고 마이콤(2)에서는 50/60HZ의 인터럽트 원에 의하여 교류 50/60HZ 신호가 인가될때 제3(b)도와 같은 외부 인터럽트가 걸림과 동시에 내부 타이머를 세트시킴으로써 외부 인터럽트가 걸리지 않으면 제3(c)도에서와 같은 내부 인터럽트가 걸리게 되며 이와같은 외부 인터럽트 및 내부 인터럽트에 의하여 제3(a)도와 같은 주프로그램이 수행되게 된다. 즉 교류 50/60HZ 신호에 의하여 정상적인 외부 인터럽트가 걸리면 인터럽트 마스크(MASK)를 세트시킴과 동시에 내부 인터럽트를 걸리게 하는 내부 타이머가 리셋트되게 하고 비구동 플래그(FLG)를 클리어시키며 외부 인터럽트 루틴을 수행한 후 다음 외부 인터럽트와 내부 인터럽트를 인에이블 시킴과 동시에 인터럽트 마스크를 해제시키고 외부 인터럽트에서 리턴되게 된다. 그리고 교류 50/60HZ 신호가 인가되지 않아 타이머에 의한 내부 인터럽트가 걸리면 인터럽트 마스크를 세트시키고 비구동 플래그를 세트시키며 모든 출력을 차단시킨후 내부 인터럽트 모우드를 해제하고 외부 인터럽트 모우드를 셋트시키며 인터럽트 마스크를 해제시켜 내부 인터럽트에서 리턴되게 된다.In the present invention as shown in FIG.OneThe rectified DC power is supplied to the power supply terminal (Vcc) of the microcomputer (2), and the AC power before rectifying from the power supply unit (1) is directly connected to the interrupt terminal (INT) of the microcomputer (2). To be applied. And in the microcomputer 2, AC 50 / 60HZ by the interrupt source of 50 / 60HZ When the signal is applied, an external interrupt such as Fig. 3 (b) is taken and an internal interrupt is set by setting an internal timer. When the signal is not applied, an internal interrupt as in Fig. 3 (c) is applied. The main program as shown in FIG. 3 (a) is executed. That is, if a normal external interrupt occurs due to the AC 50 / 60HZ signal, the interrupt mask (MASK) is set and the internal timer that resets the internal interrupt is reset, the non-drive flag (FLG) is cleared, and the external interrupt routine is executed. After the next external and internal interrupts are enabled, the interrupt mask is released and returned from the external interrupt. If the AC 50 / 60HZ signal is not applied and an internal interrupt by the timer is applied, set the interrupt mask, set the non-driven flag, turn off all outputs, release the internal interrupt mode, set the external interrupt mode, and release the interrupt mask. To return from an internal interrupt.

이와같이 교류 50/60HZ 신호를 인터럽트 원으로 하여 외부 인터럽트가 걸리게 되고 교류 신호가 인가도지 않을 때에는 내부 인터럽트가 걸리게 되므로 주프로그램에서는 비구동 플래그(FLG)의 셋트 여부를 판단하여 플래그 셋트가 되지 않았을 때(정상적인 전원 인가로 외부 인터럽트가 걸릴때) 정상 메인 루틴 수행 동작을 행하고 플래그가 세트되면(전원 정전으로 내부 인터럽트가 걸릴때) 비구동 수행 루틴을 수행하게 된다.In this way, when the AC 50 / 60HZ signal is used as an interrupt source, an external interrupt is applied, and when an AC signal is not applied, an internal interrupt is generated. When an external interrupt occurs due to normal power on) When a normal main routine execution operation is performed and a flag is set (when an internal interrupt occurs due to a power failure), a non-driven execution routine is executed.

이와같이 교류 50/60HZ주파수 신호에 의하여 외부 인터럽트가 걸리는 상태 및 외부 인터럽트가 걸리지 않을때 내부 인터럽트가 걸리는 상태를 제2도에 의거 살펴본다. 즉 교류 50/60HZ 신호를 인터럽트 원으로 외부 인터럽트를 걸어주게 되므로 t1, t2에서는 정상적인 외부 인터럽트가 걸리게 되며 이같이 외부 인터럽트가 걸릴때마다 내부 타이머 인터럽트를 셋트시켜 주어 교류 50/60HZ 신호의 1주기보다 길게 설정된 일정시간(△t) 후에 인터럽트가 걸리게 하므로써 만일 t3지점에서 외부 인터럽트가 걸리지 않을 경우(즉 AC전원 공급이 차단될 경우)에는 t2로 부터 일정시간(△t)이 경과한 t4시점에서 내부 인터럽트가 걸리게 되어 마이콤에서는 정전 상태임을 판단하게 된다. 즉 t2시점 이후 내부 타이머에 의한△t의 시간이 경과할때까지 외부 인터럽트 원인 교류 50/60HZ 신호가 인가되지 않으면 t4시점에서 내부 인터럽트가 걸리게 되며 내부 인터럽트가 걸리면 제3(c)도에서도 같이 비구동 플래그(FLG)를 셋트시키고 모든 출력포트를 차단시킨후 리턴되게 된다. 이때 이후에는 내부 인터럽트는 걸리지 않게 하며 단지 교류 50/60HZ인터럽트 루틴에서만 내부 인터럽트를 세트할수 있도록 한다.As described above, the state in which the external interrupt is applied by the AC 50 / 60HZ frequency signal and the state in which the internal interrupt is applied when no external interrupt is applied will be described according to FIG. That is, since external interrupt is applied to the AC 50 / 60HZ signal as the interrupt source, normal external interrupt is applied at t 1 and t 2 .In this way, internal timer interrupt is set every time external interrupt is applied, so one cycle of AC 50 / 60HZ signal is used. is after the predetermined period of time (△ t) is set longer when an interrupt takes by ten thousand and one not at t 3 the point where the external interrupt take (that is if the block AC power supply), the elapsed t a period of time (△ t) from t 2 At the point 4 , an internal interrupt is applied, and the microcomputer determines that it is in a blackout state. That is, if the external interrupt cause AC 50 / 60HZ signal is not applied until the time of Δt by the internal timer after time t 2 , the internal interrupt is applied at time t 4 . Likewise, the non-driven flag (FLG) is set and all output ports are blocked and returned. After this, internal interrupts are not interrupted and only internal ACs can be set by the AC 50 / 60HZ interrupt routine.

한편 제3(a)도의 주프로그램에서는 내부 인터럽트가 걸릴때 셋트되는 비구동 플래그의 셋트 여부에 따라 정상 메인 루틴 수행을 행하거나 비구동 수행 루틴을 행하게 된다. 즉 교류 50/60HZ 신호가 인가될때에는 외부 인터럽트가 걸리게 되어 비구동 플래그가 클리어되게 되고 교류 50/60HZ 신호가 인가되지 않을때에는 내부 인터럽트가 걸리게 되어 비구동 플래그가 세트되게 되므로 주프로그램에서는 상기 비구동 플래그의 셋트 여부를 판단하여 정상적인 메인 루틴을 수행하게 하거나 또는 모든 출력을 차단시키고 백업 콘덴서(C1)의 전원을 이용하여 이전의 상태를 유지시키도록 하는 비구동 수행 루틴을 수행하게 된다.On the other hand, the main program of FIG. 3 (a) performs normal main routine execution or non-driven execution routine depending on whether the non-driven flag set when an internal interrupt is applied. In other words, when the AC 50 / 60HZ signal is applied, an external interrupt is applied and the non-drive flag is cleared. When the AC 50 / 60HZ signal is not applied, the internal interrupt is applied and the non-drive flag is set. Determining whether or not the flag is set to perform a normal main routine or to perform a non-driven execution routine to cut off all output and maintain the previous state using the power of the backup capacitor (C 1 ).

한편 주프로그램의 비구동 수행 루틴에서 빠져나오기 위해서는 다시 AC전원이 공급되고 이에 따라 50/60HZ주파수 신호로 외부 인터럽트가 걸리게 되면 비구동 플래그를 클리어시킴으로써 해제되게 된다.On the other hand, to exit the non-driven execution routine of the main program, when AC power is supplied again and an external interrupt is applied with the 50 / 60HZ frequency signal, it is released by clearing the non-driven flag.

이상에서와 같이 본 발명은 백업용 콘덴서가 설치되어 정전시 전원은 공급하여 데이타를 유지시키는 마이콤에 잇어서, 교류 전원의 50/60HZ 신호를 인터럽트 원으로 하여 외부 인터럽트가 걸리게 함과 동시에 내부 타이머를 세트시켜 주어 일정시간(△t)동안 외부 인터럽트가 걸리지 않을 때(정전시) 내부 인터럽트가 걸리게하여 마이콤이 모든 출력을 차단하고 백업용 콘덴서의 전류를 이용하여 이전의 정보 데이타를 유지시킬 수 있도록 한 것으로써 본 발명에서는 정전 산태의 판단을 종래의 전압 레벨 감지회로와 같이 하드웨어적인 구성이 필요없이 마이콤의 소프트웨어로 판단할수 있어 회로의 단순화 및 제조원가의 절감을 기할수 있는 것이다.As described above, according to the present invention, a backup capacitor is installed to supply power in case of power failure, and the microcomputer maintains data. The external timer is set at the same time as the interrupt source using the 50 / 60HZ signal of AC power. When the external interrupt is not taken for a certain time (△ t) (in case of power failure), the internal interrupt is applied so that the microcomputer can cut off all the output and maintain the previous information data by using the current of the backup capacitor. In the present invention, the determination of the power failure can be determined by the software of the microcomputer without the hardware configuration as in the conventional voltage level sensing circuit, thereby simplifying the circuit and reducing the manufacturing cost.

Claims (1)

정전시 백업용 콘덴서(C1)의 전원으로 현재의 정보 신호를 유지시키는 마이콤에 있어서, 교류 50/60HZ의 주파수 신호를 인터럽트 원으로 하여 인터럽트가 걸리게 함과 동시에 내부 타이머를 세트시켜 주어 일정시간(△t)동안 외부 인터럽트가 걸리지 않으면 모든 출력을 차단시키고 현재 정보를 유지시키는 내부 인터럽트가 걸리게 하는 마이콤의 순간 정전 대비 방법.In the microcomputer that maintains the current information signal by the power supply of the backup capacitor C 1 in case of power failure, interruption is made by using the AC 50 / 60HZ frequency signal as the interrupt source, and an internal timer is set for a predetermined time (△ Micom's instantaneous power outage method that interrupts all outputs and causes internal interrupts to maintain current information if no external interrupts are taken during t).
KR1019860009033A 1986-10-27 1986-10-27 Method for provide instant interruption of electric power of micro computer KR890003479B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019860009033A KR890003479B1 (en) 1986-10-27 1986-10-27 Method for provide instant interruption of electric power of micro computer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019860009033A KR890003479B1 (en) 1986-10-27 1986-10-27 Method for provide instant interruption of electric power of micro computer

Publications (2)

Publication Number Publication Date
KR880005502A KR880005502A (en) 1988-06-29
KR890003479B1 true KR890003479B1 (en) 1989-09-22

Family

ID=19253030

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019860009033A KR890003479B1 (en) 1986-10-27 1986-10-27 Method for provide instant interruption of electric power of micro computer

Country Status (1)

Country Link
KR (1) KR890003479B1 (en)

Also Published As

Publication number Publication date
KR880005502A (en) 1988-06-29

Similar Documents

Publication Publication Date Title
CA2210424C (en) Method and apparatus for power management in a multifunction controller with an embedded micro-processor
KR0180801B1 (en) Control device for switching mode power supply
JPH07200092A (en) Computer system and its electric power management device
US5123018A (en) Micropressor monitoring and resetting circuit
KR890003479B1 (en) Method for provide instant interruption of electric power of micro computer
JP2002196845A (en) Method for controlling microcomputer
KR970000878B1 (en) Voltage and current protection circuit of inverter
CN112000505A (en) Time-interval reliable watchdog circuit and control method thereof
KR930004365Y1 (en) Power circuit
JPH04217877A (en) Overcurrent protective device for inverter
JPH0313786Y2 (en)
KR920006045B1 (en) Starting delay method for compressor after instantaneous power failure
JPS5580134A (en) Integrated circuit
JPH0949859A (en) Power failure detection circuit
JPH01245322A (en) Power failure control circuit for microprocessor
JPH11337596A (en) Power failure detecting method and power failure detecting circuit using the method
KR200283612Y1 (en) Control circuit in case of power failure
KR0155045B1 (en) Watch dog timmer of self-service guard system
JPH06103480B2 (en) Blackout processor
JPH0968548A (en) Power failure detecting circuit
JPH0573360A (en) Watchdog timer
JPH0922403A (en) Integrated circuit having reset control function
JPS63103311A (en) Processing method for microcomputer system at time of service interruption
JP2874915B2 (en) Fire detector with low current consumption
KR900009460Y1 (en) Power failure detection interrupting circuit for micro-processor

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
G160 Decision to publish patent application
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20020830

Year of fee payment: 14

LAPS Lapse due to unpaid annual fee