KR19990071031A - Memory switching device and control method for updating program memory - Google Patents

Memory switching device and control method for updating program memory Download PDF

Info

Publication number
KR19990071031A
KR19990071031A KR1019980006230A KR19980006230A KR19990071031A KR 19990071031 A KR19990071031 A KR 19990071031A KR 1019980006230 A KR1019980006230 A KR 1019980006230A KR 19980006230 A KR19980006230 A KR 19980006230A KR 19990071031 A KR19990071031 A KR 19990071031A
Authority
KR
South Korea
Prior art keywords
program
cpu
output
memory
signal
Prior art date
Application number
KR1019980006230A
Other languages
Korean (ko)
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 KR1019980006230A priority Critical patent/KR19990071031A/en
Publication of KR19990071031A publication Critical patent/KR19990071031A/en

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

본 발명은 80C517 마이컴(MICOM)에 관한 것으로서, 시스템 전체를 제어하는 CPU(10)와, 상기 CPU(10) 내부에 설치되어 프로그램(Program)이 저장되어 있는 내부 프로그램 메모리(20)와, 상기 CPU(10)의 외부에 연결되어 상기 CPU(10)로부터 출력되는 제어신호를 입력받아서 그 내부에 저장되어 있는 프로그램을 리드(read)하는 외부 프로그램 메모리(30)와, 상기 외부 프로그램 메모리(30)에 저장되어 있는 프로그램을 업 데이트(Up date)하고자 하는 경우 업 데이트된 프로그램을 상기 외부 프로그램 메모리(30)에 저장하도록 상기 CPU(10)의 EA PIN을 하이신호로 제어하는 프로그램 메모리 제어부(40)로 구성되어 있어서, 특히 상기 CPU에 여분의 출력 포트(port)가 없는 경우에, CPU의 EA PIN에 하이 신호를 인가하여 상기 CPU의 내부에 있는 내부 프로그램 메모리를 선택하도록 함으로써, 엔진 전자시스템을 개발하는 과정에서 프로그램을 수정하거나 업데이트하는 경우에 적은 비용으로 에물레이션(Emulation)을 할 수 있는 발명이다.The present invention relates to a microcomputer 80C517 MICOM, a CPU 10 for controlling the entire system, an internal program memory 20 installed in the CPU 10 and storing a program, and the CPU An external program memory 30 connected to the outside of the CPU 10 to receive a control signal output from the CPU 10 and to read a program stored therein, and to the external program memory 30. If you want to update the stored program (Up date) to the program memory control unit 40 to control the EA PIN of the CPU 10 to a high signal to store the updated program in the external program memory (30) By applying a high signal to the EA PIN of the CPU, especially when the CPU does not have an extra output port, by selecting the internal program memory inside the CPU, Jean invention is capable of emulation (Emulation) at a low cost when you update or modify the program in the process of developing an electronic system.

Description

프로그램 메모리를 업 데이트하기 위한 메모리 스위칭장치 및 제어방법Memory switching device and control method for updating program memory

본 발명은 80C517 마이컴(MICOM)에 관한 것으로서, 특히 지멘스 마이컴(Simense MICOM)을 사용한 엔진 전자제어 시스템에서 프로그램 데이터(Program data)를 업 데이트(Up date)할 경우, CPU(Central processing unit)가 프로그램을 사용하는 중에도 플레쉬 메모리(Flash memory)의 내용을 업 데이트 할 수 있는 프로그램 메모리를 업 데이트하기 위한 메모리 스위칭장치 및 제어방법에 관한 것이다.The present invention relates to 80C517 MICOM, in particular, when the program data (Up date) in the engine electronic control system using the Siemens MICOM (Central Processing Unit) CPU (Central processing unit) program The present invention relates to a memory switching device and a control method for updating a program memory that can update the contents of a flash memory even while using the memory.

종래에는 프로그램을 마스크드(Masked) 메모리에 저장하여 사용하다가 사용중에 프로그램 내용을 변경하고자 하는 경우에는 다시 새로운 프로그램을 다른 메모리에 저장한 후 사용하였기 때문에 사용중에 프로그램이 변경되는 경우에는 추가적인 메모리의 사용으로 메모리의 비용이 추가적으로 소요될 뿐만 아니라 프로그램이 변경시마다 별도로 프로그램을 다시 작성해야 하는 번거로움이 있었다.Conventionally, when a program is stored in a masked memory and used, and the program contents are to be changed during use, a new program is stored in another memory and used again. Therefore, when the program is changed during use, additional memory is used. Not only does it cost additional memory, but it also has the inconvenience of rewriting the program separately whenever the program changes.

상기와 같은 문제점을 해결하기 위한 본 발명의 목적은, CPU가 동작중에도 EA PIN을 적절하게 제어함으로써, 업 데이트하고자 하는 경우 프로그램 메모리를 데이터 메모리로 스위칭한후 프로그램을 저장한 후 다시 원래의 프로그램 메모리로 전환함으로써, 손쉽게 변경된 프로그램을 업 데이트 할 수 있는 프로그램 메모리를 업 데이트하기 위한 메모리 스위칭장치 및 제어방법을 제공하는데 있다.An object of the present invention for solving the above problems, by controlling the EA PIN properly while the CPU is operating, switching the program memory to the data memory and then saving the program after the original program memory again if you want to update The present invention provides a memory switching device and a control method for updating a program memory that can easily update a changed program.

상기와 같은 목적을 달성하기 위한 본 발명의 프로그램 메모리를 업 데이트하기 위한 메모리 스위칭장치는, 시스템 전체를 제어하는 CPU와, 상기 CPU 내부에 설치되어 프로그램이 저장되어 있는 내부 프로그램 메모리와, 상기 CPU의 외부에 연결되어 상기 CPU로부터 출력되는 제어신호를 입력받아서 그 내부에 저장되어 있는 프로그램을 리드(read)하는 외부 프로그램 메모리와, 상기 외부 프로그램 메모리에 저장되어 있는 프로그램을 업 데이트(Up date)하고자 하는 경우 업 데이트된 프로그램을 상기 외부 프로그램 메모리에 저장하도록 상기 CPU의 EA PIN에 하이신호를 출력하는 프로그램 메모리 제어부로 구성되어 있는 것을 특징으로 한다.The memory switching device for updating the program memory of the present invention for achieving the above object includes a CPU for controlling the entire system, an internal program memory installed in the CPU and stored therein, An external program memory which is connected to an external device and receives a control signal output from the CPU to read a program stored therein, and an update program for updating the program stored in the external program memory. And a program memory controller for outputting a high signal to the EA PIN of the CPU to store the updated program in the external program memory.

상기와 같은 목적을 달성하기 위한 본 발명의 프로그램 메모리를 업 데이트하기 위한 메모리 스위칭 제어방법은, 외부 프로그램 메모리에 저장되어 있는 프로그램 내용을 변경하고자 하는 경우에는, 먼저 상기 외부 프로그램 메모리에 저장되어 있는 프로그램의 변경을 요청하는 제 1단계(S1)와, 상기 제 1 단계(S1)에서 프로그램 변경 요청에 따라서, 제 2 플립플롭의 출력단자(Q)에서는 CPU의 EA PIN 단자에 하이신호를 출력하는 제 2단계(S2)와, 상기 제 2단계(S2)에서 하이신호를 인가 받은 상기 CPU에서는 내부 프로그램 메모리를 선택함으로써, 새로운 프로그램 데이터로 업 데이트하는 제 3단계(S3)와, 상기 제 3단계(S3)에서 상기 외부 프로그램 메모리에 저장되어 있는 프로그램을 새롭게 업데이트한 후, 변경된 프로그램이 베리파이(verify)되었는지를 판단하는 제 4단계(S4)와, 상기 제 4단계(S4)에서 상기 외부 프로그램 메모리에 저장되어 있는 프로그램이 정상적으로 업 데이트되었다고 판단하면, 제 2 플립플롭의 출력단자에서 EA PIN에 로우신호를 출력되는 제 5단계(S5)와, 상기 제 5단계(S5)에서 출력되는 EA PIN의 로우 신호를 입력받아 상기 CPU(10)에서는 외부 메모리를 선택하게 됨으로써, 상기 외부 프로그램 메모리에 저장되어 있는 프로그램이 다시 정상적인 메인 프로그램이 되어 프로그램을 변경하기 전의 정상적인 상태로 동작하게 되는 제 6단계(S6)와, 상기 제 4단계(S4)에서 프로그램이 정상적으로 변경되었는지 판단하여 정상적으로 변경되지 않은 경우에는 오류기능 표시 램프를 토글(Toggle)시키는 제 7단계(S7)로 이루어져 있는 것을 특징으로 한다.The memory switching control method for updating the program memory of the present invention for achieving the above object, if you want to change the contents of the program stored in the external program memory, first the program stored in the external program memory The first step (S1) for requesting the change of the second and the first step (S1) in accordance with the program change request, the output terminal (Q) of the second flip-flop outputs a high signal to the EA PIN terminal of the CPU In the second step S2 and the CPU to which the high signal is applied in the second step S2, by selecting an internal program memory, the third step S3 is updated to new program data, and the third step ( In step S3), after newly updating the program stored in the external program memory, it is determined whether the changed program has been verified. If it is determined that the program stored in the external program memory is normally updated in the fourth step S4 and the fourth step S4, a low signal is output to the EA PIN at the output terminal of the second flip-flop. The CPU 10 selects an external memory by receiving the low signal of the EA PIN output in the fifth step S5 and the fifth step S5, so that the program stored in the external program memory is returned to normal. Toggle the error function indicator lamp when it is not changed normally by determining whether the program is normally changed in the sixth step (S6) and the fourth step (S4). Toggle a seventh step (S7) characterized in that consisting of.

도 1은 본 발명의 프로그램 메모리를 업 데이트하기 위한 메모리 스위칭장치를 개략적으로 도시한 블록도이며,1 is a block diagram schematically showing a memory switching device for updating a program memory of the present invention;

도 2는 본 발명의 프로그램 메모리 제어부를 구체적으로 도시한 회로도이며,2 is a circuit diagram specifically illustrating a program memory controller of the present invention;

도 3은 프로그램 메모리를 업 데이트하기 위한 메모리 스위칭장치에 대한 타이밍 챠트이며,3 is a timing chart for a memory switching device for updating a program memory,

도 4는 프로그램 메모리를 업 데이트하기 위한 메모리 스위칭 제어방법에 대한 흐름도이다.4 is a flowchart illustrating a memory switching control method for updating a program memory.

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

10 : CPU 20 : 내부 프로그램 메모리10: CPU 20: internal program memory

30 : 외부 프로그램 메모리 40 : 프로그램 메모리 제어부30: external program memory 40: program memory control unit

401, 403 : 낸드 게이트 405, 407 : 오아 게이트401, 403: NAND gate 405, 407: OA gate

409 : 제 1플립플롭 410 : 낫 게이트409: first flip-flop 410: sickle gate

411 : 제 2플립플롭411: second flip-flop

본 발명의 프로그램 메모리를 업 데이트하기 위한 메모리 스위칭장치 및 제어방법에 대해서는 첨부한 도면을 참고로 상세히 기술하면 다음과 같다.A memory switching device and a control method for updating the program memory of the present invention will be described in detail with reference to the accompanying drawings.

본 발명은 도 1 및 도 2에 도시된 바와 같이, 시스템 전체를 제어하는 지멘스 80C517계열인 CPU(10)와, 상기 CPU(10) 내부에 설치되어 프로그램(Program)이 저장되어 있는 내부 프로그램 메모리(20)와, 상기 CPU(10)의 외부에 연결되어 상기 CPU(10)로부터 출력되는 제어신호를 입력받아서 그 내부에 저장되어 있는 프로그램을 리드(read)하는 외부 프로그램 메모리(30)와, 상기 외부 프로그램 메모리(30)에 저장되어 있는 프로그램을 업 데이트(Up date)하고자 하는 경우 외부에 저장되어 있는 업 데이트된 프로그램을 상기 외부 프로그램 메모리(30)에 저장하도록 상기 CPU(10)의 EA PIN을 하이신호로 제어하는 프로그램 메모리 제어부(40)로 구성되어 있다.1 and 2, the CPU 10 of the Siemens 80C517 series that controls the entire system, and an internal program memory installed in the CPU 10 to store a program (Program) ( 20), an external program memory 30 connected to the outside of the CPU 10 to receive a control signal output from the CPU 10 and to read a program stored therein, and the external If you want to update the program stored in the program memory (30) (High date) to increase the EA PIN of the CPU 10 to store an externally stored updated program in the external program memory (30) It consists of the program memory control part 40 which controls by a signal.

그리고 상기 프로그램 메모리제어부(40)는 도 2에 도시된 바와 같이, 상기 CPU(10)로부터 출력되는 어드레스 신호(A8-A11)를 입력받아 논리곱하여 입력되는 신호가 모두 하이일 경우에 로우로 출력하는 낸드 게이트(NAND gate)(403)와, 상기 CPU(10)로부터 출력되는 어드레스 신호(A12-A15)를 입력받아 논리곱하여 입력되는 신호가 모두 하이일 경우에 로우신호로 출력하는 낸드 게이트(401)와, 상기 낸드 게이트(401) 및 낸드 게이트(403)에서 출력되는 신호를 입력받아 논리합하여 입력되는 신호중 어느 하나라도 하이이면 하이로 출력하는 오아 게이트(OR gate)(405)와, 상기 오아 게이트(405)로부터 출력되는 신호와 CPU로부터 출력되는 라이트신호(WR)를 입력받아 이들의 신호를 논리합하는 오아 게이트(407)와, 상기 오아 게이트(407)에서 출력되는 신호를 클럭단자(CLK)에서 입력받고 상기 CPU에서 출력되는 데이터를 데이터 입력단자(D)에 입력시킴으로써 출력단자(Q)에서 입력신호를 래치(Latch)한후 출력신호(A)를 출력하는 제 1 플립 플롭(Flip flop)(409)과, 상기 CPU에서 출력되는 리셋(Reset)신호를 반전하여 출력하는 낫 게이트(NOT gate)(410)와, 상기 낫 게이트(410)에서 반전된 리셋 신호가 클럭단자에 입력되고, 상기 제 1 플립 플롭(409)의 출력단자에서 출력되는 출력신호(A)를 입력단자(D)에서 입력받아, 출력단자(Q)에서 상기 CPU의 EA PIN으로 하이 신호를 출력함으로써, 상기 외부 프로그램 메모리(30)에 저장되어 있는 프로그램을 업 데이트하는 제 2 플립플롭(411)으로 구성되어 있다.As illustrated in FIG. 2, the program memory controller 40 receives an address signal A8-A11 output from the CPU 10 and outputs a low signal when all of the input signals are high. A NAND gate 401 that receives the NAND gate 403 and the address signals A12-A15 output from the CPU 10 and logically multiplies them and outputs a low signal when the input signals are all high. An OR gate 405 for receiving a signal output from the NAND gate 401 and the NAND gate 403 and performing a logical OR to output a high signal if any one of the input signals is high; An OR gate 407 for receiving the signal output from the 405 and the write signal WR output from the CPU and ORing the signals, and the signal output from the OR gate 407 are inputted from the clock terminal CLK. A first flip flop 409 which latches an input signal at an output terminal Q and outputs an output signal A by inputting data output from the CPU to the data input terminal D. And a NOT gate 410 for inverting and outputting a reset signal output from the CPU, and a reset signal inverted at the sick gate 410 is input to a clock terminal. The external program memory 30 receives an output signal A output from the output terminal of the flop 409 from the input terminal D, and outputs a high signal from the output terminal Q to the EA PIN of the CPU. It consists of a second flip-flop 411 for updating the program stored in.

즉, 상기 CPU(10)에 연결되어 있는 상기 외부 프로그램 메모리(30)의 프로그램을 업 데이트할 경우에는 상기 CPU(10)에서 출력되는 리셋(Reset) 신호를 인가함으로써, 상기 외부 프로그램 메모리(30)를 프로그램 모드로 동작시킬 수 있는 것이다.That is, when updating a program of the external program memory 30 connected to the CPU 10, the external program memory 30 is applied by applying a reset signal output from the CPU 10. Can be operated in program mode.

상기와 같이 구성된 본 발명의 작용, 효과를 첨부된 도 1 내지 도 4를 참고하여 기술하면 다음과 같다.The operation and effects of the present invention configured as described above will be described with reference to FIGS. 1 to 4.

사용자가 정상적으로 프로그램을 사용하다가, 여러 가지 원인으로 인해서 프로그램이 변경되거나, 업 그레이드되어 외부 프로그램 메모리(30)에 저장되어 있는 프로그램 내용을 변경하고자 하는 경우에는, 먼저 상기 외부 프로그램 메모리(30)에 저장되어 있는 프로그램의 변경을 요청하는 제 1단계(S1)와, 상기 제 1 단계(S1)에서 프로그램 변경을 요청하게 되면, 상기 CPU(10)로부터 출력되는 어드레스 신호(A8-A11)를 낸드 게이트(403)에서 입력받아 논리곱하여 출력하고, 그리고 상기 CPU(10)에서 출력되는 어드레스 신호(A12-A15)를 낸드 게이트(401)에서 입력받아 논리곱하여 출력한다.When the user normally uses the program and the program is changed or upgraded due to various reasons and wants to change the program content stored in the external program memory 30, the user first stores the program in the external program memory 30. A first step S1 for requesting a change of a program, and a request for program change in the first step S1, a NAND gate (A8-A11) outputting an address signal A8-A11 output from the CPU 10. In operation 403, the result is logically multiplied and output, and the address signals A12-A15 output from the CPU 10 are received by the NAND gate 401 and output by AND.

그리고 상기 오아 게이트(405)에서는 상기 낸드 게이트(401)와 낸드 게이트(403)에서 출력되는 신호를 입력받아 논리합한다.The OR gate 405 receives and outputs the signals output from the NAND gate 401 and the NAND gate 403.

이와 같이, 상기 오아 게이트(405)에서 논리합하여 출력되는 신호와 상기 CPU(10)에서 출력되는 라이트 신호(WR)를 오아 게이트(407)에서 입력받아 논리합한 후 상기 제 1 플립 플롭(409)의 클럭단자(CLK)에 출력하고, 그리고 상기 CPU(10)에서 출력되는 데이터 신호(DO)가 상기 제 1 플립 플롭(409)의 입력단자(D)에 입력되면, 상기 제 1 플립 플롭(409)의 출력단자(Q)에서는 도 3에 도시된 (라)에서와 같은 신호가 출력된다.As described above, the OR signal received from the OR gate 405 and the write signal WR output from the CPU 10 are inputted from the OR gate 407, and then ORed, and then the first flip flop 409 is connected to the OR signal. The first flip flop 409 is output to the clock terminal CLK and the data signal DO output from the CPU 10 is input to the input terminal D of the first flip flop 409. In the output terminal Q, the same signal as in (d) shown in FIG.

그리고 상기 제 1 플립 플롭(409)의 출력단자(Q)에서 출력신호(A)가 출력되면, 상기 출력신호(A)는 제 2 플립플롭(411)의 입력단자(D)에 입력되고, 그리고 상기 CPU(10)에서 출력되는 리셋 신호(RO) 즉, 도 3의 (마)에 도시된 바와 같은 신호가 클럭단자(CLK)에 입력되면, 상기 제 2 플립플롭(411)의 출력단자(Q)에서는 도 3의 (바)와 같은 하이신호가 출력되는 제 2단계(S2)와, 상기 제 2단계(S2)에서 출력되는 하이신호는 상기 CPU(10)의 EA PIN에 입력됨으로써, 상기 CPU(10)에서는 상기 CPU(10)의 내부에 있는 내부 프로그램 메모리(20)를 선택하게 된다.When the output signal A is output from the output terminal Q of the first flip flop 409, the output signal A is input to the input terminal D of the second flip flop 411. When the reset signal RO output from the CPU 10, that is, the signal as shown in FIG. 3E is input to the clock terminal CLK, the output terminal Q of the second flip-flop 411 is input. ) In the second step (S2) and the high signal output in the second step (S2) as shown in Figure 3 (bar) is input to the EA PIN of the CPU 10, the CPU In (10), the internal program memory 20 inside the CPU 10 is selected.

이와 같이, 상기 CPU(10)에서 상기 내부 프로그램 메모리(20)를 선택하게 되면, 상기 외부 프로그램 메모리(30)를 데이터 메모리로하여 라이트함으로써, 새로운 프로그램 데이터로 업 데이트하는 제 3단계(S3)와, 상기 제 3단계(S3)에서 상기 외부 프로그램 메모리(30)에 저장되어 있는 프로그램을 새롭게 업데이트한 후, 어드레스(Address) FFXX번지에 0을 라이트(write)하고 그리고 리셋 신호를 인가하여 프로그램이 베리파이(verify)되었는지를 판단하는 제 4단계(S4)와, 상기 제 4단계(S4)에서 상기 외부 프로그램 메모리(30)에 저장되어 있는 프로그램이 정상적으로 업 데이트되었다고 판단하면, 상기 도 3의 (바)에 도시된 바와 같이, 상기 제 2 플립플롭(411)의 출력단자에서 출력되는 EA PIN의 신호가 로우로 출력되는 제 5단계(S5)와, 상기 제 5단계(S5)에서 출력되는 EA PIN의 로우 신호를 입력받아 상기 CPU(10)에서는 외부 메모리를 선택하게 됨으로써, 상기 외부 프로그램 메모리(30)에 저장되어 있는 프로그램이 다시 정상적인 메인 프로그램이 되어 프로그램을 변경하기 전의 정상적인 상태로 동작하게 되는 제 6단계(S6)와, 상기 제 4단계(S4)에서 프로그램이 정상적으로 변경되었는지 판단하여 정상적으로 변경되지 않은 경우에는 오류기능 표시 램프를 토글(Toggle)시키는 제 7단계(S7)로 이루어져 있다.As described above, when the internal program memory 20 is selected by the CPU 10, the external program memory 30 is written as a data memory, thereby updating with new program data. After updating the program stored in the external program memory 30 in the third step S3, the program writes 0 to the address FFXX and applies a reset signal. If it is determined that the program stored in the external program memory 30 is normally updated in the fourth step S4 for determining whether or not to verify, and the fourth step S4, the bar in FIG. As shown in FIG. 5, the fifth step S5 in which the signal of the EA PIN output from the output terminal of the second flip-flop 411 is output low, and the EA PIN output in the fifth step S5. Of The CPU 10 selects an external memory by receiving the right signal, so that the program stored in the external program memory 30 becomes a normal main program again to operate in a normal state before changing a program. Step S6 and the seventh step S7 of toggling the error function display lamp when the program is normally changed in the fourth step S4 and is not normally changed.

상기와 같이 구성된 본 발명의 프로그램 메모리를 업 데이트하기 위한 메모리 스위칭장치 및 제어방법은, 사용자가 외부 프로그램 메모리에 저장되어 있는 프로그램을 변경하거나 업 데이트 시킬 경우, 특히 상기 CPU에 여분의 출력 포트(port)가 없는 경우에, CPU의 EA PIN에 하이 신호를 인가하여 상기 CPU의 내부에 있는 내부 프로그램 메모리를 선택하도록 함으로써, 엔진 전자시스템을 개발하는 과정에서 프로그램을 수정하거나 업데이트하는 경우에 적은 비용으로 에물레이션(Emulation)을 할 수 있는 발명이다.The memory switching device and the control method for updating the program memory of the present invention configured as described above, in particular when the user changes or updates the program stored in the external program memory, in particular an extra output port (port) to the CPU In the case of no), a high signal is applied to the EA PIN of the CPU to select an internal program memory inside the CPU, thereby emulating at a low cost when the program is modified or updated in the process of developing an engine electronic system. It is an invention that can emulate.

Claims (3)

시스템 전체를 제어하는 CPU와, 상기 CPU 내부에 설치되어 프로그램이 저장되어 있는 내부 프로그램 메모리와, 상기 CPU의 외부에 연결되어 상기 CPU로부터 출력되는 제어신호를 입력받아서 그 내부에 저장되어 있는 프로그램을 리드(read)하는 외부 프로그램 메모리와, 상기 외부 프로그램 메모리에 저장되어 있는 프로그램을 업 데이트(Up date)하고자 하는 경우 업 데이트된 프로그램을 상기 외부 프로그램 메모리에 저장하도록 상기 CPU의 EA PIN에 하이신호를 출력하는 프로그램 메모리 제어부로 구성되어 있는 것을 특징으로 하는 프로그램 메모리를 업 데이트하기 위한 메모리 스위칭장치.A CPU that controls the entire system, an internal program memory installed inside the CPU and storing the program, and a control signal output from the CPU connected to the outside of the CPU to receive a program stored therein and outputs a high signal to the EA PIN of the CPU to store the updated program in the external program memory when an external program memory to read and a program stored in the external program memory are to be updated. A memory switching device for updating a program memory, characterized in that consisting of a program memory control unit. 제 1항에 있어서, 상기 프로그램 메모리제어부는 상기 CPU로부터 출력되는 어드레스 신호(A8-A11)를 입력받아 논리곱하여 입력되는 신호가 모두 하이일 경우에 로우로 출력하는 낸드 게이트(NAND gate)와, 상기 CPU로부터 출력되는 어드레스 신호(A12-A15)를 입력받아 논리곱하여 입력되는 신호가 모두 하이일 경우에 로우신호로 출력하는 낸드 게이트와, 상기 낸드 게이트 및 낸드 게이트에서 출력되는 신호를 입력받아 논리합하여 입력되는 신호중 어느 하나라도 하이이면 하이로 출력하는 오아 게이트(OR gate)와, 상기 오아 게이트로부터 출력되는 신호와 CPU로부터 출력되는 라이트신호(WR)를 입력받아 이들의 신호를 논리합하는 오아 게이트와, 상기 오아 게이트에서 출력되는 신호를 클럭단자(CLK)에서 입력받고 상기 CPU에서 출력되는 데이터를 데이터 입력단자(D)에 입력시킴으로써 출력단자(Q)에서 입력신호를 래치(Latch)한후 출력신호(A)를 출력하는 제 1 플립 플롭(Flip flop)과, 상기 CPU에서 출력되는 리셋(Reset)신호를 반전하여 출력하는 낫 게이트(NOT gate)와, 상기 낫 게이트에서 반전된 리셋 신호가 클럭단자에 입력되고, 상기 제 1 플립 플롭의 출력단자에서 출력되는 출력신호(A)를 입력단자(D)에서 입력받아, 출력단자(Q)에서 상기 CPU의 EA PIN으로 하이 신호를 출력함으로써, 상기 외부 프로그램 메모리에 저장되어 있는 프로그램을 업 데이트하는 제 2 플립플롭으로 구성되어 있는 것을 특징으로 하는 프로그램 메모리를 업 데이트하기 위한 메모리 스위칭장치.The NAND gate according to claim 1, wherein the program memory controller receives the address signals A8-A11 output from the CPU and logically multiplies them and outputs a low signal when all of the input signals are high; Receives and logically combines the NAND gate outputting as a low signal when the input signals A12 to A15 output from the CPU are logically multiplied and output as a low signal, and the signals output from the NAND gate and the NAND gate are input. An OR gate outputting high when any one of the signals is high, an OR gate receiving the signal output from the OR gate and the write signal WR output from the CPU, and ORing the signals together; The signal output from the OR gate is input from the clock terminal CLK, and the data output from the CPU is input to the data input terminal ( D) by latching the input signal at the output terminal Q and inverting the first flip flop for outputting the output signal A and the reset signal output from the CPU. A NOT gate to be output and a reset signal inverted by the sick gate are input to a clock terminal, and an output signal A output from an output terminal of the first flip flop is input to an input terminal D. And a second flip-flop for updating a program stored in the external program memory by outputting a high signal from the output terminal Q to the EA PIN of the CPU. Memory switching device. 외부 프로그램 메모리에 저장되어 있는 프로그램 내용을 변경하고자 하는 경우에는, 먼저 상기 외부 프로그램 메모리에 저장되어 있는 프로그램의 변경을 요청하는 제 1단계(S1)와, 상기 제 1 단계(S1)에서 프로그램 변경 요청에 따라서, 제 2 플립플롭의 출력단자(Q)에서는 CPU의 EA PIN 단자에 하이신호를 출력하는 제 2단계(S2)와, 상기 제 2단계(S2)에서 하이신호를 인가 받은 상기 CPU에서는 내부 프로그램 메모리를 선택함으로써, 새로운 프로그램 데이터로 업 데이트하는 제 3단계(S3)와, 상기 제 3단계(S3)에서 상기 외부 프로그램 메모리에 저장되어 있는 프로그램을 새롭게 업데이트한 후, 변경된 프로그램이 베리파이(verify)되었는지를 판단하는 제 4단계(S4)와, 상기 제 4단계(S4)에서 상기 외부 프로그램 메모리에 저장되어 있는 프로그램이 정상적으로 업 데이트되었다고 판단하면, 제 2 플립플롭의 출력단자에서 EA PIN에 로우신호를 출력되는 제 5단계(S5)와, 상기 제 5단계(S5)에서 출력되는 EA PIN의 로우 신호를 입력받아 상기 CPU(10)에서는 외부 메모리를 선택하게 됨으로써, 상기 외부 프로그램 메모리에 저장되어 있는 프로그램이 다시 정상적인 메인 프로그램이 되어 프로그램을 변경하기 전의 정상적인 상태로 동작하게 되는 제 6단계(S6)와, 상기 제 4단계(S4)에서 프로그램이 정상적으로 변경되었는지 판단하여 정상적으로 변경되지 않은 경우에는 오류기능 표시 램프를 토글(Toggle)시키는 제 7단계(S7)로 이루어져 있는 것을 특징으로 하는 프로그램 메모리를 업 데이트하기 위한 메모리 스위칭 제어방법.In the case where it is desired to change the program contents stored in the external program memory, a first step S1 for requesting a change of a program stored in the external program memory and a program change request in the first step S1 are performed. Accordingly, in the output terminal Q of the second flip-flop, the second step S2 of outputting a high signal to the EA PIN terminal of the CPU and the CPU receiving the high signal in the second step S2 are internal. By selecting the program memory, after updating the program stored in the external program memory in the third step (S3) and the third step (S3) to update the new program data, the changed program is changed to Verify ( The fourth step (S4) of determining whether to verify) and the program stored in the external program memory in the fourth step (S4) is normally updated. If it is determined that the drive signal has been turned on, a low signal is output from the output terminal of the second flip-flop to the EA PIN in step S5 and the low signal of the EA PIN output in the fifth step S5 is received. In step 10), by selecting an external memory, a program stored in the external program memory becomes a normal main program again to operate in a normal state before changing a program (S6) and the fourth step ( In step S4), if it is determined that the program is normally changed, and if it is not normally changed, the memory switching control method for updating the program memory, comprising the seventh step S7 of toggling the error function display lamp. .
KR1019980006230A 1998-02-26 1998-02-26 Memory switching device and control method for updating program memory KR19990071031A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019980006230A KR19990071031A (en) 1998-02-26 1998-02-26 Memory switching device and control method for updating program memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019980006230A KR19990071031A (en) 1998-02-26 1998-02-26 Memory switching device and control method for updating program memory

Publications (1)

Publication Number Publication Date
KR19990071031A true KR19990071031A (en) 1999-09-15

Family

ID=65893963

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019980006230A KR19990071031A (en) 1998-02-26 1998-02-26 Memory switching device and control method for updating program memory

Country Status (1)

Country Link
KR (1) KR19990071031A (en)

Similar Documents

Publication Publication Date Title
US4870562A (en) Microcomputer capable of accessing internal memory at a desired variable access time
JPH0612863A (en) Dual port dram
JPS63301339A (en) Computer device
US8914602B2 (en) Display controller having an embedded non-volatile memory divided into a program code block and a data block and method for updating parameters of the same
US6925522B2 (en) Device and method capable of changing codes of micro-controller
US5606715A (en) Flexible reset configuration of a data processing system and method therefor
JP2003044303A (en) Computer system
US20030200470A1 (en) Microcontroller
KR19990071031A (en) Memory switching device and control method for updating program memory
KR19980054349A (en) Optional automatic setting circuit
KR20000003404A (en) Micro controller for accessing an external memory
KR940002478B1 (en) Information processing apparatus
US5764950A (en) Data processing system having a function of changing bus width
US7281113B2 (en) Microcomputer with built-in electrically rewritable nonvolatile memory
US7020813B2 (en) On chip debugging method of microcontrollers
JP4083474B2 (en) MEMORY DEVICE CONTROL METHOD, PROGRAM THEREOF, AND RECORDING MEDIUM
KR20000074229A (en) Programe down loading apparatus in engine ECU of vehivle
JPH07306807A (en) Computer system device
EP0328422A2 (en) Microcomputer system
KR100578642B1 (en) Apparatus and method for updating flash epirom on a CPU without a bootstrap loader
KR19990056159A (en) Emulation Apparatus and Method with EEPROM External Microcomputer
KR100277458B1 (en) PD system control device and control method
JP3405239B2 (en) Initial value setting change device
JP3164690B2 (en) Address control device
JPH0883175A (en) Program controller

Legal Events

Date Code Title Description
WITN Application deemed withdrawn, e.g. because no request for examination was filed or no examination fee was paid