JP2001101007A - Down-load method - Google Patents

Down-load method

Info

Publication number
JP2001101007A
JP2001101007A JP2000235360A JP2000235360A JP2001101007A JP 2001101007 A JP2001101007 A JP 2001101007A JP 2000235360 A JP2000235360 A JP 2000235360A JP 2000235360 A JP2000235360 A JP 2000235360A JP 2001101007 A JP2001101007 A JP 2001101007A
Authority
JP
Japan
Prior art keywords
memory
program
stored
control program
bank
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.)
Granted
Application number
JP2000235360A
Other languages
Japanese (ja)
Other versions
JP3475920B2 (en
Inventor
Yorio Suzuki
順夫 鈴木
Keiichi Kadokawa
啓一 角川
Masami Hosoya
雅己 細谷
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.)
Tamura Electric Works Ltd
Original Assignee
Tamura Electric Works Ltd
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 Tamura Electric Works Ltd filed Critical Tamura Electric Works Ltd
Priority to JP2000235360A priority Critical patent/JP3475920B2/en
Publication of JP2001101007A publication Critical patent/JP2001101007A/en
Application granted granted Critical
Publication of JP3475920B2 publication Critical patent/JP3475920B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Prepayment Telephone Systems (AREA)
  • Telephone Function (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)
  • Information Transfer Between Computers (AREA)
  • Stored Programmes (AREA)

Abstract

PROBLEM TO BE SOLVED: To ensure a speech service even when a program is not normally down-loaded in a public telephone set for offering a speech service according to the execution of a program. SOLUTION: Second memories 18c1-18c8 are arranged so that each of them has the same address and different banks, and the plural second memories are divided into two groups according to the bank numbers. A first memory 18b and a third memory 18a whose address is different from that of the second memory are respectively provided with a table in which the program number and the bank number of the second memory are stored as a pair, and when the number and a writing address transmitted from a center are received before the down-load of a program, the bank number of the second memory is selected according to the value of the table, and the down-load program is stored in the second memory of the group different from the group with the bank number according to the writing address.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、公衆電話機等の端
末において実行される制御プログラムを電話回線を介し
前記端末へダウンロードする場合のダウンロード方法に
関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a download method for downloading a control program executed in a terminal such as a public telephone to the terminal via a telephone line.

【0002】[0002]

【従来の技術】一般に公衆電話機等の端末装置の中に
は、電話回線等を介してダウンロードされたプログラム
を受信し、このプログラムにより各種の制御を実行でき
るようにしたものもある。このような端末装置では、例
えば紫外線消去が可能なEPROM内に、制御プログラ
ムをダウンロードするためのローダーと呼称されるプロ
グラムを予め内蔵し、端末装置側ではこのローダープロ
グラムを実行して制御プログラムを受信し電気的な書き
込み及び消去が可能なEEPROMに格納する。そして
制御プログラムのEEPROMへの格納が終了すると、
端末装置ではプログラムの実行をEEPROM側に切り
換え、この端末装置が例えば公衆電話機であれば電話機
制御を開始し、各種の通話サービスを提供するようにし
ている。
2. Description of the Related Art In general, some terminal devices such as public telephones receive a program downloaded via a telephone line or the like, and can execute various controls by using the program. In such a terminal device, for example, a program called a loader for downloading a control program is previously stored in an EPROM capable of erasing ultraviolet rays, and the terminal device executes the loader program to receive the control program. Then, the data is stored in an electrically writable and erasable EEPROM. When the storage of the control program in the EEPROM is completed,
In the terminal device, the execution of the program is switched to the EEPROM, and if the terminal device is, for example, a public telephone, the control of the telephone is started to provide various kinds of call services.

【0003】[0003]

【発明が解決しようとする課題】しかし、制御プログラ
ムのダウンロード中に何らかの通信異常が発生し、制御
プログラムが正常にダウンロードされなかった場合は、
EEPROMに書き込まれた制御プログラムは不完全な
ものとなる。このため、端末装置側ではこの制御プログ
ラムを実行できず、従って、再度制御プログラムがダウ
ンロードされEEPROMに正常に格納されるまでの間
は、例えば通話サービスが提供できなくなるという問題
を生じている。従って本発明は、制御プログラムが正常
にダウンロードされない場合でも通話サービス等のサー
ビスを行うことを目的とする。
However, if a communication error occurs during the download of the control program and the control program is not normally downloaded,
The control program written in the EEPROM is incomplete. For this reason, the terminal device cannot execute the control program, so that, for example, a call service cannot be provided until the control program is downloaded again and normally stored in the EEPROM. Therefore, an object of the present invention is to provide a service such as a call service even when a control program is not normally downloaded.

【0004】[0004]

【課題を解決するための手段】このような課題を解決す
るために本発明は、センタ装置から電話回線を介してダ
ウンロードされる制御プログラムを第1のメモリ(18
b)に格納されたローダープログラムの実行により受信
し第1のメモリと異なるアドレス領域の第2のメモリ
(18c)に格納すると共に、第2のメモリに格納され
た制御プログラムを実行してサービスを行う端末装置に
おいて、第2のメモリを各々が同一アドレスでかつ異な
るバンクとなるように複数(18c1〜18c8)配置
し、かつ複数の第2のメモリをバンク番号に従って2つ
のグループに分けるとともに、第1のメモリ及び第2の
メモリと異なるアドレス領域の第3のメモリ(18a)
に前記制御プログラムの番号及び第2のメモリのバンク
番号を対に記憶したテーブルを設け、前記制御プログラ
ムのダウンロードの前に前記センタ装置から送信される
この制御プログラムの番号及び書き込みアドレスを受信
すると前記テーブルの値に従って第2のメモリのバンク
番号を選択し、選択されたバンク番号のグループと異な
るグループの第2のメモリに対し、ダウンロードされる
制御プログラムを前記書き込みアドレスに従って格納す
る方法である。また、第2のメモリに対する制御プログ
ラムの格納時に前記第3のメモリのテーブルを更新し、
かつ更新されたテーブルの値を特定の第2のメモリ(1
8c4)にコピーする方法である。
According to the present invention, a control program downloaded from a center device via a telephone line is stored in a first memory (18).
b) received by execution of the loader program stored in the second memory (18c) in an address area different from the first memory and stored in the second memory (18c), and the control program stored in the second memory is executed to execute the service In the terminal device, the second memories are arranged in a plurality (18c1 to 18c8) such that each has the same address and is in a different bank, and the plurality of second memories are divided into two groups according to the bank number. The third memory (18a) in an address area different from the first memory and the second memory
A table storing pairs of the control program number and the bank number of the second memory, and receiving the control program number and the write address transmitted from the center device before the download of the control program. In this method, a bank number of the second memory is selected according to a value in a table, and the downloaded control program is stored in a second memory of a group different from the group of the selected bank number according to the write address. Updating a table in the third memory when the control program is stored in the second memory;
The updated table values are stored in a specific second memory (1
8c4).

【0005】[0005]

【発明の実施の形態】以下、本発明について図面を参照
して説明する。図1は、本発明を適用した公衆電話機1
の構成を示すブロック図である。同図において、11は
電話回線(以下、回線)Lに到来する着信信号を検出す
る着信回路、12は回線Lを介して供給される局電源を
入力して各部に電源を供給する電源回路、13はダイヤ
ル信号を送出するダイヤル送出回路、14は後述するセ
ンタ装置とデータ通信を行うためのデータ送受信回路、
15は通話回路である。また、16はダイヤルキー等か
らなるキーボード、17は投入された硬貨の選別,収納
等の処理を行う硬貨処理部、18は以上の各部を制御す
る制御部である。なお、HS1,HS2はフックスイッ
チ、RLは回線Lの捕捉を行うためのリレーである。
DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention will be described below with reference to the drawings. FIG. 1 shows a public telephone 1 to which the present invention is applied.
FIG. 3 is a block diagram showing the configuration of FIG. In FIG. 1, reference numeral 11 denotes an incoming circuit for detecting an incoming signal arriving at a telephone line (hereinafter, line) L; 13 is a dial transmission circuit for transmitting a dial signal, 14 is a data transmission / reception circuit for performing data communication with a center device described later,
Reference numeral 15 denotes a communication circuit. Reference numeral 16 denotes a keyboard composed of dial keys or the like, 17 denotes a coin processing unit that performs processing such as sorting and storing of inserted coins, and 18 denotes a control unit that controls the above units. HS1 and HS2 are hook switches, and RL is a relay for capturing the line L.

【0006】ところで、以上のように構成された公衆電
話機1でオフフックすると、フックスイッチHS1が閉
結されることにより、局電源が回線Lを介して電源回路
12に供給される。すると、電源回路12ではこの局電
源から電圧Vの電源を生成して制御部18等に供給す
る。制御部18は電源回路12から出力される電源によ
り起動されると、まずフックスイッチHS2の状態を検
出して発信のために起動されたことを認識する。なお、
リレーRLは図示しない起動回路により駆動され既にそ
の接点が閉結されている。
By the way, when off-hook is performed on the public telephone 1 configured as described above, the hook switch HS1 is closed, and the station power is supplied to the power circuit 12 via the line L. Then, the power supply circuit 12 generates power of the voltage V from the station power and supplies it to the control unit 18 and the like. When activated by the power supply output from the power supply circuit 12, the control unit 18 first detects the state of the hook switch HS2 and recognizes that it has been activated for transmission. In addition,
The relay RL is driven by a starting circuit (not shown), and its contact is already closed.

【0007】ここで、硬貨が投入されキーボード16の
ダイヤルキーが操作されると、制御部18は、キーボー
ド16の操作を検出して操作されたダイヤル番号をダイ
ヤル送出回路13へ与え、ダイヤル送出回路13からダ
イヤル信号を回線Lを介し交換機側へ送出させる。この
結果、相手の呼出が行われる。そして、この呼出に対し
図示しない応答検知回路を介し応答を検知すると、制御
部18はEEPROM18に予め格納されている基準通
話料金情報に基づき硬貨処理部17を制御し、投入され
蓄積されている硬貨を収納させる。その後、フックスイ
ッチHS2の状態からオンフックによる終話を検出する
と、リレーRLを駆動しその接点を開放して終話する。
Here, when a coin is inserted and the dial key of the keyboard 16 is operated, the control unit 18 detects the operation of the keyboard 16 and gives the operated dial number to the dial sending circuit 13 and the dial sending circuit 13 13 sends a dial signal to the exchange via the line L. As a result, the other party is called. When detecting a response to this call via a response detection circuit (not shown), the control unit 18 controls the coin processing unit 17 based on the reference call charge information stored in advance in the EEPROM 18, and the coins inserted and stored. To be stored. Thereafter, when the on-hook end is detected from the state of the hook switch HS2, the relay RL is driven to open its contact and end the call.

【0008】一方、発信側からの呼出により回線Lに着
信が到来した場合は、16Hzの着信信号により着信回
路11の図示しないコンデンサに電荷が蓄積されること
より所定電圧が生成される。この電圧により上述の起動
回路が起動される。この結果、リレーRLが駆動されそ
の接点が閉結されて着信応答となり、交換機側から局電
源が供給され、制御部18が起動される。この場合、制
御部18はフックスイッチHS2の状態を検出して着信
の到来により起動されたことを認識する。その後、制御
部18はデータ通信モードに移行し、データ送受信回路
14を介しこの着信の発信元であるセンタ装置とデータ
通信を行う。そして、後述するEEPROM等のメモリ
に記憶されているこの公衆電話機1を利用した通話の回
数等の通話履歴情報や、この公衆電話機1の硬貨処理部
17に収納されている硬貨の収納金額情報等をセンタ装
置へ送信する。
On the other hand, when an incoming call arrives on the line L by a call from the calling side, a predetermined voltage is generated by accumulating electric charges in a capacitor (not shown) of the incoming circuit 11 by an incoming signal of 16 Hz. The above-mentioned starting circuit is started by this voltage. As a result, the relay RL is driven, the contact is closed, and an incoming call is answered, the exchange is supplied with office power, and the control unit 18 is started. In this case, the control unit 18 detects the state of the hook switch HS2 and recognizes that the hook switch HS2 has been activated by the arrival of the incoming call. Thereafter, the control unit 18 shifts to the data communication mode, and performs data communication via the data transmission / reception circuit 14 with the center device that is the source of the incoming call. Then, call history information such as the number of calls using the public telephone 1 stored in a memory such as an EEPROM described later, information on the amount of stored coins stored in the coin processing unit 17 of the public telephone 1, and the like. Is transmitted to the center device.

【0009】図2は、こうした公衆電話機1とデータ通
信を行う上述のセンタ装置の構成を示すブロック図であ
る。センタ装置2は、上述したように、公衆電話機に発
呼して公衆電話機の通話履歴情報や硬貨の収納金額情報
等を収集して各公衆電話機の稼働状況を管理するもので
ある。この他、センタ装置2は、通話料金の改訂時等に
各公衆電話機に発呼して新たな基準通話料金情報を送信
し、各公衆電話機に対し新たな通話料金体系に基づいて
硬貨の収納を行わせる。また、各公衆電話機に対し、各
公衆電話機で実行する制御プログラムのデータをダウン
ロードし、各公衆電話機に対しこの制御プログラムを実
行させて通話サービスを行わせる機能を有する。図2に
おいて、センタ装置2は、複数の回線からなる回線群2
1、回線制御部22、表示部23、記憶部24、キーボ
ード25、プリンタ26、及び以上の各部を制御する制
御部27から構成される。
FIG. 2 is a block diagram showing a configuration of the above-mentioned center device for performing data communication with the public telephone 1. As shown in FIG. As described above, the center device 2 manages the operation status of each public telephone by calling the public telephone, collecting call history information of the public telephone, information on the amount of stored coins, and the like. In addition, the center device 2 transmits a new reference call charge information by calling each pay telephone when the call charge is revised or the like, and stores coins in each pay telephone based on the new call charge system. Let it do. Further, it has a function of downloading data of a control program executed by each public telephone to each public telephone, and causing each public telephone to execute the control program to perform a call service. In FIG. 2, a center device 2 includes a line group 2 including a plurality of lines.
1, a line control unit 22, a display unit 23, a storage unit 24, a keyboard 25, a printer 26, and a control unit 27 for controlling the above units.

【0010】ところで、公衆電話機1の制御部18で
は、センタ装置2から回線Lを介して上述した制御プロ
グラムがダウンロードされると、この制御プログラムを
データ送受信回路14を介して受信し内部のメモリに格
納する。図3はこうした制御部18の構成を示すブロッ
ク図である。同図において、制御部18は、CPU18
A、RAM18B,18C、電気的書き込み及び消去が
可能なEEPROM18D,18E、紫外線による消去
が可能なEPROM18F、及びバンク切替回路18G
からなる。また、図4はCPU18Aのメモリマップを
示す図であり、先頭番地「0000」H(「H」は16
進の意味)から順に、I/O部(例えば、ダイヤル送出
回路13等をアクセスするためのポート)、ワーク用の
RAM18B、この公衆電話機に関する設定データや上
述の通話履歴情報及び硬貨の収納金額情報等が記憶され
るEEPROM18Dの各領域が割り当てられている。
When the control program described above is downloaded from the center device 2 via the line L, the control unit 18 of the public telephone 1 receives the control program via the data transmission / reception circuit 14 and stores it in an internal memory. Store. FIG. 3 is a block diagram showing the configuration of the control unit 18. In the figure, a control unit 18 includes a CPU 18
A, RAMs 18B and 18C, electrically erasable and erasable EEPROMs 18D and 18E, ultraviolet erasable EPROM 18F, and bank switching circuit 18G
Consists of FIG. 4 is a diagram showing a memory map of the CPU 18A. The start address “0000” H (“H” is 16
), An I / O unit (for example, a port for accessing the dial sending circuit 13), a work RAM 18B, setting data relating to this public telephone, the above-mentioned call history information, and information on the amount of stored coins. Are allocated to each area of the EEPROM 18D.

【0011】ここで、この公衆電話機1では、プログラ
ム及びデータの各容量がCPU18Aのアクセス範囲よ
り多い関係上、後半の番地「8000」Hから「FFF
F」Hまでの領域をバンク切替領域としている。そし
て、このバンク切替領域に、プログラムが格納されるE
PROM18F、同様にプログラムが格納されるEEP
ROM18E、及びデータが格納されるRAM18Cを
重複して配置し、CPU18Aは、これらを切り替えな
がらプログラムの実行及びデータのアクセスを行ってい
る。なお、常時はEPROM18F側にバンクが切り替
えられCPU18Aにアクセスされるようになってい
る。また、EPROM18Fには、プログラムをロード
するためのローダープログラムを格納するローダー部1
8F1、及びこの公衆電話機1で緊急通話を行うための
プログラムを格納する緊急通話機能部18F2(第3の
メモリ)が設けられている。
In this public telephone 1, since the capacity of each program and data is larger than the access range of the CPU 18A, the latter address "8000" H to "FFF" is used.
The area up to F "H is defined as a bank switching area. Then, the program is stored in this bank switching area.
PROM 18F, EEP in which program is stored similarly
The ROM 18E and the RAM 18C for storing data are arranged redundantly, and the CPU 18A executes programs and accesses data while switching between them. The bank is always switched to the EPROM 18F and the CPU 18A is accessed. The EPROM 18F has a loader unit 1 for storing a loader program for loading the program.
8F1 and an emergency call function unit 18F2 (third memory) for storing a program for making an emergency call with the public telephone 1.

【0012】ここで、公衆電話機1に対し機能の追加を
行うために、センタ装置2からこの公衆電話機1に対し
機能追加された新たな制御プログラムが送信されてくる
と、CPU18Aは、ローダー部18F1の一部のプロ
グラムを実行してローダー部18F1の他のプログラム
をRAM18Bに転送すると共に、今度は転送されたロ
ーダープログラムを実行して前記新たな制御プログラム
をRAM18Bの別途の領域(第4のメモリ)に一旦蓄
積する。その後、CPU18Aは、RAM18Bに転送
されたローダープログラムをさらに実行してEEPRO
M18E(第2のメモリ)がアクセスできるようにバン
ク切替を行う。そして、切り替えたEEPROM18E
に対し、RAM18Bに蓄積されている前記新たな制御
プログラムを転送する。そして転送終了後、CPU18
AはEEPROM18E内の新たな制御プログラムを実
行して通話サービスを行う。ここで、本実施例では、制
御プログラムがダウンロードされた場合に、EPROM
18F内のローダー部18F1のプログラムをRAM1
8Bに転送しているが、この転送領域に第1のメモリと
してEPROMを配設してローダープログラムを格納す
ることにより、EPROM18F内のローダー部18F
1を省略するようにしても良い。
Here, when a new control program with a function added to the public telephone 1 is transmitted from the center apparatus 2 to add a function to the public telephone 1, the CPU 18A loads the loader unit 18F1. Is executed to transfer another program of the loader unit 18F1 to the RAM 18B, and this time, the transferred loader program is executed to store the new control program in a separate area (the fourth memory) of the RAM 18B. ). Thereafter, the CPU 18A further executes the loader program transferred to the RAM 18B to execute the EEPROM
Bank switching is performed so that M18E (second memory) can be accessed. Then, the switched EEPROM 18E
Then, the new control program stored in the RAM 18B is transferred. After the transfer is completed, the CPU 18
A executes a new control program in the EEPROM 18E to provide a call service. Here, in this embodiment, when the control program is downloaded, the EPROM
The program of the loader section 18F1 in the 18F is stored in the RAM1
8B, an EPROM is provided as a first memory in this transfer area, and a loader program is stored in the EPROM.
1 may be omitted.

【0013】このように、公衆電話機1で実行される制
御プログラムは、センタ装置2からダウンロードされる
ものである。このプログラムのダウンロードはアナログ
の回線Lを介しモデム信号等により行われるため、例え
ばISDN回線等のデジタル回線を介するダウンロード
の場合に比べ通信時間がかかる。従って、このダウンロ
ード中にノイズ等の発生により通信障害となる確率が高
くなる。ここで、一旦通信障害になると、従来は、再度
ダウンロードが行われるまでの間は、通話サービスが行
えなくなるという問題がある。このため、EPROM1
8Fに上述した緊急通話機能部18F2を設け、制御プ
ログラムのローディング中に通信エラーが発生した場合
は、再度ダウンロードが行われるまでの間は、この緊急
通話機能部18F2のプログラムを実行して「110」
番通報や「119」番通報等、緊急かつ最低限の通話サ
ービスを提供できるようにする。
As described above, the control program executed by the public telephone 1 is downloaded from the center device 2. Since the download of this program is performed by a modem signal or the like via the analog line L, communication time is longer than that of a download via a digital line such as an ISDN line. Therefore, the probability of a communication failure due to the occurrence of noise or the like during the download increases. Here, once a communication failure occurs, conventionally, there is a problem that the call service cannot be performed until the download is performed again. For this reason, EPROM1
8F, the above-described emergency call function unit 18F2 is provided. If a communication error occurs during the loading of the control program, the program of the emergency call function unit 18F2 is executed until “110” is downloaded again to execute “110”. "
It is possible to provide an emergency and minimum call service such as a call number or a "119" number call.

【0014】図5は制御プログラムのダウンロード時の
センタ装置2及び公衆電話機1の動作を示すフローチャ
ートである。このフローチャートに基づいて本発明の要
部動作をさらに詳細に説明する。公衆電話機1の機能追
加等が生じた場合、センタ装置2では、この公衆電話機
1の全ての制御プログラムに対し、キーボード25の操
作等により新たな機能分のプログラムを追加して新規制
御プログラムとし、記憶部24に記憶する。その後、制
御部27は回線制御部22を制御して回線群21中の何
れかの回線を介し公衆電話機1に対し発呼し公衆電話機
1の呼出を行う(ステップS1)。
FIG. 5 is a flowchart showing the operation of the center device 2 and the public telephone 1 when the control program is downloaded. The operation of the main part of the present invention will be described in further detail based on this flowchart. When the function of the public telephone 1 is added, the center device 2 adds a program for a new function to all the control programs of the public telephone 1 by operating the keyboard 25 or the like to form a new control program. The information is stored in the storage unit 24. Thereafter, the control unit 27 controls the line control unit 22 to call the public telephone 1 via any one of the lines in the line group 21 and call the public telephone 1 (step S1).

【0015】ここで、公衆電話機1がステップS2でこ
の呼出に応答すると、センタ装置2は公衆電話機1へプ
ログラムダウンロード指示コマンドを送信する。この場
合、公衆電話機1のCPU18Aは、ローダー部18F
1のプログラムを実行してステップS3でプログラムダ
ウンロード指示コマンドの受信の有無を判断する。そし
て、データ送受信回路14を介しこの指示コマンドを受
信すると、ローダー部18F1の以降に実行されるロー
ダープログラムをステップS5でRAM18Bにコピー
する。その後、CPU18AはRAM18Bにコピーさ
れたプログラムを実行してデータ送受信回路14を介し
ステップS6でセンタ装置2側へ受信スタート信号を返
送する。
Here, when public telephone 1 responds to this call in step S2, center device 2 transmits a program download instruction command to public telephone 1. In this case, the CPU 18A of the public telephone 1 is connected to the loader unit 18F.
The first program is executed, and it is determined in step S3 whether or not a program download instruction command has been received. When the instruction command is received via the data transmission / reception circuit 14, the loader program executed after the loader unit 18F1 is copied to the RAM 18B in step S5. Thereafter, the CPU 18A executes the program copied to the RAM 18B, and returns a reception start signal to the center device 2 via the data transmission / reception circuit 14 in step S6.

【0016】そしてその後、CPU18Aは、RAM1
8Bにコピーされたローダープログラムを引き続き実行
することにより、データ送受信回路14を介するセンタ
装置2からの新規制御プログラムを受信し、ステップS
7でRAM18Bの別途領域に格納する。そしてステッ
プS8でこの新規制御プログラムの受信終了の有無を判
断し、制御プログラムの受信が全て完了してRAM18
Bに格納されると、格納された制御プログラムをステッ
プS9でチェックする。
After that, the CPU 18A operates the RAM 1
8B, the new control program is received from the center device 2 via the data transmission / reception circuit 14, and the process proceeds to step S
In step 7, the data is stored in a separate area of the RAM 18B. In step S8, it is determined whether the reception of the new control program has been completed.
When stored in B, the stored control program is checked in step S9.

【0017】ここで、RAM18Bに格納された制御プ
ログラムをチェックしたときにエラーが発生した場合
は、この新規制御プログラムは何らかの通信異常により
正しく受信されなかったものと判断し、受信NG(受信
エラー)処理へ移行し制御プログラムのローディング処
理を終了する。そしてこの場合、CPU18Aは、セン
タ装置2から新たに制御プログラムがダウンロードされ
てくるまでの間は緊急通話機能部18F2のプログラム
を実行し、上述の緊急通話サービスを提供する。その
後、センタ装置2から再度の呼出があると、ステップS
2へ戻ってこの呼出に応答すると共に、ステップS3以
降の制御プログラムの受信処理を実行する。
Here, if an error occurs when checking the control program stored in the RAM 18B, it is determined that the new control program was not correctly received due to some communication abnormality, and the reception NG (reception error) Then, the process proceeds to the end of the loading process of the control program. In this case, the CPU 18A executes the program of the emergency call function unit 18F2 until a new control program is downloaded from the center device 2, and provides the above-described emergency call service. Thereafter, when there is another call from the center device 2, step S
Then, the process returns to step S2 to respond to the call, and executes the control program receiving process from step S3.

【0018】一方、RAM18Bに格納されたプログラ
ムのチェック結果が正常であり、ステップS10の判定
が「Y」となれば、CPU18Aは、RAM18Bのプ
ログラムによって電話機制御(即ち、通話サービス)が
行えるように、即ちこのプログラムを起動できる状態に
セットする(ステップS11)。次に、CPU18Aは
RAM18Bにコピーされたローダープログラムをさら
に継続して実行することにより、EPROM18F側か
らEEPROM18E側へバンク切り替えを行ってCP
U18AがEEPROM18Eをアクセスできるように
する。そして、RAM18Bに一旦格納されている新規
制御プログラムをステップS12でEEPROM18E
に転送して書き込む。
On the other hand, if the check result of the program stored in the RAM 18B is normal and the determination in the step S10 becomes "Y", the CPU 18A controls the telephone set (that is, the call service) by the program of the RAM 18B. That is, the program is set to a state in which the program can be started (step S11). Next, the CPU 18A further executes the loader program copied to the RAM 18B to switch the bank from the EPROM 18F to the EEPROM 18E, and
Enables U18A to access EEPROM 18E. Then, the new control program temporarily stored in the RAM 18B is stored in the EEPROM 18E in step S12.
Transfer to and write.

【0019】ここで、新規制御プログラムがEEPRO
M18Eに全て書き込まれ、ステップS13の判定が
「Y」となると、CPU18Aは、RAM18Bのロー
ダープログラムを引き続き実行して、ステップS14で
EEPROM18Eの制御プログラムをチェックする。
そして、EEPROM18Eに書き込まれた制御プログ
ラムのチェック結果が正常であれば、CPU18AはE
EPROM18Eのプログラムによって電話機制御が行
えるように、即ちこのプログラムを起動できる状態にセ
ットして終了する(ステップS16)。その後、CPU
18Aは、起動可能状態になったEEPROM18Eの
プログラムを実行して新たな通話サービスを行う(ステ
ップS17)。なお、EEPROM18Eに書き込まれ
た制御プログラムのチェック結果が異常であり、ステッ
プS15で「N」となれば、CPU18Aは制御プログ
ラムのローディング処理を終了する。この場合CPU1
8Aは、既にステップS11でその起動可能状態にセッ
トされているRAM18Bの新規制御プログラムを実行
して新たな通話サービスを行う。
Here, the new control program is called EEPRO.
When all the data has been written to the M18E and the determination in step S13 is "Y", the CPU 18A continues to execute the loader program in the RAM 18B, and checks the control program in the EEPROM 18E in step S14.
If the check result of the control program written in the EEPROM 18E is normal, the CPU 18A
The program is set so that the telephone can be controlled by the program in the EPROM 18E, that is, the program can be started, and the process ends (step S16). Then the CPU
18A executes a program of the EEPROM 18E which has been enabled to perform a new call service (step S17). If the check result of the control program written in the EEPROM 18E is abnormal and becomes “N” in step S15, the CPU 18A ends the control program loading process. In this case CPU1
8A performs a new call service by executing the new control program of the RAM 18B that has already been set to its start-up enabled state in step S11.

【0020】このように、EPROM18F内に緊急通
話機能部18F2を設けることにより、制御プログラム
のダウンロードが失敗したときでも緊急通話は可能とな
る。従って、制御プログラムのダウンロード失敗したと
きに公衆電話機1の通話サービスが全く停止するような
事態を回避できる。また、センタ装置2からダウンロー
ドされる制御プログラムをRAM18B,EEPROM
18Eの順に格納することにより次のような効果が期待
できる。
By providing the emergency call function section 18F2 in the EPROM 18F, an emergency call can be made even when the download of the control program has failed. Therefore, it is possible to avoid a situation in which the telephone service of the public telephone 1 is completely stopped when the download of the control program fails. The control program downloaded from the center device 2 is stored in a RAM 18B, an EEPROM,
By storing in the order of 18E, the following effects can be expected.

【0021】即ち、既に1回、制御プログラムがダウン
ロードされEEPROM18Eに格納されている公衆電
話機に対し、再度2回目の制御プログラムをダウンロー
ドすると、この制御プログラムは、直接EEPROM1
8Eに書き込まれないため、もしこの制御プログラムの
ダウンロードが失敗したとしても、EEPROM18E
に格納されている以前のプログラムにより通話サービス
を行うことができる。また、EEPROM18Eにプロ
グラムが格納できない場合でも、RAM18Bのプログ
ラムを実行することができる。従って、RAM18Bの
内容が電池等によりバックアップされていれば、ダウン
ロードの終了後にはこのRAM18Bのプログラムを実
行することにより新規通話サービスを行うことができ
る。
That is, when the control program is downloaded once again to the public telephone whose control program has been downloaded once and stored in the EEPROM 18E, this control program is directly transmitted to the EEPROM 1E.
8E, even if the download of the control program fails, the EEPROM 18E
The call service can be provided by the previous program stored in. Even when the program cannot be stored in the EEPROM 18E, the program in the RAM 18B can be executed. Therefore, if the contents of the RAM 18B are backed up by a battery or the like, a new call service can be provided by executing the program of the RAM 18B after the download is completed.

【0022】図6は、以上のように動作する公衆電話機
1のCPU18Aのプログラム実行状況を示すフローチ
ャートである。即ち、CPU18Aは、まず、EEPR
OM18Eに制御プログラムが格納され、かつこの制御
プログラムのチェック結果が正常でありステップS21
で「Y」と判定されれば、ステップS22でEEPRO
M18Eのプログラムを実行して電話機制御を行い公衆
電話機の通話サービスを実施する。また、EEPROM
18Eに制御プログラムが格納されていないか、或いは
格納されていれも正常なプログラムではない場合は、次
にRAM18B内の制御プログラムの格納の有無を判断
する。
FIG. 6 is a flowchart showing the program execution status of CPU 18A of public telephone 1 operating as described above. That is, the CPU 18A first sets the EEPR
The control program is stored in the OM 18E, and the check result of the control program is normal and the
If "Y" is determined in step S22, EEPRO is determined in step S22.
The M18E program is executed to control the telephone and implement the telephone service of the public telephone. Also, EEPROM
If the control program is not stored in 18E, or if the stored program is not a normal program, it is next determined whether or not the control program is stored in RAM 18B.

【0023】ここで、RAM18Bに制御プログラムが
格納され、かつこれのチェック結果が正常でありステッ
プS23で「Y」となれば、ステップS24ではRAM
18Bの制御プログラムを実行して電話機制御を行い、
同様に通話サービスを実施する。また、RAM18Bに
制御プログラムが格納されていない場合、或いは格納さ
れていてもこれのチェック結果が異常である場合は、C
PU18Aは、ステップS25で緊急通話機能部18F
2のプログラムまたはローダー部18F1のプログラム
を実行する。
Here, if the control program is stored in the RAM 18B, and the check result is normal and “Y” is obtained in step S23, the control program proceeds to step S24.
Execute the control program of 18B to perform telephone control,
Similarly, a call service is implemented. If the control program is not stored in the RAM 18B, or if the check result is abnormal even though the control program is stored,
The PU 18A determines in step S25 that the emergency call function unit 18F
2 or the program of the loader unit 18F1.

【0024】次に第2の例として、CPU18Aが、ロ
ーダー部18F1のプログラムを実行してセンタ装置2
からプログラムダウンロード指示コマンドを受信した場
合、ローダー部18F1の以降のローダープログラムデ
ータを図5のステップS5でRAM18Bにコピーする
ように構成する。その後、CPU18AはRAM18B
にコピーされたローダープログラムを実行してセンタ装
置2からダウンロードされる制御プログラムをRAM1
8Cに格納する。そしてダウンロードされた全ての制御
プログラムがRAM18Cに正常に格納されると、CP
U18Aは引き続いてローダープログラムを実行してR
AM18Cの制御プログラムをバンク切替を行いながら
EEPROM18Eに転送し格納する。この結果、セン
タ装置2からダウンロードされる大容量の制御プログラ
ム(ほぼ32Kバイトに相当)を公衆電話機1に格納す
ることができる。
Next, as a second example, the CPU 18A executes the program of the loader section 18F1 to execute
When receiving the program download instruction command from the loader unit 18F1, the loader program data of the loader unit 18F1 is copied to the RAM 18B in step S5 in FIG. After that, the CPU 18A returns to the RAM 18B.
The control program downloaded from the center device 2 by executing the loader program copied to the
8C. When all the downloaded control programs are normally stored in the RAM 18C, the CP
U18A subsequently executes the loader program to execute R
The control program of the AM 18C is transferred to and stored in the EEPROM 18E while performing bank switching. As a result, a large-capacity control program (equivalent to approximately 32 Kbytes) downloaded from the center device 2 can be stored in the public telephone 1.

【0025】この場合、EEPROM18Eに制御プロ
グラムが正常に格納されないか、或いは全く格納できな
い場合でも、RAM18Cの内容が電池等によりバック
アップされていれば、図6のステップS24でRAM1
8Cの新規制御プログラムを実行することができる。な
お、本実施例では、公衆電話機の例について説明した
が、電話回線を介して制御プログラムがダウンロードさ
れる例えばデータ処理装置等の端末装置に対して適用し
ても同等の効果を得ることができる。即ち、このような
端末装置は、制御プログラムが正常にダウンロードされ
ない場合は、緊急通話機能部18F2のプログラムに相
当する最低限のサービスを行うプログラムが実行される
ように構成する。
In this case, even if the control program is not normally stored in the EEPROM 18E or cannot be stored at all, if the contents of the RAM 18C are backed up by a battery or the like, the RAM 1C is stored in the RAM 1C in step S24 of FIG.
The new control program of 8C can be executed. In the present embodiment, an example of a public telephone has been described, but the same effect can be obtained by applying the present invention to a terminal device such as a data processing device in which a control program is downloaded via a telephone line. . That is, such a terminal device is configured such that, when the control program is not normally downloaded, a program for performing a minimum service corresponding to the program of the emergency call function unit 18F2 is executed.

【0026】次に図7は、制御部18の第2の構成を示
すブロック図である。この第2の例は、CPU18A
に、メモリとして、RAM18a,マスクROM18
b,フラッシュメモリ18c1〜18c8を接続するよ
うに構成した例である。そして、CPU18Aは、8個
の各フラッシュメモリ18c1〜18c8をそれぞれバ
ンク切替回路18dによりバンク切り替えしてアクセス
する。なお、図中#1〜#8はバンク番号を示す。
FIG. 7 is a block diagram showing a second configuration of the control unit 18. As shown in FIG. In the second example, the CPU 18A
RAM 18a, mask ROM 18
b, an example in which the flash memories 18c1 to 18c8 are connected. Then, the CPU 18A accesses the eight flash memories 18c1 to 18c8 by switching banks using the bank switching circuit 18d. In the figure, # 1 to # 8 indicate bank numbers.

【0027】図8は図7に示す第2の構成例におけるC
PU18Aのメモリマップを示す図であり、先頭番地
「0000」Hから順に「3FFF」H番地まで、I/
O部、ワーク用のRAM18aの領域が割り当てられ、
次に「4000」H番地から「7FFF」H番地までマ
スクROM18bの領域が割り当てられている。また、
後半の「8000」H番地から「FFFF」H番地まで
が公衆電話機1の上述した制御プログラムや設定情報を
格納する各フラッシュメモリ18c1〜18c8の領域
に割り当てられている。
FIG. 8 shows C in the second configuration example shown in FIG.
It is a figure which shows the memory map of PU18A, I / O from a head address "0000" H to "3FFF" H address sequentially.
The area of the RAM 18a for the O part and the work is allocated,
Next, the area of the mask ROM 18b is allocated from the address "4000" to the address "7FFF". Also,
Addresses “8000” H to “FFFF” H in the latter half are allocated to the areas of the flash memories 18 c 1 to 18 c 8 for storing the above-described control programs and setting information of the public telephone 1.

【0028】マスクROM18bには、各フラッシュメ
モリに格納される制御プログラムの実行管理を行うリア
ルタイムOS18b1、各フラッシュメモリにプログラ
ムをローディングするためのプログラムが格納されるロ
ーダー部18b2及びシステムダウンしたときにリアル
タイムOS18b1がどのプログラムを走行させるか等
の情報を記憶するシステムダウン用テーブル18b3が
設けられている。また、RAM18a及び各フラッシュ
メモリ18c4には、それぞれ、後述のプログラム定義
テーブル18a1,18eが設けられている。
The mask ROM 18b has a real-time OS 18b1 for managing execution of a control program stored in each flash memory, a loader 18b2 for storing a program for loading a program into each flash memory, and a real-time OS 18b2 when a system goes down. A system down table 18b3 for storing information such as which program the OS 18b1 runs is provided. The RAM 18a and the flash memories 18c4 are provided with program definition tables 18a1 and 18e, respectively, which will be described later.

【0029】図9はこのようなプログラム定義テーブル
の構成を示す図であり、各フラッシュメモリに格納され
るプログラムの番号、バンク番号及びそのプログラムの
スタートアドレスが記憶されている。ここで、各バンク
毎に設けられたフラッシュメモリを、図10に示すよう
に、フラッシュメモリ18c1〜18c4についてはグ
ループA、フラッシュメモリ18c5〜18c8につい
てはグループBとしてそれぞれグループ分けする。
FIG. 9 is a diagram showing the structure of such a program definition table, in which program numbers, bank numbers and start addresses of the programs stored in each flash memory are stored. Here, the flash memories provided for each bank are grouped as a group A for the flash memories 18c1 to 18c4 and a group B for the flash memories 18c5 to 18c8, as shown in FIG.

【0030】そして、グループAの例えばフラッシュメ
モリ18c1(#1)の制御プログラムについて書き換
えを行う場合は、グループBに属するフラッシュメモリ
18c5(#5)にその書き換えた内容を格納する。逆
にグループBのフラッシュメモリ18c5(#5)の書
き換えを行う場合は、グループAに属するフラッシュメ
モリ18c1(#1)にその書き換えた内容を格納す
る。
When rewriting the control program of the flash memory 18c1 (# 1) of the group A, for example, the rewritten content is stored in the flash memory 18c5 (# 5) belonging to the group B. Conversely, when rewriting the flash memory 18c5 (# 5) of the group B, the rewritten content is stored in the flash memory 18c1 (# 1) belonging to the group A.

【0031】また、グループAの例えばフラッシュメモ
リ18c2(#2)についても同様であり、そのメモリ
の制御プログラムについて書き換えを行う場合、グルー
プBに属するフラッシュメモリ18c6(#6)にその
書き換えた内容を格納する。逆にグループBのフラッシ
ュメモリ18c6(#6)の書き換えを行う場合は、グ
ループAに属するフラッシュメモリ18c2(#2)に
その書き換えた内容を格納する。なお、グループAの他
のフラッシュメモリ18c3,18c4、およびそれと
各々対応関係にあるグループBの他のフラッシュメモリ
18c7,18c8についても同様である。
The same applies to, for example, the flash memory 18c2 (# 2) of the group A. When the control program of the memory is rewritten, the rewritten contents are stored in the flash memory 18c6 (# 6) belonging to the group B. Store. Conversely, when rewriting the flash memory 18c6 (# 6) of the group B, the rewritten content is stored in the flash memory 18c2 (# 2) belonging to the group A. The same applies to the other flash memories 18c3 and 18c4 of the group A, and the other flash memories 18c7 and 18c8 of the group B corresponding to the other flash memories 18c3 and 18c4, respectively.

【0032】即ち、いま例えばフラッシュメモリ18c
4内のプログラム定義テーブル18eの内容が図9
(a)のような状況になっているときに、センタ装置2
から例えばアドレス「8000」H番地からはじまるプ
ログラム番号「4」のプログラムデータの書き換えデー
タが送信され、その格納開始アドレスが「9000」H
であるものとする。このプログラム番号「4」の制御プ
ログラムはこのテーブルによればバンク番号#3に相当
するフラッシュメモリ18c3に格納されていることか
ら、制御部18Aはこの書き換えプログラムデータをバ
ンク番号#7に相当するフラッシュメモリ18c3に格
納する。そしてプログラムデータの格納が終了すると、
フラッシュメモリ18c4内のプログラム定義テーブル
18eの内容を図9(b)のように書き換える。CPU
18Aにより実行されるリアルタイムOS18b1は、
このテーブル18eの内容に従って制御プログラムの実
行管理するため、プログラムデータのローディングが失
敗したとしても1つ版数が前の制御プログラムを実行で
きることから、公衆電話機1の通話サービスが全く停止
するような事態を回避できる。
That is, for example, the flash memory 18c
4 shows the contents of the program definition table 18e in FIG.
When the situation as shown in FIG.
For example, rewrite data of the program data of program number "4" starting from address "8000" H is transmitted, and the storage start address is "9000" H.
It is assumed that According to this table, the control program of the program number "4" is stored in the flash memory 18c3 corresponding to the bank number # 3, so the control unit 18A stores the rewrite program data in the flash memory 18c3 corresponding to the bank number # 7. It is stored in the memory 18c3. When the storage of the program data is completed,
The contents of the program definition table 18e in the flash memory 18c4 are rewritten as shown in FIG. CPU
18A is executed by the real-time OS 18b1.
Since the execution of the control program is managed in accordance with the contents of the table 18e, even if the loading of the program data fails, the control program of one version can be executed, so that the call service of the public telephone 1 is completely stopped. Can be avoided.

【0033】図11及び図12は、センタ装置からダウ
ンロードされるプログラムデータのローディング動作を
示すフローチャートである。このフローチャートに従っ
て公衆電話機1の要部動作を説明する。センタ装置2の
発呼により着信信号が回線Lに到来すると、この着信信
号によりリレーRLが起動されてその接点の閉結によ
り、回線Lのループが形成される(図11のステップS
31)。すると、局電源が制御部18に供給されてパワ
ーオン状態となり、CPU18Aが起動される(ステッ
プS32)。CPU18Aは起動されると、最初に実行
するリアルタイムOS18b1の指令に従ってローダー
部18b2のプログラムの実行を開始する。そしてまず
その内容がバックアップされているRAM18aのプロ
グラム定義テーブル18a1の内容をチェックし、正常
であれば処理をステップS41に進める。
FIGS. 11 and 12 are flowcharts showing the loading operation of the program data downloaded from the center device. The operation of the main part of the public telephone 1 will be described with reference to this flowchart. When an incoming signal arrives at the line L due to a call from the center device 2, the relay RL is activated by the incoming signal, and a contact of the relay RL is closed, thereby forming a loop of the line L (step S in FIG. 11).
31). Then, the station power is supplied to the control unit 18 to turn on the power, and the CPU 18A is activated (step S32). When activated, the CPU 18A starts executing the program of the loader unit 18b2 in accordance with a command from the real-time OS 18b1 to be executed first. Then, first, the contents of the program definition table 18a1 of the RAM 18a whose contents are backed up are checked, and if the contents are normal, the process proceeds to step S41.

【0034】また、異常の場合は、予め指定されている
フラッシュメモリ18c4にバンクを切り替えて、その
中に設けられているプログラム定義テーブル18eの内
容をチェックする(ステップS35)。そしてこれが正
常の場合は処理をステップS38へ進める。また異常の
場合は電話機動作を不可とする(ステップS37)。ス
テップS38では、他の全てのフラッシュメモリのバン
ク切替を順次行って各フラッシュメモリ内のプログラム
データをチェックする。そして、異常の場合は電話機動
作を不可とするが、正常の場合はフラッシュメモリ18
c4内のテーブル18eの内容をRAM18aのテーブ
ル18a1にコピーする(ステップS40)。
In the case of an abnormality, the bank is switched to the flash memory 18c4 specified in advance, and the contents of the program definition table 18e provided therein are checked (step S35). If this is normal, the process proceeds to step S38. In the case of an abnormality, the operation of the telephone is disabled (step S37). In step S38, the bank switching of all the other flash memories is sequentially performed to check the program data in each flash memory. In the case of abnormality, the operation of the telephone is disabled.
The contents of the table 18e in c4 are copied to the table 18a1 in the RAM 18a (step S40).

【0035】続いてステップS41では、着信の到来に
より起動されたか否かを判定する。そして着信の到来に
よって起動されたと判定されると、このときオンフック
状態であれば、モデム等からなるデータ送受信回路14
を初期化し(ステップS43)、図示しないトーン送出
回路からアンサートーンを送出し(ステップS44)、
送出終了後、所定時間のタイマをスタートさせる(ステ
ップS45)。次にステップS46及びS47では、そ
れぞれ上記タイマのタイムアップ及びセンタ装置2との
間でデータ通信を行うための接続が行われたか否かを判
断し、センタ装置2との間でデータ通信のための接続が
なされないうちにタイマがタイムアップするとリレーR
Lを復旧させて処理を終了する(ステップS48)。
Then, in a step S41, it is determined whether or not the operation is started by the arrival of the incoming call. If it is determined that the data transmission / reception circuit has been activated by the arrival of an incoming call, if it is in the on-hook state at this time, the data transmitting / receiving circuit
Is initialized (step S43), and an answer tone is transmitted from a tone transmission circuit (not shown) (step S44).
After the transmission is completed, a timer for a predetermined time is started (step S45). Next, in steps S46 and S47, it is determined whether the timer has expired and whether or not a connection for performing data communication with the center device 2 has been made. If the timer times out before the connection of
L is restored, and the process ends (step S48).

【0036】また、上記タイマがタイムアップしないう
ちにセンタ装置2との間でデータ通信を行うための接続
がなされると、図12のステップS61へ処理を進め
る。なお、着信時にオフフックが検出されると着信通話
となる(ステップS39)。また、オフフックにより起
動されると、発信通話となり(ステップS51)、非着
信及びオンフック状態で起動された場合は、公衆電話機
1の異常ということでリレーRLを復旧する(ステップ
S48)。
If the connection for data communication with the center device 2 is made before the timer expires, the process proceeds to step S61 in FIG. If an off-hook is detected during an incoming call, the incoming call is made (step S39). Also, when activated by off-hook, the call is an outgoing call (step S51), and when activated in the non-received and on-hook state, the relay RL is restored because of an abnormality of the public telephone 1 (step S48).

【0037】図12のステップS61及びS62では、
それぞれ上記タイマのタイムアップ及びデータ送受信回
路14を介するモデム信号のキャリア断を判断する。そ
してこれらの各ステップにおいて、何れも「N」と判定
されるとステップS63へ処理を進め、センタ装置2か
らのダウンロードデータを示すコマンドデータの受信の
有無をステップS63で判断する。ここで、センタ装置
2から公衆電話機1へのダウンロードデータは、次のよ
うな順序で送信される。即ち、最初にプログラム番号及
びその書き込み先頭アドレスからなるパラメータデータ
が送信され、次いでプログラムデータ及びそのチェック
サムデータが送信され、最後に終了指示データが送信さ
れる。
In steps S61 and S62 of FIG.
It is determined that the timer has expired and that the modem signal carrier via the data transmission / reception circuit 14 has been disconnected. In each of these steps, if all are determined to be “N”, the process proceeds to step S63, and it is determined in step S63 whether command data indicating download data from center device 2 has been received. Here, the download data from the center device 2 to the public telephone 1 is transmitted in the following order. That is, first, the parameter data including the program number and its write start address is transmitted, then the program data and its checksum data are transmitted, and finally the end instruction data is transmitted.

【0038】ここで、ステップS63で上述のコマンド
データの受信の「Y」及びステップS64でパラメータ
データの受信が「Y」となると、そのパラメータデータ
の中からプログラム番号を得る(ステップS65)。そ
してそのプログラム番号がどのバンクのフラッシュメモ
リのプログラムに該当するか否かを、RAM18a内の
プログラム定義テーブル18a1を参照して定める。こ
うして定めた受信プログラム番号に該当するフラッシュ
メモリのバンク番号がグループA,Bのどちらに属する
かをステップS66で判断し、グループAに属する場合
はその指定バンク番号に+4を加えたグループBのバン
クを選択する(ステップS67)。また、グループBに
属する場合はその指定バンク番号をそのまま選択しグル
ープAのバンクとする(ステップS68)。
Here, if the reception of the above-mentioned command data is "Y" in step S63 and the reception of parameter data is "Y" in step S64, a program number is obtained from the parameter data (step S65). Then, it is determined with reference to the program definition table 18a1 in the RAM 18a whether or not the program number corresponds to the program of the flash memory of which bank. In step S66, it is determined whether the bank number of the flash memory corresponding to the reception program number thus determined belongs to group A or B. If it belongs to group A, the bank of group B obtained by adding +4 to the designated bank number Is selected (step S67). If the bank belongs to the group B, the designated bank number is selected as it is and set as the bank of the group A (step S68).

【0039】また、受信したパラメータデータの中から
書き込み先頭アドレスを得て(ステップS69)、この
プログラム先頭アドレス、選択した上述のバンク番号と
ともにプログラム番号に対応してRAM18aのテーブ
ル18a1にセットする(ステップS70)。次いでテ
ーブル18a1にセットされたこれらのデータに対応す
るチェックサムデータをクリア(ステップS71)しス
テップS61に戻る。
A write start address is obtained from the received parameter data (step S69), and is set in the table 18a1 of the RAM 18a along with the program start address and the selected bank number (step S69). S70). Next, the checksum data corresponding to these data set in the table 18a1 is cleared (step S71), and the process returns to step S61.

【0040】次にプログラムデータがセンタ装置2から
送信されてくるが、この受信判断をステップS72で行
う。プログラムデータは128バイトづつ送られてくる
が、これの受信がステップS72で「Y」と判断される
と、ステップS73ではこの128バイト分のプログラ
ムデータのチェックサムを計算し、その末尾2バイト分
をRAM18aのチェックサム領域(2バイト領域)に
加算する(ステップS74)。その後、選択されたバン
ク番号に該当するフラッシュメモリを選択し、選択した
フラッシュメモリの上記書き込み先頭アドレスから順
に、受信した128バイトのプログラムデータを書き込
む(ステップS75)。書き込み終了後、書き込みアド
レスを書き込みバイト数(128バイト)分進める(ス
テップS76)。こうして128バイト分のプログラム
データの受信及び書き込みが終了すると、次の128バ
イト分の同様な受信及び書き込み処理がステップS72
〜S76で実行される。
Next, program data is transmitted from the center device 2, and the reception is determined in step S72. The program data is sent in units of 128 bytes. If the reception of the program data is determined to be "Y" in step S72, a check sum of the 128 bytes of program data is calculated in step S73, and the last 2 bytes of the checksum are calculated. Is added to the checksum area (2-byte area) of the RAM 18a (step S74). After that, the flash memory corresponding to the selected bank number is selected, and the received 128-byte program data is written in order from the write start address of the selected flash memory (step S75). After the writing is completed, the write address is advanced by the number of write bytes (128 bytes) (step S76). When the reception and writing of the program data of 128 bytes are completed in this way, the same reception and writing processing of the next 128 bytes is performed in step S72.
SS76 is executed.

【0041】このようにしてセンタ装置2から送信され
る全てのプログラムデータが受信されフラッシュメモリ
に書き込まれた後、センタ装置2からそのプログラムデ
ータに関するチェックサムデータが送信されてくる。こ
のチェックサムデータが受信されステップS77で
「Y」と判定されると、この受信チェックサムとステッ
プS73,74で計算し加算した受信プログラムデータ
のチェックサムとの一致を比較し(ステップS78)、
これらが一致してステップS79の判定が「Y」となる
と、正常にダウンロードが終了したということで、RA
M18aのテーブル18a1の各データについてのチェ
ックサムを計算してそのテーブル18a1に対応してR
AM18a内にセットする(ステップS80)。
After all the program data transmitted from the center device 2 is received and written into the flash memory in this way, the checksum data relating to the program data is transmitted from the center device 2. If the checksum data is received and determined to be "Y" in step S77, the received checksum is compared with the checksum of the received program data calculated and added in steps S73 and S74 (step S78).
If these match and the determination in step S79 is “Y”, it means that the download has been completed normally,
The checksum of each data of the table 18a1 of M18a is calculated, and R is calculated corresponding to the table 18a1.
It is set in the AM 18a (step S80).

【0042】そして、最後にセンタ装置2から送信され
てくる終了指示データを受信しステップS81で「Y」
なると、ステップS82ではダウンロードの正常終了を
確認のうえ、ステップS83でRAM18aのテーブル
18a1の内容(チェックサムデータも含む)を、特定
のフラッシュメモリ18C4のテーブル18eにコピー
する。その後、ステップS84でRAM18aのテーブ
ル18a1のテーブル値はそのままにしてそのテーブル
データに対応したチェックサムデータのみを破壊し、図
11のステップS48へ戻ってリレーRLを復旧して回
線を開放し終了する。
Finally, the end instruction data transmitted from the center device 2 is received, and "Y" is determined in step S81.
Then, in step S82, after confirming the normal end of the download, in step S83, the contents (including the checksum data) of the table 18a1 of the RAM 18a are copied to the table 18e of the specific flash memory 18C4. Thereafter, in step S84, only the checksum data corresponding to the table data is destroyed while leaving the table value of the table 18a1 in the RAM 18a as it is, and the process returns to step S48 in FIG. 11 to restore the relay RL, release the line, and terminate. .

【0043】この結果、公衆電話機1において再度制御
プログラムのローディングを行うときに、図11のステ
ップS33でRAM18a内のテーブル18a1のチェ
ックサムを含めた内容をチェックした場合ステップS3
4の判断は必ず「N」となり、従って、ステップS40
で特定のフラッシュメモリ18C4内のテーブル18e
の値がRAM18a内のテーブル18a1にコピーされ
ることになる。その後CPU18Aにより実行されるリ
アルタイムOS18b1では、上述したようにこの特定
のフラッシュメモリ18C4内のテーブル18eの値に
基づいて各制御プログラムの実行を管理する。なお、受
信したチェックサムと受信したプログラムデータから演
算したチェックサムとが不一致となる場合は、ステップ
S79で「N」となることから同様にRAM18aのテ
ーブル18a1のデータに対応するチェックサムを破壊
する。
As a result, when the control program is loaded again in the public telephone 1, if the contents including the checksum of the table 18a1 in the RAM 18a are checked in step S33 in FIG. 11, step S3
4 is always "N", so that step S40
And the table 18e in the specific flash memory 18C4
Is copied to the table 18a1 in the RAM 18a. Thereafter, the real-time OS 18b1 executed by the CPU 18A manages the execution of each control program based on the value of the table 18e in the specific flash memory 18C4 as described above. If the received checksum and the checksum calculated from the received program data do not match, "N" is obtained in step S79, so that the checksum corresponding to the data in the table 18a1 of the RAM 18a is similarly destroyed. .

【0044】[0044]

【発明の効果】以上説明したように本発明によれば、セ
ンタ装置から電話回線を介してダウンロードされる制御
プログラムを第1のメモリに格納されたローダープログ
ラムの実行により受信し第1のメモリと異なるアドレス
領域の第2のメモリに格納すると共に、第2のメモリに
格納された制御プログラムを実行してサービスを行う端
末装置において、第2のメモリを各々が同一アドレスで
かつ異なるバンクとなるように複数配置し、かつ複数の
第2のメモリをバンク番号に従って2つのグループに分
けるとともに、第1のメモリ及び第2のメモリと異なる
アドレス領域の第3のメモリに前記制御プログラムの番
号及び第2のメモリのバンク番号を対に記憶したテーブ
ルを設け、前記制御プログラムのダウンロードの前にセ
ンタ装置から送信されるこの制御プログラムの番号及び
書き込みアドレスを受信すると前記テーブルの値に従っ
て第2のメモリのバンク番号を選択し、選択されたバン
ク番号のグループと異なるグループの第2のメモリに対
し、ダウンロードされる制御プログラムを前記書き込み
アドレスに従って格納するようにしたので、大容量のプ
ログラムの書き換えが失敗した場合でも以前にローディ
ングされたプログラムを実行することができる。また、
第2のメモリに対する制御プログラムの格納時に第3の
メモリのテーブルを更新し、かつ更新されたテーブルの
値を特定の第2のメモリにコピーするようにしたので、
特定の第2のメモリにコピーされたテーブル値によりプ
ログラムのローディング及び実行管理を適切に行うこと
ができる。
As described above, according to the present invention, the control program downloaded from the center device via the telephone line is received by executing the loader program stored in the first memory, and the control program is stored in the first memory. In a terminal device which stores in a second memory of a different address area and performs a service by executing a control program stored in the second memory, each of the second memories has the same address and a different bank. And the plurality of second memories are divided into two groups according to the bank number, and the control program number and the second memory are stored in a third memory in an address area different from the first memory and the second memory. A table is stored in which the bank numbers of the memories are stored in pairs, and transmitted from the center device before the control program is downloaded. When the control program number and write address received are selected, the bank number of the second memory is selected according to the value of the table, and the control downloaded to the second memory of a group different from the group of the selected bank number is selected. Since the program is stored in accordance with the write address, the previously loaded program can be executed even when the rewriting of a large-capacity program fails. Also,
When the control program is stored in the second memory, the table of the third memory is updated, and the updated value of the table is copied to the specific second memory.
The loading and execution management of the program can be appropriately performed by the table value copied to the specific second memory.

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

【図1】 本発明のダウンロード方法を適用した公衆電
話機の構成を示すブロック図である。
FIG. 1 is a block diagram showing a configuration of a public telephone to which a download method according to the present invention is applied.

【図2】 上記公衆電話機に対しプログラムをダウンロ
ードするセンタ装置のブロック図である。
FIG. 2 is a block diagram of a center device for downloading a program to the public telephone.

【図3】 公衆電話機の制御部の構成を示すブロック図
である。
FIG. 3 is a block diagram illustrating a configuration of a control unit of the public telephone.

【図4】 上記制御部を構成するCPUのメモリマップ
を示す図である。
FIG. 4 is a diagram showing a memory map of a CPU constituting the control unit.

【図5】 センタ装置及び公衆電話機の要部動作を示す
フローチャートである。
FIG. 5 is a flowchart showing the operation of the main part of the center device and the public telephone.

【図6】 上記CPUの電話機制御動作を示すフローチ
ャートである。
FIG. 6 is a flowchart showing a telephone control operation of the CPU.

【図7】 制御部の第2の構成を示すブロック図であ
る。
FIG. 7 is a block diagram illustrating a second configuration of the control unit.

【図8】 制御部の第2の構成例に基づくCPUのメモ
リマップを示す図である。
FIG. 8 is a diagram showing a memory map of a CPU based on a second configuration example of the control unit.

【図9】 プログラム定義テーブルの書き換え状況を示
す図である。
FIG. 9 is a diagram showing a status of rewriting a program definition table.

【図10】 プログラムが格納される各フラッシュメモ
リのバンク切替状況を示す図である。
FIG. 10 is a diagram showing a bank switching state of each flash memory in which a program is stored.

【図11】 制御部の第2の構成例に基づくCPUの要
部動作を示すフローチャートである。
FIG. 11 is a flowchart illustrating an operation of a main part of the CPU based on a second configuration example of the control unit.

【図12】 制御部の第2の構成例に基づくCPUの要
部動作を示すフローチャートである。
FIG. 12 is a flowchart illustrating an operation of a main part of the CPU based on a second configuration example of the control unit.

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

1…公衆電話機、2…センタ装置、11…着信回路、1
4…データ送受信回路、18,27…制御部、18A…
CPU、18B,18C,18a…RAM、18D,1
8E…EEPROM、18F…EPROM、18b…マ
スクROM、18c1〜18c8…フラッシュメモリ、
18a1,18e…プログラム定義テーブル、21…回
線群、22…回線制御部、L…電話回線(回線)。
DESCRIPTION OF SYMBOLS 1 ... Public telephone, 2 ... Center device, 11 ... Receiving circuit, 1
4. Data transmission / reception circuit, 18, 27 ... control unit, 18A ...
CPU, 18B, 18C, 18a ... RAM, 18D, 1
8E: EEPROM, 18F: EPROM, 18b: Mask ROM, 18c1 to 18c8: Flash memory,
18a1, 18e: Program definition table, 21: Line group, 22: Line control unit, L: Telephone line (line).

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 センタ装置から電話回線を介してダウン
ロードされる制御プログラムを第1のメモリ(18b)
に格納されたローダープログラムの実行により受信し第
1のメモリと異なるアドレス領域の第2のメモリ(18
c)に格納すると共に、第2のメモリに格納された制御
プログラムを実行してサービスを行う端末装置におい
て、 前記第2のメモリを各々が同一アドレスでかつ異なるバ
ンクとなるように複数(18c1〜18c8)配置し、
かつ複数の第2のメモリをバンク番号に従って2つのグ
ループに分けるとともに、第1のメモリ及び第2のメモ
リと異なるアドレス領域の第3のメモリ(18a)に前
記制御プログラムの番号及び第2のメモリのバンク番号
を対に記憶したテーブルを設け、前記制御プログラムの
ダウンロードの前に前記センタ装置から送信されるこの
制御プログラムの番号及び書き込みアドレスを受信する
と前記テーブルの値に従って第2のメモリのバンク番号
を選択し、選択されたバンク番号のグループと異なるグ
ループの第2のメモリに対し、ダウンロードされる制御
プログラムを前記書き込みアドレスに従って格納するこ
とを特徴とするダウンロード方法。
A control program downloaded from a center device via a telephone line is stored in a first memory (18b).
The second memory (18) received by the execution of the loader program stored in the second memory (18) in an address area different from the first memory
c) while executing a control program stored in the second memory and providing a service, wherein a plurality of (18c1 to 18c1) are stored in the second memory so that each has the same address and a different bank. 18c8) Arrange,
In addition, the plurality of second memories are divided into two groups according to the bank number, and the number of the control program and the second memory are stored in the third memory (18a) in an address area different from that of the first memory and the second memory. A table storing the bank numbers of the second memory in pairs, and upon receiving the control program number and the write address transmitted from the center device before the download of the control program, the bank number of the second memory according to the value of the table And storing the downloaded control program in the second memory of a group different from the group of the selected bank number in accordance with the write address.
【請求項2】 請求項1において、 第2のメモリに対する制御プログラムの格納時に前記第
3のメモリのテーブルを更新し、かつ更新されたテーブ
ルの値を特定の第2のメモリ(18c4)にコピーする
ことを特徴とするダウンロード方法。
2. The method according to claim 1, wherein the control unit updates the table of the third memory when the control program is stored in the second memory, and copies the updated value of the table to a specific second memory (18c4). Download method.
JP2000235360A 1995-03-29 2000-08-03 How to download Expired - Fee Related JP3475920B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000235360A JP3475920B2 (en) 1995-03-29 2000-08-03 How to download

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP7140395 1995-03-29
JP7-71403 1995-03-29
JP2000235360A JP3475920B2 (en) 1995-03-29 2000-08-03 How to download

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP02390296A Division JP3152144B2 (en) 1995-03-29 1996-02-09 How to download

Publications (2)

Publication Number Publication Date
JP2001101007A true JP2001101007A (en) 2001-04-13
JP3475920B2 JP3475920B2 (en) 2003-12-10

Family

ID=26412504

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000235360A Expired - Fee Related JP3475920B2 (en) 1995-03-29 2000-08-03 How to download

Country Status (1)

Country Link
JP (1) JP3475920B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003303112A (en) * 2002-04-10 2003-10-24 Daikin Ind Ltd Equipment management device and equipment management system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003303112A (en) * 2002-04-10 2003-10-24 Daikin Ind Ltd Equipment management device and equipment management system

Also Published As

Publication number Publication date
JP3475920B2 (en) 2003-12-10

Similar Documents

Publication Publication Date Title
JP3152144B2 (en) How to download
JP3475920B2 (en) How to download
CA2103302C (en) Key telephone system
CN1192642C (en) Method for updating subscriber-related data in telecommunication network
JPH09508732A (en) Backup method for device settings
JP2001125789A (en) Program download method
JP3226566B2 (en) Electronic exchange system
KR100216352B1 (en) Charging data duplication method using database in switching system
JP3359226B2 (en) Electronic exchange system
JP2878269B1 (en) Base station monitoring device
JP3001558B1 (en) Fax modem equipment
JP2810839B2 (en) Connection control device
JPH05191535A (en) Public telephone set
JPS6054557A (en) Management system of subscriber data
JP3214434B2 (en) Communication terminal program rewriting device and relay device
JP2972210B2 (en) Time switch control method
JPS58181387A (en) File replacing system
CN1148768A (en) Unloading method
JP2915460B2 (en) Call forward system in private branch exchange
JP3450149B2 (en) Transmission line expansion method
JPH08274893A (en) Management method for set data
JP2000278730A (en) Method for erasing data in flash memory
JP2000183999A (en) Communication controller, communication control method and storage medium
JPH0730644A (en) Telephone exchange system
JPH0759129A (en) Loading system and addressing system

Legal Events

Date Code Title Description
S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080926

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080926

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090926

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090926

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100926

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100926

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110926

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110926

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120926

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130926

Year of fee payment: 10

LAPS Cancellation because of no payment of annual fees