JP3131854B2 - One-chip microcomputer - Google Patents

One-chip microcomputer

Info

Publication number
JP3131854B2
JP3131854B2 JP04248671A JP24867192A JP3131854B2 JP 3131854 B2 JP3131854 B2 JP 3131854B2 JP 04248671 A JP04248671 A JP 04248671A JP 24867192 A JP24867192 A JP 24867192A JP 3131854 B2 JP3131854 B2 JP 3131854B2
Authority
JP
Japan
Prior art keywords
chip microcomputer
main cpu
signal
output
input
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.)
Expired - Fee Related
Application number
JP04248671A
Other languages
Japanese (ja)
Other versions
JPH0675932A (en
Inventor
理博 坂本
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP04248671A priority Critical patent/JP3131854B2/en
Publication of JPH0675932A publication Critical patent/JPH0675932A/en
Application granted granted Critical
Publication of JP3131854B2 publication Critical patent/JP3131854B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Multi Processors (AREA)
  • Microcomputers (AREA)
  • Hardware Redundancy (AREA)

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、ワンチップマイコン、
特にオペレーティングシステムのメインCPUにより制
御される所謂スレーブ型ワンチップマイコンに関する
The present invention relates to a one-chip microcomputer,
In particular to a so-called slave one-chip microcontroller which is controlled by the operating system of the main CPU.

【0002】[0002]

【従来の技術】所謂スレーブ型のワンチップマイコンで
は、一つのチップ上にALU、ROM、RAM、レジス
タ、メインCPUとのインターフェース、インポート及
びアウトポート(以下I/O部という)が設けてあり、
メインCPUは、コマンドによつて該ワンチップマンコ
ンの制御を行っている。また、この種のワンチップマイ
コンでは、その性能や適用範囲を高めるために、I/O
部の機能に工夫がこらされているが、ワンチップマイコ
ンでは、自己の制御プログラムに従って、このI/O部
などの制御を行っている。
2. Description of the Related Art In a so-called slave type one-chip microcomputer, an ALU, a ROM, a RAM, a register, an interface with a main CPU, an import and an out port (hereinafter referred to as an I / O unit) are provided on one chip.
The main CPU controls the one-chip man-con with a command. In addition, this type of one-chip microcomputer uses I / O to improve its performance and application range.
Although the functions of the units are devised, the one-chip microcomputer controls the I / O unit and the like according to its own control program.

【0003】一方、ワンチップマイコンを用いて、オペ
レーティングシステム内の各種の電子装置の動作を制御
する制御装置が開発されているが、従来のこの種の制御
装置では、ワンチップマイコンは、メインCPUからの
コマンドによる制御の下で、自己のプログラムにより、
当該電子装置の動作状態を検知してその制御を行ってい
る。
On the other hand, a control device for controlling the operation of various electronic devices in an operating system using a one-chip microcomputer has been developed. In this type of conventional control device, the one-chip microcomputer is a main CPU. Under the control of commands from
The operation state of the electronic device is detected and controlled.

【0004】[0004]

【発明が解決しようとする課題】従来のスレーブ型のワ
ンチップマイコンでは、ワンチップマイコンのI/O部
の出力制御や入力制御は、ワンチップマイコン自体でし
か行うことができず、オペレーティングシステムのメイ
ンCPUに、この制御を行わせようとすると、CPUと
ワンチップマイコンとの間で、コマンドの授受を行うこ
とが必要になる。このために、従来のワンチップマイコ
ンのI/O部の制御をCPUで行わせようとすると、
(1)ソフトウエア設計上で大きな障害が生じる、
(2)CPUによるI/O部のアクセスに時間がかか
り、高速アクセス化が困難である、(3)CPUによる
I/O部のアクセスは、ワンチップマイコンのI/O部
に空きがあっても、別のハードウエアが必要で、装置が
大型化し製造コスト上でも問題が生じる、(4)ワンチ
ップマイコンが異常状態になると、ワンチップマイコン
のI/O部の制御は不能になるという問題が発生する。
In the conventional slave type one-chip microcomputer, output control and input control of the I / O section of the one-chip microcomputer can be performed only by the one-chip microcomputer itself. In order to cause the main CPU to perform this control, it is necessary to exchange commands between the CPU and the one-chip microcomputer. For this reason, if the CPU controls the I / O unit of the conventional one-chip microcomputer,
(1) A major obstacle occurs in software design.
(2) It takes time for the CPU to access the I / O unit, and it is difficult to achieve a high-speed access. (3) The access to the I / O unit by the CPU requires a vacancy in the I / O unit of the one-chip microcomputer. However, another hardware is required, the device becomes large, and there is a problem in manufacturing cost. (4) If the one-chip microcomputer becomes abnormal, control of the I / O unit of the one-chip microcomputer becomes impossible. Occurs.

【0005】また、前述の従来の制御装置では、ワンチ
ップマイコンが異常状態になると、電子装置の正常な制
御ができなくなり、オペレーティングシステムが異常動
作状態になる。
In the above-described conventional control device, when the one-chip microcomputer is in an abnormal state, the electronic device cannot be normally controlled, and the operating system is in an abnormal operation state.

【0006】本発明は、前述したようなこの種のワンチ
ップマイコンの現状に鑑みてなされたものであり、その
目的は、入出力アクセスが、ワンチップマイコン側とメ
インCPU側との両方から行えるワンチップマイコンを
提供することにある
[0006] The present invention has been made in view of the current situation of this kind of one-chip microcomputer as described above, the
An object of the present invention is to provide a one-chip microcomputer in which input / output access can be performed from both the one-chip microcomputer and the main CPU.

【0007】[0007]

【課題を解決するための手段】前記目的を達成するため
に、本発明は、オペレーティングシステムのメインCP
Uにより制御されるワンチップマイコンにおいて、前記
ワンチップマイコンの制御部と、前記ワンチップマイコ
ンと外部とのデータの入出力を行う入出力部と、前記制
御部と前記入出力部とを接続する第1の接続部と、前記
入出力部と前記メインCPUとを接続する第2の接続部
とを備え、前記メインCPUが前記ワンチップマイコン
内の入出力部に直接アクセスできるように構成されてい
る。
To achieve SUMMARY OF for the] said object, the present invention includes a main CP operating system
In one-chip microcomputer which is controlled by the U, the
The control unit of the one-chip microcomputer and the one-chip microcomputer
An input / output unit for inputting / outputting data between the external device and the outside;
A first connection unit connecting the control unit and the input / output unit;
Second connection unit for connecting the input / output unit and the main CPU
Wherein the main CPU is the one-chip microcomputer
It is configured to be able to directly access the input / output unit inside .

【0008】[0008]

【0009】[0009]

【作用】このような構成によると、本発明に係るワンチ
ップマイコンでは、メインCPUがワンチップマイコン
内の入出力部に直接アクセスできるので、ワンチップマ
イコンの入出力アクセスは、ワンチップマイコン側とメ
インCPU側との両方から行われる。
According to such a configuration , in the one-chip microcomputer according to the present invention, the main CPU is a one-chip microcomputer.
Since the input / output unit in the inside can be directly accessed, the input / output access of the one-chip microcomputer is performed from both the one-chip microcomputer side and the main CPU side.

【0010】また、メインCPUからの異常を示す出力
信号に基づき、前記ワンチップマイコンの出力信号の論
理値を変更するので、オペレーティングシステムの異常
の排除が可能になる。
Also, an output indicating an abnormality from the main CPU is provided.
The output signal of the one-chip microcomputer is discussed based on the signal.
Operating system abnormalities
Can be eliminated.

【0011】[0011]

【実施例】以下、本発明の実施例を画面を参照して説明
する。先ず、本発明に係るワンチップマイコンの第1の
実施例を、図1乃至図3を参照して説明する。ここで、
図1は第1の実施例の基本構成を示すブロック図、図2
は第1の実施例の内部構成と該第1の実施例に係るスレ
ーブマイコンを組込んだシステムの構成を示すブロック
図、図3は第1の実施例の動作を示すタイミングチャー
トである。
Embodiments of the present invention will be described below with reference to screens. First, a first embodiment of a one-chip microcomputer according to the present invention will be described with reference to FIGS. here,
FIG. 1 is a block diagram showing the basic configuration of the first embodiment, and FIG.
3 is a block diagram showing the internal configuration of the first embodiment and the configuration of a system incorporating the slave microcomputer according to the first embodiment. FIG. 3 is a timing chart showing the operation of the first embodiment.

【0012】図1において、5はワンチップマイコンで
あり、このワンチップマイコン5は、内部のデータ信
号、アドレス信号及びチップセレクト信号のためのコン
トロールバス5a(第1の接続部)を備えている。そし
て、このコントロールバス5aに対して、二系統のクロ
ック信号が入力されるDフリップフロップからなるアウ
トポート12(入出力部)、二系列のイネーブル信号が
入力されるトライステートバッファ群よりなるインポー
ト13(入出力部)及び制御動作を行うバスコントロー
ラ6(第2の接続部)が、互いに信号の授受が可能に接
続してある。また、バスコントローラ6は、外部のデー
タ信号、アドレス信号、チップセレクト信号及びリード
・ライト信号のためのコントロールバス6aに接続して
ある。図2に示すように、実際にはワンチップマイコン
5に、ALU10(制御部)、レジスタ7、ROM8及
びRAM9がさらに設けてある。そして、このような構
成のワンチップマイコン5が、コントロールバス6aを
介して、オペレーティングシステムの動作を制御するメ
インCPU1、該動作の制御プログラムを格納したRO
M2、該動作時に各種のデータが書込まれ、或いは、読
出されるRAM3及び該動作時にメインCPU1の直接
アクセス動作に使用されるI/O部4に接続してある。
このI/O部4は、ワンチップマイコン5によっては、
不要となることがある。
In FIG. 1, reference numeral 5 denotes a one-chip microcomputer. The one-chip microcomputer 5 has a control bus 5a (first connection portion) for internal data signals, address signals and chip select signals. . The control bus 5a has an out port 12 (input / output unit) composed of a D flip-flop to which two clock signals are inputted, and an import 13 composed of a tri-state buffer group to which two series of enable signals are inputted. The (input / output unit) and the bus controller 6 (second connection unit) for performing a control operation are connected to each other so as to be able to exchange signals. The bus controller 6 is connected to a control bus 6a for external data signals, address signals, chip select signals, and read / write signals. As shown in FIG. 2, the one-chip microcomputer 5 is actually further provided with an ALU 10 (control unit) , a register 7, a ROM 8, and a RAM 9. Then, the one-chip microcomputer 5 having such a configuration is connected to the main CPU 1 for controlling the operation of the operating system via the control bus 6a, and the RO for storing the control program for the operation.
M2, a RAM 3 to which various data is written or read during the operation, and an I / O unit 4 used for a direct access operation of the main CPU 1 during the operation.
This I / O unit 4 is, depending on the one-chip microcomputer 5,
May be unnecessary.

【0013】次に、第1実施例の動作を図1、図2、お
よび図3のタイミングチャートを使用して説明する。先
ず、ワンチップマイコン5内部でのアウトポート12へ
の出力時には、バスコントローラ6よりWRI信号が、
Dフリップフロップ群からなるアウトポート12に供給
されると、図3に示すようにWRI信号の立ち上がりエ
ッジに同期してコントロールバス5aのデータバス上の
データが、アウトポート12のDフリップフロップに書
込まれて出力される。また、メインCPU1によるアウ
トポート12からの出力時には、コントロールバス6a
を介するCPU1からの信号に応じて、バスコントロー
ラ6よりWR信号が、アウトポート12のDフリップフ
ロップ群に供給されると、その立ち上がりエッジに同期
して、コントロールバス6aのデータバス上のデータ信
号が、コントロールバス5aのデータバスを介して、ア
ウトポート12のDフリップフロップ群に書込まれて出
力される。
Next, the operation of the first embodiment will be described with reference to the timing charts of FIGS. 1, 2 and 3. First, at the time of output to the out port 12 inside the one-chip microcomputer 5, the WRI signal is
When supplied to the out port 12 composed of a group of D flip-flops, data on the data bus of the control bus 5a is written to the D flip-flop of the out port 12 in synchronization with the rising edge of the WRI signal as shown in FIG. Output. When the main CPU 1 outputs data from the out port 12, the control bus 6a
When the WR signal is supplied from the bus controller 6 to the D flip-flop group of the out port 12 in response to a signal from the CPU 1 via the CPU 1, the data signal on the data bus of the control bus 6a is synchronized with the rising edge thereof. Is written to the D flip-flop group of the out port 12 via the data bus of the control bus 5a and output.

【0014】さらに、ワンチップマイコン5内部でのイ
ンポート13からの入力時には、バスコントローラ6か
らRDI信号が、インポート13のトライステートバッ
ファ群に供給されると、インポート13への入力13a
が、コントロールバス5aのデータバス上に出力され
る。一方、メインCPU1によるインポート13からの
入力時には、コントロールバス6aを介するCPU1か
らの信号に応じて、バスコントローラ6よりRD信号
が、インポート13のトライステートバッファ群に供給
されると、インポート13への入力13aが、コントロ
ールバス5aのデータバス、バスコントローラ6を介し
てコントロールバス6aのデータバス上に出力される。
Further, at the time of input from the import 13 inside the one-chip microcomputer 5, when the RDI signal is supplied from the bus controller 6 to the tristate buffer group of the import 13, the input 13a to the import 13
Is output on the data bus of the control bus 5a. On the other hand, at the time of input from the import 13 by the main CPU 1, when an RD signal is supplied from the bus controller 6 to the tri-state buffer group of the import 13 in response to a signal from the CPU 1 via the control bus 6a, the import 13 The input 13a is output on the data bus of the control bus 6a via the data bus of the control bus 5a and the bus controller 6.

【0015】次に、本発明に係るワンチップマイコンの
第2の実施例を、図4及び図5を参照して説明する。こ
こで、図4は第2の実施例の基本構成を示すブロック
図、図5は第2の実施例の要部の内部構成を示すブロッ
ク図である。
Next, a second embodiment of the one-chip microcomputer according to the present invention will be described with reference to FIGS. Here, FIG. 4 is a block diagram showing a basic configuration of the second embodiment, and FIG. 5 is a block diagram showing an internal configuration of a main part of the second embodiment.

【0016】すでに説明した第1の実施例では、ワンチ
ップマイコン5のアウトポート12のDフリップフロッ
プと、インポート13のトライステートバッファ群と
に、それぞれ二系統のクロック信号及びイネーブル信号
が入力されたが、第2の実施例では、図4に示すよう
に、アウトポート12のDフリップフロップと、インポ
ート13のトライステートバッファとに、それぞれ一系
統のクロック信号及びイネーブル信号が入力されるよう
な構成にしてある。このために、例えば、図5に示すよ
うに、バスコントローラ6において、ワンチップマイコ
ン5の内部の信号FIと外部からの信号FOとのAND
回路14、15での論理積演算によつて、WR信号とR
D信号とが演算されている。第2の実施例では、AND
回路14、15の出力信号の論理値によって、チップマ
イコン5内の処理かチップマイコン5外での処理かが判
定され、第1の実施例と同様の動作が行われる。
In the first embodiment already described, two clock signals and two enable signals are input to the D flip-flop of the out port 12 of the one-chip microcomputer 5 and the tri-state buffer group of the import 13, respectively. However, in the second embodiment, as shown in FIG. 4, a configuration in which one system of clock signal and one enable signal are input to the D flip-flop of the out port 12 and the tri-state buffer of the import 13, respectively. It is. For this purpose, for example, as shown in FIG. 5, the bus controller 6 performs an AND operation between the signal FI inside the one-chip microcomputer 5 and the signal FO from the outside.
By the AND operation in the circuits 14 and 15, the WR signal and R
D signal is calculated. In the second embodiment, AND
Whether the processing is inside the chip microcomputer 5 or outside the chip microcomputer 5 is determined based on the logical values of the output signals of the circuits 14 and 15, and the same operation as in the first embodiment is performed.

【0017】このように、本発明に係るワンチップマイ
コンの第1、第2実施例によると、メインCPU1が、
ワンチップマイコン5のアウトポート12とインポート
13とを直接アクセスすることができ、別途にI/O部
を設けることが不要になって、ワンチップマイコンを含
む装置を大型化せずに製造コスト上も有利に提供するこ
とができ、該ワンチップマイコンでは、メインCPU1
によって高アクセス速度で、入出力アクセスを行うこと
が可能になる。
As described above, according to the first and second embodiments of the one-chip microcomputer according to the present invention, the main CPU 1
The out port 12 and the import 13 of the one-chip microcomputer 5 can be directly accessed, so that it is not necessary to provide an I / O unit separately. The one-chip microcomputer has a main CPU 1
This enables input / output access at a high access speed.

【0018】次に、本発明に係るワンチップマイコンを
備えた制御装置の第1の実施例を、図6乃至図8を参照
して説明する。ここで、図6は第1の実施例の構成を示
すフロック図、図7は第1の実施例の動作のフローチャ
ート、図8は第1の実施例の動作のタイムチャートであ
る。
Next, a first embodiment of a control device having a one-chip microcomputer according to the present invention will be described with reference to FIGS. Here, FIG. 6 is a block diagram showing the configuration of the first embodiment, FIG. 7 is a flowchart of the operation of the first embodiment, and FIG. 8 is a time chart of the operation of the first embodiment.

【0019】図6に示すように、第1の実施例では、ワ
ンチップマイコン5のアウトポート12が、ウオッチド
ッグタイマ18のクロック入力端子Cに接続してあり、
ウオッチドッグタイマ18の出力端子が、メインCPU
1とワンチップマイコン5とに接続してある。図示はし
ていないが、第1の実施例ではメインCPU1により制
御され作動するワンチップマイコン5には、電子装置が
接続してあり、この電子装置の動作がワンチップマイコ
ン5により制御されている。
As shown in FIG. 6, in the first embodiment, the out port 12 of the one-chip microcomputer 5 is connected to the clock input terminal C of the watch dog timer 18,
The output terminal of the watchdog timer 18 is connected to the main CPU
1 and a one-chip microcomputer 5. Although not shown, an electronic device is connected to the one-chip microcomputer 5 controlled and operated by the main CPU 1 in the first embodiment, and the operation of the electronic device is controlled by the one-chip microcomputer 5. .

【0020】また、第1の実施例では、図7(a)に示
すように、メインCPU1のプログラム中にスタート後
にステップS19で、ワンチップマイコン5のアウトポ
ート12の信号の論理値を“H”にする制御が設けてあ
る。同様に、同図(b)に示すように、ワンチップマイ
コン5のプログラム中にスタート後のステップS20
で、アウトポート12の信号の論理値を“L”にする制
御が設けてある。これらの制御は、図8(a)(b)に
示すように、互いに時間的に重ならないように設定して
ある。
In the first embodiment, as shown in FIG. 7A, after starting during the program of the main CPU 1, in step S19, the logical value of the signal of the out port 12 of the one-chip microcomputer 5 is set to "H". "Is provided. Similarly, as shown in FIG. 5B, during the program of the one-chip microcomputer 5, the step S20 after the start is executed.
Thus, control is provided to set the logical value of the signal of the out port 12 to "L". These controls are set so that they do not overlap with each other as shown in FIGS.

【0021】このような構成により、プログラムが暴走
していない正常動作時には、ウオッチドッグタイマ18
のクロック入力端子Cには、図8(c)のタイミングチ
ャートに示すようなクロック信号が供給される。この状
態から、メインCPU1のプログラムが暴走すると、同
図(c)の信号は論理値“L”に固定され、また、ワン
チップマイコン5のプログラムが暴走すると、前記
(c)の信号は論理値“H”に固定される。さらに、メ
インCPU1とワンチップマイコン5のブログラムが共
に暴走した時には、前記(c)の信号はワンチップマイ
コン5のアクセス時から、論理値“H”に固定される。
このような状態になると、ウオッチドッグタイマ18か
らは、ウオッチドッグ信号が出力され、このウオッチド
ッグ信号は、CPU1とワンチップマイコン5とに、リ
セット信号或いはNMI信号(ノンマスカブルインタラ
プト信号)として入力され、オペレーティングシステム
のプログラム暴走排除のための復帰動作が行われる。
With this configuration, the watchdog timer 18 can be used during normal operation in which the program does not run away.
A clock signal as shown in the timing chart of FIG. In this state, if the program of the main CPU 1 goes out of control, the signal in FIG. 9C is fixed at the logical value "L". If the program in the one-chip microcomputer 5 goes out of control, the signal in FIG. Fixed to “H”. Further, when the programs of the main CPU 1 and the one-chip microcomputer 5 both run out of control, the signal (c) is fixed to the logical value “H” from the time of the access of the one-chip microcomputer 5.
In this state, a watchdog signal is output from the watchdog timer 18, and the watchdog signal is input to the CPU 1 and the one-chip microcomputer 5 as a reset signal or an NMI signal (non-maskable interrupt signal). A return operation is performed to eliminate the program runaway of the operating system.

【0022】次に、本発明に係るワンチップマイコンを
備えた制御装置の第2の実施例を、図9乃至図12を参
照して説明する。ここで、図9は第2の実施例の構成を
示すブロック図、図10乃至図12は第2の実施例の動
作を示すフローチャートである。
Next, a second embodiment of the control device provided with the one-chip microcomputer according to the present invention will be described with reference to FIGS. Here, FIG. 9 is a block diagram showing the configuration of the second embodiment, and FIGS. 10 to 12 are flowcharts showing the operation of the second embodiment.

【0023】この第2の実施例は、本発明に係るワンチ
ップマイコンを備え、ファクシミリ装置やプリンタ装置
のサーマルヘッドの印字コントロールを行うものであ
り、オペレーティングシステム全体の制御をするメイン
CPU1に、ワンチップマイコン5が接続してある。こ
のワンチップマイコン5のアウトポート12には、印字
動作を行うサーマルヘッド21が接続してあり、サーマ
ルヘッド21のサーミスタ24が、AD変換器22を介
してワンチップマイコン5のインポート13に接続して
ある。この場合、AD変換器22を別体で設けず、図9
に点線で示すように、ワンチップマイコン5にAD変換
器23を内蔵し、AD変換器23の出力信号をメインC
PU1が取込み可能にしてもよい。
The second embodiment is provided with a one-chip microcomputer according to the present invention and controls printing of a thermal head of a facsimile machine or a printer. A main CPU 1 for controlling the entire operating system includes a one-chip microcomputer. The chip microcomputer 5 is connected. A thermal head 21 for performing a printing operation is connected to an out port 12 of the one-chip microcomputer 5. A thermistor 24 of the thermal head 21 is connected to an import 13 of the one-chip microcomputer 5 via an AD converter 22. It is. In this case, the AD converter 22 is not provided separately, and FIG.
As shown by a dotted line, an A / D converter 23 is built in the one-chip microcomputer 5, and the output signal of the A / D converter 23 is
PU1 may be able to capture.

【0024】第2の実施例においてワンチップマイコン
5は、メインCPU1から印字コマンドを受け取ると、
サーマルヘッド21へストローブ信号を印加して印字動
作を行わせるが、この時サーミスタ24の抵抗値の変化
による温度情報が、AD変換器22でディジタル信号に
変換されて、ワンチップマイコン5のインポート13に
入力される。また、ワンチップマイコン5には、前記温
度情報の他にも、メインCPU1からの印字コマンド内
の各種のパラメータや、印字コマンドの周期情報など
が、情報信号として入力され、ワンチップマイコン5で
は、これらの情報信号に基づいて、ストローブ信号の幅
を制御して、印字濃度を一定に保持し、サーマルヘッド
21の温度が、許容設定値を越えないような制御を行
う。
In the second embodiment, when the one-chip microcomputer 5 receives a print command from the main CPU 1,
A printing operation is performed by applying a strobe signal to the thermal head 21. At this time, the temperature information due to the change in the resistance value of the thermistor 24 is converted into a digital signal by the AD converter 22, and the input signal of the one-chip microcomputer 5 is imported. Is input to In addition to the temperature information, various parameters in the print command from the main CPU 1 and information on the cycle of the print command are input to the one-chip microcomputer 5 as information signals. Based on these information signals, the width of the strobe signal is controlled to keep the print density constant, and control is performed so that the temperature of the thermal head 21 does not exceed the allowable set value.

【0025】この場合、何らかの外乱が発生してワンチ
ップマイコン5のブログラムが暴走してしまうと、スト
ローブ幅の制御が正しく行われなくなり、限度を越える
幅のストローブ信号の印加が生じて印字品質が低下し、
許容限度を越えてサーマルヘッド21の温度が上昇し
て、サーマルヘッド21が破壊することがあった。しか
し、第2の実施例では、図10に示すようにメインCP
U1は、ステップS31で印字コマンドをワンチップマ
イコン5に送出すると、ステップS32で一定時間(サ
ーマルヘッドのストローブ信号の許容幅に対応する時
間)待機した後で、ステップS33でストローブ信号を
オフにする制御を行う。このために、ワンチップマイコ
ン5が暴走しても、ストローブ信号はオフとなるので、
サーマルヘッドが破壊することが防止される。
In this case, if any disturbance occurs and the program of the one-chip microcomputer 5 runs away, control of the strobe width is not performed correctly, and a strobe signal having a width exceeding the limit is applied, resulting in print quality. Decreases,
In some cases, the temperature of the thermal head 21 exceeded the allowable limit and the thermal head 21 was destroyed. However, in the second embodiment, as shown in FIG.
When U1 sends a print command to the one-chip microcomputer 5 in step S31, U1 waits for a predetermined time (time corresponding to the allowable width of the strobe signal of the thermal head) in step S32, and then turns off the strobe signal in step S33. Perform control. For this reason, even if the one-chip microcomputer 5 runs away, the strobe signal is turned off.
Destruction of the thermal head is prevented.

【0026】また、図11に示すように、第2の実施例
では、メインCPU1がステップS41で、AD変換器
22からのサーマルヘッド21の温度情報を、インポー
ト13を介して受信すると、ステップS42でサーマル
ヘッド21の温度が、予め設定した許容値に達したかど
うかが判定される。そして、ステップS42の判定がY
ESであると、メインCPU1は、ステップS43でス
トローブ信号をオフにする制御を行うので、ワンチップ
マイコン5が暴走しても、サーマルヘッドが破壊するこ
とが防止される(AD変換部23が、ワンチップマイコ
ン5に内蔵されている場合も、メインCPU1がAD変
換部23のデータを読取り可能にして置いて、同様の制
御を行わせる)。さらに、第2の実施例では、メインC
PU1とワンチップマイコン5とのコマンドの授受時
に、メインCPU1からワンチップマイコン5へのコマ
ンドが送出されると、ワンチップマイコン5は必ず当該
コマンドに対するレスポンスをメインCPU1に返送す
るように取り決めてある。このために、図12に示すよ
うに、ステップS51でメインCPU1からコマンドが
送出された場合、ステップS52の判定で、ワンチップ
マイコン5からのレスポンスがないと判定すると、メイ
ンCPU1は、ステップS53でストローブ信号をオフ
にする制御を行うので、ワンチップマイコン5が暴走し
ても、サーマルヘッドが破壊することが防止される。
As shown in FIG. 11, in the second embodiment, when the main CPU 1 receives the temperature information of the thermal head 21 from the AD converter 22 via the import 13 in step S41, the main CPU 1 proceeds to step S42. It is determined whether the temperature of the thermal head 21 has reached a preset allowable value. Then, the determination in step S42 is Y
If it is ES, the main CPU 1 performs control to turn off the strobe signal in step S43, so that even if the one-chip microcomputer 5 runs away, the thermal head is prevented from being destroyed (the AD conversion unit 23 is Even in the case where it is built in the one-chip microcomputer 5, the main CPU 1 makes the data of the AD conversion unit 23 readable so as to perform the same control). Further, in the second embodiment, the main C
When a command is sent from the main CPU 1 to the one-chip microcomputer 5 when a command is exchanged between the PU 1 and the one-chip microcomputer 5, the one-chip microcomputer 5 always arranges to return a response to the command to the main CPU 1. . For this reason, as shown in FIG. 12, when a command is sent from the main CPU 1 in step S51, if it is determined in step S52 that there is no response from the one-chip microcomputer 5, the main CPU 1 proceeds to step S53. Since the control for turning off the strobe signal is performed, even if the one-chip microcomputer 5 runs away, the thermal head is prevented from being broken.

【0027】このように、本発明に係るワンチップマイ
コンを備えた制御装置の第1、第2実施例によると、メ
インCPU1及びワンチップマイコン5が組み込まれた
オペレーティングシステムに異常が発生すると、メイン
CPU1の出力信号に基づいて、ワンチップマイコン5
の出力信号の論理値を変更することにより、オペレーテ
ィングシステムの異常を復旧し、或いはオペレーティン
グの動作を停止させて、当該異常を排除することができ
る。
As described above, according to the first and second embodiments of the control device including the one-chip microcomputer according to the present invention, when an abnormality occurs in the operating system in which the main CPU 1 and the one-chip microcomputer 5 are incorporated, the One-chip microcomputer 5 based on the output signal of CPU 1
By changing the logical value of the output signal, the abnormality of the operating system can be recovered or the operation of the operating system can be stopped to eliminate the abnormality.

【0028】[0028]

【発明の効果】以上に説明したように、本発明による
と、メインCPUがワンチップマイコン内の入出力部に
直接アクセスできるように構成されているので、ワンチ
ップマイコンの入出力アクセスが、ワンチップマイコン
側とメインCPU側との双方から行え、その結果、専用
のハードウェアを設けることが不要で装置設計の自由度
が大きくなり、小型化され且つ高アクセス速度で作動す
るワンチップマイコンを備えた装置が、低製造コストで
提供される。
As described above, according to the present invention, the main CPU is connected to the input / output unit in the one-chip microcomputer.
Because it is configured to allow direct access , input / output access of the one-chip microcomputer can be performed from both the one-chip microcomputer side and the main CPU side . As a result, there is no need to provide dedicated hardware and the freedom of device design An apparatus having a one-chip microcomputer which is increased in size, miniaturized, and operates at a high access speed is provided at a low manufacturing cost.

【0029】また、本発明によると、メインCPUから
の異常を示す出力信号に基づき、ワンチップマイコンの
出力信号の論理値を変更するので、オペレーティングシ
ステムの異常の排除が可能になる。
Also, according to the present invention, from the main CPU
Of the one-chip microcomputer based on the output signal
Since the logical value of the output signal is changed, it is possible to eliminate an abnormality in the operating system.

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

【図1】本発明に係るワンチップマイコンの第1の実施
例の基本構成を示すブロック図である。
FIG. 1 is a block diagram showing a basic configuration of a first embodiment of a one-chip microcomputer according to the present invention.

【図2】本発明に係るワンチップマイコンの第1の実施
例の内部構成と第1の実施例をスレーブマイコンとする
システムの構成を示すブロック図である。
FIG. 2 is a block diagram showing the internal configuration of a first embodiment of a one-chip microcomputer according to the present invention and the configuration of a system in which the first embodiment is a slave microcomputer.

【図3】本発明に係るワンチップマイコンの第1の実施
例の動作を示すタイミングチャートである。
FIG. 3 is a timing chart showing the operation of the first embodiment of the one-chip microcomputer according to the present invention.

【図4】本発明に係るワンチップマイコンの第2の実施
例の基本構成を示すブロック図である。
FIG. 4 is a block diagram showing a basic configuration of a second embodiment of the one-chip microcomputer according to the present invention.

【図5】本発明に係るワンチップマイコンの第2の実施
例の要部の内部構成を示すブロック図である。
FIG. 5 is a block diagram showing an internal configuration of a main part of a one-chip microcomputer according to a second embodiment of the present invention.

【図6】本発明に係るワンチップマイコンを備えた制御
装置の第1の実施例の構成を示すブロック図である。
FIG. 6 is a block diagram illustrating a configuration of a first embodiment of a control device including a one-chip microcomputer according to the present invention.

【図7】本発明に係るワンチップマイコンを備えた制御
装置の第1の実施例の動作を示すフローチャートであ
る。
FIG. 7 is a flowchart showing the operation of the first embodiment of the control device including the one-chip microcomputer according to the present invention.

【図8】本発明に係るワンチップマイコンを備えた制御
装置の第1の実施例の動作を示すタイミングチャートで
ある。
FIG. 8 is a timing chart showing the operation of the first embodiment of the control device including the one-chip microcomputer according to the present invention.

【図9】本発明に係るワンチップマイコンを備えた制御
装置の第2の実施例の構成を示すブロック図である。
FIG. 9 is a block diagram showing a configuration of a second embodiment of the control device including the one-chip microcomputer according to the present invention.

【図10】本発明に係るワンチップマイコンを備えた制
御装置の第2の実施例の第1の動作のフローチャートで
ある。
FIG. 10 is a flowchart of a first operation of the second embodiment of the control device including the one-chip microcomputer according to the present invention.

【図11】本発明に係るワンチップマイコンを備えた制
御装置の第2の実施例の第2の動作のフローチャートで
ある。
FIG. 11 is a flowchart of a second operation of the second embodiment of the control device including the one-chip microcomputer according to the present invention.

【図12】本発明に係るワンチップマイコンを備えた制
御装置の第2の実施例の第3の動作のフローチャートで
ある。
FIG. 12 is a flowchart of a third operation of the second embodiment of the control device including the one-chip microcomputer according to the present invention.

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

1 メインCPU 2 ROM 3 ROM 4 I/O部 5a コントロールバス 6 バスコントローラ 6a コントロールバス 7 レジスタ 8 ROM 9 RAM 10 ALU 12 アウトポート 13 インポート 18 ウオッチドッグタイマ 21 サーマルヘッド 22 AD変換器 23 AD変換器 24 サーミスタ 1 Main CPU 2 ROM 3 ROM 4 I / O unit 5a Control bus 6 Bus controller 6a Control bus 7 Register 8 ROM 9 RAM 10 ALU 12 Out port 13 Import 18 Watchdog timer 21 Thermal head 22 A / D converter 23 A / D converter 24 Thermistor

───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.7,DB名) G06F 15/17 G06F 11/16 310 G06F 11/30 G06F 15/78 510 ──────────────────────────────────────────────────続 き Continued on the front page (58) Investigated field (Int.Cl. 7 , DB name) G06F 15/17 G06F 11/16 310 G06F 11/30 G06F 15/78 510

Claims (3)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 オペレーティングシステムのメインCP
Uにより制御されるワンチップマイコンにおいて、前記ワンチップマイコンの制御部と、 前記ワンチップマイコンと外部とのデータの入出力を行
う入出力部と、 前記制御部と前記入出力部とを接続する第1の接続部
と、 前記入出力部と前記メインCPUとを接続する第2の接
続部とを備え、 前記メインCPUが前記ワンチップマイコン内の入出力
部に直接アクセスできる ように構成されていることを特
徴とするワンチップマイコン。
1. A main CP of an operating system
A one-chip microcomputer controlled by U controls input / output of data between the one-chip microcomputer control unit and the one-chip microcomputer and the outside.
Input / output unit, and a first connection unit connecting the control unit and the input / output unit
And a second connection for connecting the input / output unit and the main CPU.
A main unit connected to the one-chip microcomputer.
A one-chip microcomputer characterized by being configured to directly access the unit .
【請求項2】 前記入出力部に印字装置が接続され、 前記ワンチップマイコンはAD変換器を更に有し、 前記AD変換器の出力信号が前記メインCPUへ出力さ
れる ことを特徴とする請求項1に記載のワンチップマイ
コン。
2. A printer is connected to the input / output unit, the one-chip microcomputer further has an AD converter, and an output signal of the AD converter is output to the main CPU.
One-chip microcomputer according to claim 1, characterized in that it is.
【請求項3】 前記メインCPUからの異常を示す出力
信号に基づき、前記ワンチップマイコンの出力信号の論
理値を変更することを特徴とする請求項1又は2に記載
のワンチップマイコン。
3. An output indicating an abnormality from the main CPU.
The output signal of the one-chip microcomputer is discussed based on the signal.
The one-chip microcomputer according to claim 1, wherein a logical value is changed .
JP04248671A 1992-08-25 1992-08-25 One-chip microcomputer Expired - Fee Related JP3131854B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP04248671A JP3131854B2 (en) 1992-08-25 1992-08-25 One-chip microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP04248671A JP3131854B2 (en) 1992-08-25 1992-08-25 One-chip microcomputer

Publications (2)

Publication Number Publication Date
JPH0675932A JPH0675932A (en) 1994-03-18
JP3131854B2 true JP3131854B2 (en) 2001-02-05

Family

ID=17181608

Family Applications (1)

Application Number Title Priority Date Filing Date
JP04248671A Expired - Fee Related JP3131854B2 (en) 1992-08-25 1992-08-25 One-chip microcomputer

Country Status (1)

Country Link
JP (1) JP3131854B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008099236A1 (en) 2007-02-15 2008-08-21 Pirelli Tyre S.P.A. Process and apparatus for manufacturing tyres
WO2009144753A1 (en) 2008-05-28 2009-12-03 Pirelli Tyre S.P.A. Process and apparatus for building tyres

Also Published As

Publication number Publication date
JPH0675932A (en) 1994-03-18

Similar Documents

Publication Publication Date Title
US4580213A (en) Microprocessor capable of automatically performing multiple bus cycles
JP3131854B2 (en) One-chip microcomputer
JP2002216120A (en) Image processing method, image processor and storage medium
US6122699A (en) Data processing apparatus with bus intervention means for controlling interconnection of plural busses
JP2664144B2 (en) Multiplexing device switching method and device
JPS62282322A (en) Printer control circuit
US4630194A (en) Apparatus for expediting sub-unit and memory communications in a microprocessor implemented data processing system having a multibyte system bus that utilizes a bus command byte
JP2000047706A (en) System and method for controlling actuator
JPH0644209B2 (en) Bus converter
JP3449189B2 (en) Programmable controller
JPH07191954A (en) Microcomputer system
JP2864861B2 (en) Response signal control circuit
JP2884620B2 (en) Digital image processing device
JP2870837B2 (en) Arbitration circuit of central processing unit
JPS60263395A (en) Microprocessor
JPH01291353A (en) Data transfer controller
JPH0744470A (en) Data bus monitoring device
JP2705311B2 (en) Microcomputer
JPH02245850A (en) Bus diagnostic system
JPH10278390A (en) Printer
JPH03147046A (en) Data processor
JPS60250455A (en) Interruption processing system
JPH04195316A (en) Power saving circuit
JPH0142010B2 (en)
JPS6336543B2 (en)

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees