JP2002190059A - Controlling device for vending machine - Google Patents

Controlling device for vending machine

Info

Publication number
JP2002190059A
JP2002190059A JP2000386978A JP2000386978A JP2002190059A JP 2002190059 A JP2002190059 A JP 2002190059A JP 2000386978 A JP2000386978 A JP 2000386978A JP 2000386978 A JP2000386978 A JP 2000386978A JP 2002190059 A JP2002190059 A JP 2002190059A
Authority
JP
Japan
Prior art keywords
interrupt
program
control program
processing
address
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2000386978A
Other languages
Japanese (ja)
Inventor
Naohito Matsumoto
尚人 松本
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sanden Corp
Original Assignee
Sanden Corp
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 Sanden Corp filed Critical Sanden Corp
Priority to JP2000386978A priority Critical patent/JP2002190059A/en
Publication of JP2002190059A publication Critical patent/JP2002190059A/en
Pending legal-status Critical Current

Links

Landscapes

  • Control Of Vending Devices And Auxiliary Devices For Vending Devices (AREA)
  • Devices That Are Associated With Refrigeration Equipment (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a controlling device for a vending machine capable of easily and flexibly performing rewriting of a control program or addition of a function. SOLUTION: A second interrupt table 32 describing a shift command to interrupt programs 34a and 34b is arranged in a ROM 3, while in a first interrupt table 31, an address of the second interrupt table 32 is described as a shift destination address of interrupt processing. The control program 34 is rewritten when the second interrupt table 32 is rewritten. In this way, the control program can be flexibly designated and developed.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は自動販売機の制御装
置に関する。
The present invention relates to a vending machine control device.

【0002】[0002]

【従来の技術】この種の自動販売機の制御装置は、圧縮
機などの被制御装置を駆動するための制御プログラム記
憶したメモリと、該制御プログラムを演算処理するCP
Uとを備えている。メモリには、CPUにハードウェア
割込又はソフトウェア割込の要求があった際に、当該割
込に対して処理を行う割込処理プログラムの先頭アドレ
スを記憶した割込テーブルが備えられている。図5に従
来の制御装置におけるメモリのメモリマップを示す。図
5に示すように、メモリ100には、割込テーブル11
0と、制御プログラム120とが記憶されている。制御
プログラム120は、主プログラム121と、割込処理
を行う割込処理プログラム122とからなる。割込テー
ブル110に記憶されているアドレスの幾つかは、各割
込プログラム122の先頭アドレスとなっている。な
お、割込テーブル110の先頭領域に記憶されているア
ドレスは、主プログラム121の先頭アドレスを示して
いる。このアドレスを参照する割込は、一般的にリセッ
ト割込と呼ばれており、制御装置がリセットされると該
アドレスに演算装置の処理が移行される。
2. Description of the Related Art A control device for a vending machine of this kind includes a memory storing a control program for driving a controlled device such as a compressor, and a CP for performing arithmetic processing on the control program.
U. The memory is provided with an interrupt table that stores the start address of an interrupt processing program that processes the interrupt when a hardware or software interrupt is requested to the CPU. FIG. 5 shows a memory map of a memory in the conventional control device. As shown in FIG. 5, the memory 100 stores an interrupt table 11
0 and a control program 120 are stored. The control program 120 includes a main program 121 and an interrupt processing program 122 for performing an interrupt processing. Some of the addresses stored in the interrupt table 110 are the head addresses of the respective interrupt programs 122. Note that the address stored in the head area of the interrupt table 110 indicates the head address of the main program 121. An interrupt referring to this address is generally called a reset interrupt, and when the control device is reset, the processing of the arithmetic unit is shifted to the address.

【0003】[0003]

【発明が解決しようとする課題】ところで、この種の自
動販売機は市場に設置された後などに、機能追加や仕様
変更などのために制御プログラム120を書き換える場
合がある。このため、メモリ100として、電気的に書
換可能な不揮発性記憶装置であるEEPROMが用いら
れる。このメモリ100では、記憶領域が幾つかのブロ
ックに分割され、ブロック単位で記憶内容の消去及び書
き込みが可能となっている。
Incidentally, there are cases where this kind of vending machine rewrites the control program 120 for adding functions or changing specifications after it is installed in the market. For this reason, an EEPROM that is an electrically rewritable nonvolatile storage device is used as the memory 100. In the memory 100, the storage area is divided into several blocks, and storage contents can be erased and written in block units.

【0004】しかしながら、メモリ100の書き換えは
動作は必ずしも常に成功するわけではなく、書き換えに
失敗する場合がある。特に、既に記憶されている割込テ
ーブル110を上書きするようにメモリ100を書き換
えている途中でその書き換えに失敗すると制御装置が暴
走する場合がある。このため、割込テーブル110の書
き換えは極力行わないことが望ましい。しかし、割込テ
ーブル110の書き換えを行わずに制御プログラム12
0のみを書き換えようとしても、割込処理プログラム1
22の配置が固定されてしまうので、書き換えの柔軟性
に欠けるという問題がある。
[0004] However, rewriting of the memory 100 does not always succeed, and rewriting may fail. In particular, if the rewriting fails while rewriting the memory 100 so as to overwrite the already stored interrupt table 110, the control device may run away. For this reason, it is desirable that the rewriting of the interrupt table 110 is not performed as much as possible. However, without rewriting the interrupt table 110, the control program 12
If you try to rewrite only 0, the interrupt processing program 1
Since the arrangement of the 22 is fixed, there is a problem that the flexibility of rewriting is lacking.

【0005】一方、制御プログラム120とは別に、試
験などのためにメモリ100に他のプログラムを記憶さ
せ、これを実行する場合がある。しかしながら、前述の
ように割込テーブル110の書き換えは困難であるた
め、新たなプログラムは割込処理を用いないプログラム
を作成する必要があり、やはり柔軟性に欠けるという問
題がある。
On the other hand, there is a case where another program is stored in the memory 100 for a test or the like separately from the control program 120 and is executed. However, since it is difficult to rewrite the interrupt table 110 as described above, it is necessary to create a new program that does not use the interrupt processing, and there is still a problem of lack of flexibility.

【0006】本発明は、上記事情に鑑みてなされたもの
であり、その目的とするところは、制御プログラムの書
き換えや機能追加などを容易且つ柔軟的に行うことがで
きる自動販売機の制御装置を提供することにある。
The present invention has been made in view of the above circumstances, and an object of the present invention is to provide a vending machine control device that can easily and flexibly rewrite control programs and add functions. To provide.

【0007】[0007]

【課題を解決するための手段】上記目的を達成するため
に、請求項1では、圧縮機などの被制御装置を駆動する
ための制御プログラムと割込要求に対する演算処理の移
行先アドレスを含む第1の割込テーブルとを記憶した記
憶装置と、該制御プログラムを実行するとともに割込要
求があった際には第1の割込テーブルに基づき割込要求
に対応する移行先アドレスに処理を移行させる演算装置
とを備えた自動販売機の制御装置において、前記記憶装
置は、前記制御プログラムに含まれる割込処理プログラ
ムが記憶されているアドレスへ処理を移行させる命令が
記憶されている第2の割込テーブルを備えるとともに、
前記第1の割込テーブルの移行先アドレスは、該第2の
割込テーブルのアドレスを含むことを特徴とするものを
提案する。
In order to achieve the above object, according to the present invention, a control program for driving a controlled device such as a compressor and an address including a transfer destination address of a calculation process for an interrupt request are provided. A storage device storing the first interrupt table and, when the control program is executed and an interrupt request is issued, the process is shifted to a destination address corresponding to the interrupt request based on the first interrupt table A control device for the vending machine having an arithmetic device for causing the storage device to store an instruction to shift processing to an address at which an interrupt processing program included in the control program is stored. With an interrupt table,
It is proposed that the transfer destination address of the first interrupt table includes the address of the second interrupt table.

【0008】本発明によれば、割込要求が発生すると、
演算装置は第1の割込テーブルを参照して該割込要求に
対応した移行先アドレスに処理を移す。ここで、該移行
先アドレスは第2の割込テーブルが記憶されている領域
となっており、該第2の割込テーブルには割込処理プロ
グラムへ移行する命令が記述されているので、演算装置
の処理は該割込処理プログラムに移行される。したがっ
て、割込処理プログラムの格納アドレスを変更する場合
には、第1の割込テーブルを書き換えることなく、第2
の割込テーブルのみを書き換えればよい。これにより、
第1の割込テーブルの記憶領域を書き換えることなく、
且つ、割込処理プログラムの配置を気にすることなく制
御プログラムを書き換えることができるので、制御プロ
グラムの設計を柔軟に行うことができる。また、新たに
割込処理プログラムを記憶させるとともに、第2の割込
テーブルを該割込処理プログラムのアドレスで書き換え
ることにより、容易に機能追加や一時的な処理を行うこ
とができる。このように、本発明によれば、制御プログ
ラムの書き換えや機能追加などを容易且つ柔軟的に行う
ことができる。
According to the present invention, when an interrupt request occurs,
The arithmetic unit refers to the first interrupt table and shifts the processing to the destination address corresponding to the interrupt request. Here, the transfer destination address is an area in which the second interrupt table is stored. Since the second interrupt table describes an instruction to shift to the interrupt processing program, The processing of the device is transferred to the interrupt processing program. Therefore, when changing the storage address of the interrupt processing program, the second interrupt table can be changed without rewriting the first interrupt table.
Need only be rewritten. This allows
Without rewriting the storage area of the first interrupt table,
In addition, since the control program can be rewritten without worrying about the location of the interrupt processing program, the control program can be designed flexibly. Further, by storing a new interrupt processing program and rewriting the second interrupt table with the address of the interrupt processing program, it is possible to easily add functions and perform temporary processing. As described above, according to the present invention, it is possible to easily and flexibly rewrite the control program and add functions.

【0009】また、請求項2では、請求項1記載の自動
販売機の制御装置において、前記制御プログラムは、前
記第2の割込テーブルに含まれる移行先アドレスを自己
に含まれる割込処理プログラムが記憶されているアドレ
スに書き換える割込テーブル書換プログラムを含むこと
を特徴とするものを提案する。
According to a second aspect of the present invention, in the control device for a vending machine according to the first aspect, the control program includes an interrupt processing program that includes a destination address included in the second interrupt table. Is included which includes an interrupt table rewriting program that rewrites the address to the stored address.

【0010】本発明によれば、制御プログラムの初期動
作時や書き換え直後などに割込テーブル書換プログラム
を実行することにより、制御プログラムの動作時におけ
る割込処理を自己の割込処理プログラムにより行うこと
ができるので、制御プログラムの動作を確実にすること
ができる。
According to the present invention, by executing the interrupt table rewriting program at the time of initial operation of the control program or immediately after rewriting, the interrupt processing at the time of operation of the control program is performed by its own interrupt processing program. Therefore, the operation of the control program can be ensured.

【0011】本発明の、好適な態様の一例として、請求
項3では、請求項2記載の自動販売機の制御装置におい
て、前記割込テーブル書換プログラムは、前記制御プロ
グラムの初期処理時に実行されることを特徴とするもの
を提案する。
According to a third aspect of the present invention, in the control device for a vending machine according to the second aspect, the interrupt table rewriting program is executed at an initial processing of the control program. We propose one that is characterized.

【0012】[0012]

【発明の実施の形態】本発明の一実施の形態に係る自動
販売機の制御装置について図面を参照して説明する。図
1は自動販売機の制御装置の構成図、図2は制御装置に
おけるメモリマップである。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS A control device for a vending machine according to an embodiment of the present invention will be described with reference to the drawings. FIG. 1 is a configuration diagram of a control device of a vending machine, and FIG. 2 is a memory map of the control device.

【0013】図1に示すように、制御装置1は、主演算
装置であるCPU2と、電気的に書換可能な不揮発性メ
モリであるROM3と、揮発性メモリであるRAM4
と、各種機器とのインタフェイス部である入出力部5
と、これらを結ぶバス6とを備えている。本実施の形態
では、ROM3として、ブロック単位で記憶内容を消去
及び書き込みが可能なフラッシュメモリを用いた。ま
た、バス6には、メモリカード11とのインタフェイス
であるカードインタフェイス7が接続されている。カー
ドインタフェイス7にはメモリカード11が脱着可能で
ある。メモリカード11は、カードインタフェイス7に
装着するとCPU2に対してそのメモリ空間の一部をな
す。入出力部5には、圧縮機21やコントローラ22な
ど制御装置1との間で各種信号のやりとりを行う機器が
接続されている。なお、図1では、圧縮機21及びコン
トローラ22以外の機器については図示を省略した。
As shown in FIG. 1, a control device 1 includes a CPU 2 as a main processing unit, a ROM 3 as an electrically rewritable nonvolatile memory, and a RAM 4 as a volatile memory.
And an input / output unit 5 which is an interface unit with various devices
And a bus 6 connecting these. In the present embodiment, as the ROM 3, a flash memory capable of erasing and writing stored contents in block units is used. Further, a card interface 7 which is an interface with the memory card 11 is connected to the bus 6. A memory card 11 is detachable from the card interface 7. When the memory card 11 is mounted on the card interface 7, the memory card 11 forms a part of the memory space for the CPU 2. The input / output unit 5 is connected to devices such as the compressor 21 and the controller 22 that exchange various signals with the control device 1. In FIG. 1, devices other than the compressor 21 and the controller 22 are not shown.

【0014】図2のメモリマップが示すように、ROM
3には、第1の割込テーブル31と、第2の割込テーブ
ル32と、管理プログラム33と、制御プログラム34
とが記憶されている。
As shown in the memory map of FIG.
3 includes a first interrupt table 31, a second interrupt table 32, a management program 33, and a control program 34.
Are stored.

【0015】第1の割込テーブル31には、CPU2に
対してハードウェア割込又はソフトウェア割込の要求が
あった際に参照される当該割込に対する処理の移行先の
アドレスが複数格納されている。移行先アドレスの一つ
はCPU2の初期時に生じるリセット割込に対する処理
の移行先アドレスであり、そのアドレスは管理プログラ
ム33の実行先頭アドレスである。また、第1の割込テ
ーブル31の移行先アドレスの幾つかは第2の割込テー
ブル32のアドレスを示している。
The first interrupt table 31 stores a plurality of addresses to which processing for the interrupt is referred to when a hardware or software interrupt is requested to the CPU 2. I have. One of the transfer destination addresses is a transfer destination address for processing for a reset interrupt generated at the time of initializing the CPU 2, and the address is an execution start address of the management program 33. Some of the transfer destination addresses of the first interrupt table 31 indicate the addresses of the second interrupt table 32.

【0016】第2の割込テーブル32は、割込要求に応
じて第1の割込テーブル31を参照して移行されたCP
U2の処理を、さらに該割込要求に対応する後述の割込
プログラム34b,34cに移行させるためのプログラ
ムが記述されている。具体的には、割込プログラム34
b,34cへの移行先アドレスを含むジャンプ命令が記
述されている。なお、割込要求に対しては処理を行わな
い場合には割込復帰命令が記述されている。これは、現
在の制御プログラム34では当該割込に対する処理は行
わないが将来的に当該割込に対して処理を行いたい場合
を考慮した予備的なものである。
The second interrupt table 32 stores the CP transferred by referring to the first interrupt table 31 in response to the interrupt request.
A program for shifting the processing of U2 to interrupt programs 34b and 34c described below corresponding to the interrupt request is further described. Specifically, the interrupt program 34
A jump instruction including a destination address to b and 34c is described. If no processing is performed for the interrupt request, an interrupt return instruction is described. This is a preliminary program considering the case where the current control program 34 does not perform the process for the interrupt but wants to process the interrupt in the future.

【0017】管理プログラム33は、制御プログラム3
4で行う処理以外の処理を行うためのプログラムであ
り、主として制御プログラム34の書き換えなどを制御
する。具体的には、管理プログラム33は、制御装置1
の初期動作時などリセット割込要求があった際に制御プ
ログラム34が存在するかどうかをチェックする機能、
該チェックの結果制御プログラム34が存在しない場合
やコントローラ22から制御プログラム34の書き換え
指示があった場合にメモリカード11から制御プログラ
ムを読み出して格納する機能などを有する。
The management program 33 includes a control program 3
This is a program for performing processing other than the processing performed in step 4, and mainly controls rewriting of the control program 34 and the like. Specifically, the management program 33 stores the control device 1
A function to check whether the control program 34 exists when a reset interrupt request is issued, such as during an initial operation of
If the control program 34 does not exist as a result of the check, or if the controller 22 instructs the control program 34 to be rewritten, the controller 22 has a function of reading the control program from the memory card 11 and storing it.

【0018】制御プログラム34は、自動販売機の各機
器を制御するためのプログラムであり、主プログラム3
4aと割込プログラム34b,34cとを有している。
割込プログラム34b,34cはCPU2に対してハー
ドウェア割込又はソフトウェア割込の要求があった際に
処理されるプログラムであり、各プログラムは割込復帰
命令で終わっている。また、主プログラム34aは、第
2の割込テーブル32を書き換える割込テーブル書換プ
ログラム34dを含んでいる。この割込テーブル書換プ
ログラム34dは、第2の割込テーブル32に記述され
ている割込プログラムへのジャンプ命令を、割込プログ
ラム34b、34cの実行先頭アドレスへのジャンプ命
令となるように書き換えるプログラムであり、主プログ
ラム34aの中の初期化プログラムとして動作する。
The control program 34 is a program for controlling each device of the vending machine.
4a and interrupt programs 34b and 34c.
The interrupt programs 34b and 34c are programs that are processed when a hardware interrupt or software interrupt is requested to the CPU 2, and each program ends with an interrupt return instruction. The main program 34a includes an interrupt table rewriting program 34d for rewriting the second interrupt table 32. The interrupt table rewriting program 34d rewrites a jump instruction to the interrupt program described in the second interrupt table 32 so as to be a jump instruction to the execution start address of the interrupt programs 34b and 34c. And operates as an initialization program in the main program 34a.

【0019】このような制御装置1では、通常時には制
御プログラム34が動作している。該制御プログラム3
4の主プログラム34aの動作時には、CPU2に対し
てハードウェア割込又はソフトウェア割込の要求がある
と、その割込要求に対応する第1の割込テーブル31に
記述されている移行先アドレスに処理が移行する。該移
行先が第2の割込テーブル32内にある場合には、さら
に該第2の割込テーブル32に記述されているジャンプ
命令により、制御プログラム34に含まれる割込プログ
ラム34b,34cに処理が移行される。割込プログラ
ム34b,34cにおける処理が終了すると割込から復
帰して主プログラム34aの処理に移行する。
In such a control device 1, a control program 34 is normally operated. The control program 3
In the operation of the main program 34a, when a hardware interrupt or software interrupt request is issued to the CPU 2, the transfer destination address described in the first interrupt table 31 corresponding to the interrupt request is sent to the transfer destination address. Processing shifts. If the transfer destination is in the second interrupt table 32, the jump instruction described in the second interrupt table 32 is used to further process the interrupt programs 34b and 34c included in the control program 34. Is migrated. When the processes in the interrupt programs 34b and 34c are completed, the process returns from the interrupt and shifts to the process of the main program 34a.

【0020】次に、この制御装置1の制御プログラム3
4を書き換える場合について図3のフローチャートを参
照して説明する。ここでは、メモリカード11に新たな
制御プログラム11aを予め格納しておき、この制御プ
ログラム11aで現在ROM3に記憶されている制御プ
ログラム34を書き換える場合について説明する。な
お、この新たな制御プログラム11aは、前記制御プロ
グラム34と同様に、割込テーブル書換プログラムを含
む主プログラム及び割込プログラムを含んでいる。
Next, the control program 3 of the controller 1
4 will be described with reference to the flowchart of FIG. Here, a case will be described in which a new control program 11a is stored in the memory card 11 in advance, and the control program 34 currently stored in the ROM 3 is rewritten by the control program 11a. The new control program 11a includes a main program including an interrupt table rewriting program and an interrupt program, similarly to the control program 34.

【0021】まず、メモリカード11をカードインタフ
ェイス7に挿入すると、ハードウェア割込が発生する。
CPU2は、この割込要求に対して第1の割込テーブル
31を参照して処理を管理プログラム33に移行させる
(ステップS1)。
First, when the memory card 11 is inserted into the card interface 7, a hardware interrupt occurs.
The CPU 2 refers to the first interrupt table 31 in response to this interrupt request and shifts the processing to the management program 33 (step S1).

【0022】次に、管理プログラム33は、制御プログ
ラム34が記憶されているROM3のブロックを消去
し、その後にメモリカード11から新たな制御プログラ
ム11aを読み込み、制御プログラム34が記憶されて
いた領域に新たな制御プログラム11aを書き込む(ス
テップS2)。これにより、制御プログラム34が新た
なものに書き換えられる。そして、管理プログラム33
は処理を書き換えられた制御プログラム34に移す。
Next, the management program 33 erases the block of the ROM 3 in which the control program 34 is stored, and then reads a new control program 11a from the memory card 11 and stores it in the area where the control program 34 is stored. The new control program 11a is written (step S2). As a result, the control program 34 is rewritten with a new one. And the management program 33
Transfers the process to the rewritten control program 34.

【0023】次に、書き換えられた制御プログラム34
は、初期処理として割込テーブル書換プログラム34d
を実行することにより、第2の割込テーブル32を書き
換える(ステップS3)。以降は、制御プログラム34
の主プログラム34aを実行することにより、自動販売
機の制御が開始される。
Next, the rewritten control program 34
Is an interrupt table rewriting program 34d
To rewrite the second interrupt table 32 (step S3). Hereinafter, the control program 34
By executing the main program 34a, the control of the vending machine is started.

【0024】このように、本実施の形態に係る制御装置
1では、制御プログラム34を書き換えるとともに新た
な制御プログラム34の初期動作時に第2の割込テーブ
ル32を書き換えるので、書き換え前の制御プログラム
34における割込プログラムのアドレスと、新たな制御
プログラム34は割込プログラムのアドレスが異なるも
のであってもよい。つまり、新たな制御プログラム34
の設計・開発時には、主プログラムや割込プログラムの
サイズや配置位置などを気にすることなく柔軟性のある
設計・開発が可能となる。
As described above, in the control device 1 according to the present embodiment, the control program 34 is rewritten and the second interrupt table 32 is rewritten during the initial operation of the new control program 34. And the new control program 34 may have a different address of the interrupt program. That is, the new control program 34
When designing / developing, flexible design / development becomes possible without worrying about the size and arrangement of the main program and the interrupt program.

【0025】また、制御プログラム34を書き換える際
には、第1の割込テーブル31の書き換えを行う必要が
ないので、書き換えに失敗してもCPU2の暴走を防止
することができる。すなわち、書き換えに失敗した場合
であっても、制御装置1をリセットすれば、リセット割
込が発生して管理プログラム33が実行され、この管理
プログラム33により所定の動作を行うことができる。
When the control program 34 is rewritten, it is not necessary to rewrite the first interrupt table 31, so that runaway of the CPU 2 can be prevented even if the rewriting fails. That is, even if the rewriting has failed, if the control device 1 is reset, a reset interrupt occurs and the management program 33 is executed, and a predetermined operation can be performed by the management program 33.

【0026】次に、制御装置1において一時的なプログ
ラムを実行する際の動作について図4のフローチャート
を参照して説明する。ここで、一時的なプログラムの実
行とは、例えば改良を加えた割込プログラムを実際の制
御装置において動作を確認する場合などが挙げられる。
本実施の形態では、割込プログラム34bに改良を加え
た他の割込プログラム11bをメモリカード11に記憶
させ、この割込プログラム11bの動作を確認する場合
について説明する。
Next, the operation when the control device 1 executes the temporary program will be described with reference to the flowchart of FIG. Here, the execution of the temporary program includes, for example, a case where the operation of the improved interrupt program is confirmed in an actual control device.
In the present embodiment, a case will be described in which another interrupt program 11b obtained by improving the interrupt program 34b is stored in the memory card 11, and the operation of the interrupt program 11b is confirmed.

【0027】まず、メモリカード11をカードインタフ
ェイス7に挿入すると、ハードウェア割込が発生する。
CPU2は、この割込要求に対して第1の割込テーブル
31を参照して処理を管理プログラム33に移行させる
(ステップS11)。
First, when the memory card 11 is inserted into the card interface 7, a hardware interrupt occurs.
The CPU 2 transfers the processing to the management program 33 with reference to the first interrupt table 31 in response to the interrupt request (step S11).

【0028】次に、管理プログラム33は、メモリカー
ド11から他の割込プログラム11bを読み込み、RO
M3の空き領域に書き込む(ステップS12)。
Next, the management program 33 reads another interrupt program 11b from the memory card 11 and
The data is written in the empty area of M3 (step S12).

【0029】次いで、この他の割込プログラム11bに
対応する割込プログラム34bに処理を移行させる第2
の割込テーブル32を一旦空き領域に待避させた後に、
該第2の割込テーブル32の割込プログラム34bへの
ジャンプ命令を、ROM3に記憶した他の割込プログラ
ム11bの実行先頭アドレスへのジャンプ命令に書き換
える(ステップS13)。
Next, a second process for shifting the processing to the interrupt program 34b corresponding to the other interrupt program 11b
After having evacuated the interrupt table 32 once to an empty area,
The jump instruction to the interrupt program 34b in the second interrupt table 32 is rewritten to a jump instruction to the execution start address of another interrupt program 11b stored in the ROM 3 (step S13).

【0030】そして、管理プログラム33は処理を制御
プログラム34に移して試験を開始する(ステップS1
4)。ここで、第2の割込テーブル32が書き換えられ
ているので、制御プログラム34の実行時には、割込プ
ログラム34bに対する割込要求があると該割込プログ
ラム34bではなく他の割込プログラム11bが実行さ
れる。すなわち、ROM3に記憶されている制御プログ
ラム34を改変することなく、その一部の割込プログラ
ム34bについて他の割込プログラム11bに置き換え
た処理を行うことができる。
Then, the management program 33 shifts the processing to the control program 34 and starts the test (step S1).
4). Here, since the second interrupt table 32 is rewritten, when the control program 34 is executed, if there is an interrupt request for the interrupt program 34b, the other interrupt program 11b is executed instead of the interrupt program 34b. Is done. That is, it is possible to perform a process in which a part of the interrupt program 34b is replaced with another interrupt program 11b without modifying the control program 34 stored in the ROM 3.

【0031】最後に、他の割込プログラム11bの試験
が終了したらコントローラ22を用いて割込を発生させ
て処理を管理プログラム33に移し、該管理プログラム
33により待避させておいた第2の割込テーブル32を
復帰させる。
Finally, when the test of the other interrupt program 11b is completed, an interrupt is generated by using the controller 22, the processing is transferred to the management program 33, and the second interrupt stored by the management program 33 is saved. The loading table 32 is returned.

【0032】このように、本実施の形態に係る制御装置
1では、制御プログラム34に含まれる割込プログラム
34b,34cのアドレスへのジャンプ命令が第2の割
込テーブル32に記述されているので、このアドレスを
書き換えることにより、割込プログラム34b,34c
に替えて他の割込プログラム11bを容易に実行させる
ことができる。これにより、改良した割込プログラムの
試験や、割込プログラムに新たな機能を追加させること
などを容易且つ確実に行うことができる。
As described above, in the control device 1 according to the present embodiment, the jump instruction to the address of the interrupt programs 34b and 34c included in the control program 34 is described in the second interrupt table 32. By rewriting this address, the interrupt programs 34b and 34c
Instead of this, another interrupt program 11b can be easily executed. As a result, it is possible to easily and reliably perform a test of the improved interrupt program, add a new function to the interrupt program, and the like.

【0033】このように、本実施の形態に係る自動販売
機の制御装置によれば、第1の割込テーブル31の記憶
領域を書き換えることなく、且つ、割込プログラム34
b、34cの配置を気にすることなく制御プログラム3
4を書き換えることができるので、制御プログラム34
の設計を柔軟に行うことができる。また、新たに割込プ
ログラム34b、34cを記憶させるとともに、第2の
割込テーブル32を該割込プログラム34b,34cの
アドレスで書き換えることにより、容易に機能追加や一
時的な処理を行うことができる。つまり、制御プログラ
ム34の書き換えや機能追加などを容易且つ柔軟的に行
うことができる。
As described above, according to the control device for the vending machine according to the present embodiment, the interruption program 34 can be used without rewriting the storage area of the first interruption table 31.
control program 3 without worrying about the arrangement of b and 34c
4 can be rewritten, the control program 34
Can be designed flexibly. Further, by newly storing the interrupt programs 34b and 34c and rewriting the second interrupt table 32 with the addresses of the interrupt programs 34b and 34c, it is possible to easily add functions and perform temporary processing. it can. That is, it is possible to easily and flexibly rewrite the control program 34 and add functions.

【0034】以上本発明の一実施の形態について説明し
たが、本発明はこれに限定されるものではない。例え
ば、本実施の形態では、他の割込プログラム11bをメ
モリカード11からROM3の空き領域に書き込んでい
たが、メモリカード11に配置したまま第2の割込テー
ブル32のジャンプ命令を該メモリカード11内の他の
割込プログラム11bの実行先頭アドレスへのジャンプ
命令に書き換えるようにしてもよい。
Although the embodiment of the present invention has been described above, the present invention is not limited to this. For example, in the present embodiment, the other interrupt program 11b is written from the memory card 11 to the free area of the ROM 3, but the jump instruction of the second interrupt table 32 is sent to the memory card 11 while the memory card 11 remains in the memory card 11. 11 may be rewritten as a jump instruction to the execution start address of another interrupt program 11b.

【0035】また、本実施の形態では、新たな制御プロ
グラムや他の割込プログラムを導入する手段として、着
脱自在の記憶媒体でありCPUに対してメモリ空間の一
部をなすメモリカードを用いたが、本発明はこれに限定
されるものではない。すなわち、メモリ空間の一部を形
成せず所定のインタフェイスを介してアクセス可能な記
憶媒体であってもよい。また、記憶媒体としては、フロ
ッピー(登録商標)ディスクなど他の媒体であってもよ
い。さらに、通信インタフェイスを設けることにより、
パソコンなどの外部機器から各種プログラムを導入する
ようにしてもよい。なお、この場合には、自動販売機の
制御装置と外部機器とはネットワークを介して接続する
ことにより、管理センタなどの遠隔地からの操作が可能
となる。
In this embodiment, a memory card which is a detachable storage medium and forms a part of a memory space for the CPU is used as a means for introducing a new control program or another interrupt program. However, the present invention is not limited to this. That is, a storage medium that does not form a part of the memory space and can be accessed via a predetermined interface may be used. Further, the storage medium may be another medium such as a floppy (registered trademark) disk. Furthermore, by providing a communication interface,
Various programs may be introduced from an external device such as a personal computer. In this case, by connecting the control device of the vending machine and the external device via a network, it is possible to operate from a remote place such as a management center.

【0036】[0036]

【発明の効果】以上詳述したように、請求項1の発明に
よれば、割込処理プログラムの格納アドレスを変更する
場合には、第1の割込テーブルを書き換えることなく、
第2の割込テーブルのみを書き換えればよい。これによ
り、第1の割込テーブルの記憶領域を書き換えることな
く、且つ、割込処理プログラムの配置を気にすることな
く制御プログラムを書き換えることができるので、制御
プログラムの設計を柔軟に行うことができる。また、新
たに割込処理プログラムを記憶させるとともに、第2の
割込テーブルを該割込処理プログラムのアドレスで書き
換えることにより、容易に機能追加や一時的な処理を行
うことができる。このように、本発明によれば、制御プ
ログラムの書き換えや機能追加などを容易且つ柔軟的に
行うことができる。
As described above in detail, according to the first aspect of the present invention, when the storage address of the interrupt processing program is changed, the first interrupt table can be rewritten without changing the first interrupt table.
Only the second interrupt table needs to be rewritten. Thus, the control program can be rewritten without rewriting the storage area of the first interrupt table and without worrying about the location of the interrupt processing program, so that the control program can be designed flexibly. it can. In addition, by storing a new interrupt processing program and rewriting the second interrupt table with the address of the interrupt processing program, it is possible to easily add functions and perform temporary processing. As described above, according to the present invention, it is possible to easily and flexibly rewrite the control program and add functions.

【0037】また、請求項2の発明によれば、制御プロ
グラムの初期動作時や書き換え直後などに割込テーブル
書換プログラムを実行することにより、制御プログラム
の動作時における割込処理を自己の割込処理プログラム
により行うことができるので、制御プログラムの動作を
確実にすることができる。
According to the second aspect of the present invention, the interrupt processing during the operation of the control program can be performed by executing the interrupt table rewriting program at the time of the initial operation of the control program or immediately after rewriting. Since the processing can be performed by the processing program, the operation of the control program can be ensured.

【図面の簡単な説明】[Brief description of the drawings]

【図1】自動販売機の制御装置の構成図FIG. 1 is a configuration diagram of a control device of a vending machine.

【図2】制御装置におけるメモリマップFIG. 2 is a memory map in the control device.

【図3】制御プログラムの書き換え時の動作を説明する
フローチャート
FIG. 3 is a flowchart illustrating an operation at the time of rewriting a control program.

【図4】一時的なプログラムを実行する際の動作を説明
するフローチャート
FIG. 4 is a flowchart illustrating an operation when a temporary program is executed.

【図5】従来の制御装置におけるメモリマップFIG. 5 is a memory map in a conventional control device.

【符号の説明】[Explanation of symbols]

1…制御装置、2…CPU、3…ROM、4…RAM、
5…入出力部、6…バス、7…カードインタフェイス、
11…メモリカード、31…第1の割込テーブル、32
…第2の割込テーブル、33…管理プログラム、34…
制御プログラム、34a…主プログラム、34b,34
c…割込プログラム、34d…割込テーブル書換プログ
ラム
DESCRIPTION OF SYMBOLS 1 ... Control device, 2 ... CPU, 3 ... ROM, 4 ... RAM,
5 input / output unit, 6 bus, 7 card interface,
11: memory card, 31: first interrupt table, 32
... second interrupt table, 33 ... management program, 34 ...
Control program, 34a... Main program, 34b, 34
c: Interrupt program, 34d: Interrupt table rewriting program

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 圧縮機などの被制御装置を駆動するため
の制御プログラムと割込要求に対する演算処理の移行先
アドレスを含む第1の割込テーブルとを記憶した記憶装
置と、該制御プログラムを実行するとともに割込要求が
あった際には第1の割込テーブルに基づき割込要求に対
応する移行先アドレスに処理を移行させる演算装置とを
備えた自動販売機の制御装置において、 前記記憶装置は、前記制御プログラムに含まれる割込処
理プログラムが記憶されているアドレスへ処理を移行さ
せる命令が記憶されている第2の割込テーブルを備える
とともに、 前記第1の割込テーブルの移行先アドレスは、該第2の
割込テーブルのアドレスを含むことを特徴とする自動販
売機の制御装置。
1. A storage device storing a control program for driving a controlled device such as a compressor and a first interrupt table including a transfer destination address of an arithmetic process for an interrupt request, and a control program for storing the control program. A vending machine control device comprising: an arithmetic unit that executes the process and, when an interrupt request is issued, shifts processing to a destination address corresponding to the interrupt request based on the first interrupt table. The apparatus includes a second interrupt table storing an instruction for shifting processing to an address at which an interrupt processing program included in the control program is stored, and a transfer destination of the first interrupt table. The control device for a vending machine, wherein the address includes an address of the second interrupt table.
【請求項2】 前記制御プログラムは、前記第2の割込
テーブルに含まれる移行先アドレスを自己に含まれる割
込処理プログラムが記憶されているアドレスに書き換え
る割込テーブル書換プログラムを含むことを特徴とする
請求項1記載の自動販売機の制御装置。
2. The control program according to claim 1, further comprising an interrupt table rewriting program for rewriting a transfer destination address included in said second interrupt table to an address storing an interrupt processing program included therein. The control device for a vending machine according to claim 1, wherein
【請求項3】 前記割込テーブル書換プログラムは、前
記制御プログラムの初期処理時に実行されることを特徴
とする請求項2記載の自動販売機の制御装置。
3. The vending machine control apparatus according to claim 2, wherein said interrupt table rewriting program is executed at an initial processing of said control program.
JP2000386978A 2000-12-20 2000-12-20 Controlling device for vending machine Pending JP2002190059A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000386978A JP2002190059A (en) 2000-12-20 2000-12-20 Controlling device for vending machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000386978A JP2002190059A (en) 2000-12-20 2000-12-20 Controlling device for vending machine

Publications (1)

Publication Number Publication Date
JP2002190059A true JP2002190059A (en) 2002-07-05

Family

ID=18853994

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000386978A Pending JP2002190059A (en) 2000-12-20 2000-12-20 Controlling device for vending machine

Country Status (1)

Country Link
JP (1) JP2002190059A (en)

Similar Documents

Publication Publication Date Title
JP3838840B2 (en) Computer
JP4810172B2 (en) Control device, version upgrade method, and program
JP2001209543A (en) Program rewriting method for flash microcomputer
JP6543122B2 (en) INFORMATION PROCESSING APPARATUS, METHOD OF INITIALIZING NONVOLATILE STORAGE DEVICE BY THE INFORMATION PROCESSING APPARATUS, AND PROGRAM
JP2003345730A (en) Interface device, method for updating firmware in interface device and program therefor
JP3830867B2 (en) Single-chip microcomputer and its boot area switching method
JP3805195B2 (en) Program rewriting apparatus and program rewriting method
JP2002190059A (en) Controlling device for vending machine
JPH09146774A (en) Personal computer system
JPH11282690A (en) Method for writing control program, information processor and information processing system
JP5158883B2 (en) Firmware update method and firmware update apparatus
JPH1063497A (en) Program updating method
JP2001344156A (en) Device with flash memory and data rewriting method
JP7491765B2 (en) Firmware update system and firmware update method
JP4408504B2 (en) GAME DEVICE AND ALLOCATION METHOD
JP2002073360A (en) Start information rewrite device
JP2024005775A (en) Electronic control device, reprogram execution method, and reprogram execution program
JPH08101794A (en) Rewriting system for firmware program
KR19990077915A (en) Computer system having a distinctive operating system
JPH1050086A (en) Microcomputer having eeprom and its rewriting method
JP2022024904A (en) Firmware updating system and firmware updating method
JP3730684B2 (en) Display device for programmable controller and display information writing method thereof
JP2002268907A (en) Memory controller
CN117573175A (en) Firmware real-time updating method, system and storage medium for non-reset control chip
JP2008108048A (en) Computer and method for updating firmware therefor