JP3418734B2 - Serial data transfer method - Google Patents

Serial data transfer method

Info

Publication number
JP3418734B2
JP3418734B2 JP02233195A JP2233195A JP3418734B2 JP 3418734 B2 JP3418734 B2 JP 3418734B2 JP 02233195 A JP02233195 A JP 02233195A JP 2233195 A JP2233195 A JP 2233195A JP 3418734 B2 JP3418734 B2 JP 3418734B2
Authority
JP
Japan
Prior art keywords
transfer
dma
serial
data
shift register
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
JP02233195A
Other languages
Japanese (ja)
Other versions
JPH08194662A (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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co 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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP02233195A priority Critical patent/JP3418734B2/en
Publication of JPH08194662A publication Critical patent/JPH08194662A/en
Application granted granted Critical
Publication of JP3418734B2 publication Critical patent/JP3418734B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Bus Control (AREA)

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】この発明は、DMA(ダイレクト
・メモリ・アクセス)転送を用いるシリアル・インタフ
ェースのデータ転送方法に係り、例えばファクシミリ装
置等においてホストシステムが周辺装置をシリアル通信
により制御するシステムのシリアルデータ転送方法に関
するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a serial interface data transfer method using DMA (Direct Memory Access) transfer, and relates to a system in which a host system controls peripheral devices by serial communication in a facsimile machine or the like. The present invention relates to a serial data transfer method.

【0002】[0002]

【従来の技術】従来、DMA転送を用いるシリアルデー
タ転送は、特開平2−73445号公報の例にあるよう
に多く知られている。このようなDMA転送を用いるシ
リアルデータ転送によって、メモリと周辺装置間のデー
タ転送を行う場合、メモリからのパラレルデータをシリ
アルデータに変換して周辺装置に転送し、逆に周辺装置
からのシリアルデータをパラレルデータに変換してメモ
リに転送するため、シフトレジスタが設けられている。
このシフトレジスタは、周辺装置が接続されるシリアル
ポート毎に設けられ、メモリとシフトレジスタ間のデー
タ転送にDMA転送が用いられている。
2. Description of the Related Art Conventionally, many serial data transfers using DMA transfer are known as disclosed in Japanese Patent Laid-Open No. 2-73445. When data transfer between a memory and a peripheral device is performed by serial data transfer using such DMA transfer, parallel data from the memory is converted into serial data and transferred to the peripheral device, and conversely serial data from the peripheral device is transferred. A shift register is provided to convert the data into parallel data and transfer the data to the memory.
This shift register is provided for each serial port to which the peripheral device is connected, and DMA transfer is used for data transfer between the memory and the shift register.

【0003】[0003]

【発明が解決しようとする課題】ところが、このような
従来のシリアル・インタフェースにおいて、例えばファ
クシミリ装置におけるモータ駆動ユニットや操作部等の
ための複数のシリアルポートを実現するためには、シフ
トレジスタをシリアルポートの数だけ具備しなければな
らず、回路規模が増大し、コスト高になるという問題点
があった。
However, in such a conventional serial interface, in order to realize a plurality of serial ports for, for example, a motor drive unit and an operation unit in a facsimile machine, a shift register is serially connected. There is a problem that the number of ports must be provided, the circuit scale increases, and the cost increases.

【0004】また、周辺装置の種類によって異なる転送
データ幅を持つシリアルポートを実現するためには、上
記と同様にシフトレジスタをシリアルポートの数だけ具
備しなければならず、回路規模が増大し、コスト高にな
るという問題点があった。
Further, in order to realize a serial port having a transfer data width that varies depending on the type of peripheral device, it is necessary to equip the same number of shift registers as the number of serial ports, which increases the circuit scale. There was a problem that the cost would be high.

【0005】同様に、周辺装置の動作速度に合わせるた
め、異なる転送クロックを持つシリアルポートを実現す
るためには、同じくシフトレジスタをシリアルポートの
数だけ具備しなければならず、回路規模が増大し、コス
ト高になるという問題点があった。
Similarly, in order to realize the serial ports having different transfer clocks in order to match the operating speed of the peripheral device, it is necessary to equip the same number of shift registers as the serial ports, which increases the circuit scale. There was a problem that the cost would be high.

【0006】そこで、本発明はこのような問題点を解決
するためになされたものであり、1つのシフトレジスタ
で複数のシリアルポートを実現することができるシリア
ルデータ転送方法を提供することを目的とするものであ
る。
Therefore, the present invention has been made to solve such a problem, and an object thereof is to provide a serial data transfer method capable of realizing a plurality of serial ports with one shift register. To do.

【0007】さらに、転送データ幅の異なるシリアルポ
ートを1つのシフトレジスタで実現することができるシ
リアルデータ転送方法を実現することを目的とするもの
である。
It is another object of the present invention to realize a serial data transfer method capable of realizing serial ports having different transfer data widths with a single shift register.

【0008】また、転送速度の異なるシリアルポートを
1つのシフトレジスタで実現することができるシリアル
データ転送方法を実現することを目的とするものであ
る。
It is another object of the present invention to realize a serial data transfer method capable of realizing serial ports having different transfer speeds with a single shift register.

【0009】[0009]

【課題を解決するための手段】請求項1に記載の発明
は、周辺装置毎のシリアルポートに共用される1つのシ
フトレジスタを備え、DMA転送によりメモリと前記シ
フトレジスタ間のデータの受け渡しを中央処理装置を介
さずに行うシリアルデータ転送方法であって、所定の同
期信号に同期して一定期間をカウントするカウンタを有
し、このカウント値により各シリアルポートに対応する
複数のDMA転送アドレスを時分割で発生させ、前記一
定期間に複数チャネルのシリアル転送を同じシフトレジ
スタを用いて行うようにしたものである。
According to a first aspect of the present invention, there is provided one shift register shared by serial ports for each peripheral device, and data transfer between the memory and the shift register is centrally performed by DMA transfer. A serial data transfer method that does not involve a processing device, and has a counter that counts a fixed period in synchronization with a predetermined synchronization signal, and a plurality of DMA transfer addresses corresponding to each serial port can be timed by this count value. It is generated by division, and serial transfer of a plurality of channels is performed using the same shift register in the fixed period.

【0010】さらに、請求項2に記載の発明は、前記カ
ウンタのカウント値によりDMA転送の転送データ幅を
変化させ、前記一定期間に転送データ幅の異なるシリア
ル転送を同じシフトレジスタを用いて行うようにしたも
のである。
Further, in the invention described in claim 2, the transfer data width of the DMA transfer is changed according to the count value of the counter, and serial transfer having different transfer data widths is performed by using the same shift register in the fixed period. It is the one.

【0011】また、請求項3に記載の発明は、前記カウ
ンタのカウント値により転送クロックを変化させ、前記
一定期間に転送速度の異なるシリアル転送を同じシフト
レジスタを用いて行うようにしたものである。
According to a third aspect of the present invention, the transfer clock is changed according to the count value of the counter, and serial transfer having different transfer rates is performed using the same shift register during the certain period. .

【0012】一方、請求項4に記載の発明は、前記中央
処理装置からの転送要求によりセットされ、転送終了後
にリセットされる転送要求設定手段を有し、前記カウン
タのカウント値により前記一定期間に同じDMAアドレ
スを複数回発生させ、中央処理装置は前記転送要求設定
手段の設定状態を監視し、転送終了後にメモリのデータ
を更新することで、各シリアルポートが前記一定期間に
複数回駆動するようにしたものである。
On the other hand, the invention according to claim 4 has a transfer request setting means which is set by a transfer request from the central processing unit and is reset after the transfer is completed. The same DMA address is generated a plurality of times, the central processing unit monitors the setting state of the transfer request setting means, and updates the data in the memory after the transfer is completed so that each serial port can be driven a plurality of times during the certain period. It is the one.

【0013】また、請求項5に記載の発明は、前記中央
処理装置が転送バイト数を設定するための転送バイト数
設定手段を有し、前記カウンタのカウント値によりDM
A転送アドレスを変化させ、1回の転送が終わると前記
転送バイト数設定手段の値を減算し、前記一定期間に複
数のDMA転送アドレスを発生させ、前記転送バイト数
設定手段の値が零になるまでDMA転送を行うようにし
たものである。
Further, in the invention described in claim 5, the central processing unit has a transfer byte number setting means for setting the transfer byte number, and DM is set according to the count value of the counter.
A transfer address is changed, and when one transfer is completed, the value of the transfer byte number setting means is subtracted, a plurality of DMA transfer addresses are generated in the certain period, and the value of the transfer byte number setting means becomes zero. Until that time, DMA transfer is performed.

【0014】[0014]

【作用】請求項1に記載の方法によれば、所定の同期信
号,例えばファクシミリ装置等の主走査同期信号に同期
して1走査間をカウントする主走査カウンタのカウント
値によりシフトレジスタを時分割して使用しているた
め、1つのシフトレジスタで複数のシリアルポートを実
現することができる。
According to the method of the present invention, the shift register is time-divided by the count value of the main scanning counter which counts one scan in synchronization with a predetermined synchronizing signal, for example, a main scanning synchronizing signal of a facsimile machine or the like. Therefore, one shift register can realize a plurality of serial ports.

【0015】さらに、請求項2に記載の方法によれば、
前記カウンタのカウント値によりDMA転送の転送デー
タ幅を変化させるので、転送データ幅の異なるシリアル
ポートを1つのシフトレジスタにより実現することがで
きる。
Further, according to the method of claim 2,
Since the transfer data width of the DMA transfer is changed according to the count value of the counter, serial ports having different transfer data widths can be realized by one shift register.

【0016】また、請求項3に記載の方法によれば、前
記カウンタのカウント値により転送クロックを変化させ
るので、転送速度の異なるシリアルポートを1つのシフ
トレジスタにより実現することができる。
Further, according to the method of claim 3, since the transfer clock is changed according to the count value of the counter, serial ports having different transfer speeds can be realized by one shift register.

【0017】一方、請求項4に記載の方法によれば、中
央処理装置によってセットされた転送要求設定手段を転
送終了後にリセットすることにより、中央処理装置は転
送終了を検知し、メモリの転送データを更新できるの
で、前記カウンタがカウントする一定期間に各チャネル
毎に複数回のシリアル転送が可能となる。
On the other hand, according to the method of claim 4, by resetting the transfer request setting means set by the central processing unit after the end of the transfer, the central processing unit detects the end of the transfer and transfers the transfer data in the memory. Can be updated, so that serial transfer can be performed a plurality of times for each channel during the fixed period counted by the counter.

【0018】また、請求項5に記載の方法によれば、中
央処理装置が転送バイト数設定手段に一定期間に転送す
るバイト数を設定しておくことにより、以降、中央処理
装置が介在することなく設定バイト数の転送が行われる
ので、中央処理装置によるソフトウエアの負荷を増大す
ることなく、大量のシリアル転送が可能となる。
According to the method of the fifth aspect, the central processing unit sets the number of bytes to be transferred in a fixed period in the transfer byte number setting means, so that the central processing unit can be interposed thereafter. Since the transfer of the set number of bytes is performed without a large amount, a large amount of serial transfer can be performed without increasing the software load on the central processing unit.

【0019】[0019]

【実施例】以下、本発明の実施例を図面を参照して説明
する。図1は、本発明の実施例に係るシリアルデータ転
送方法を実現する構成要素を示すブロック図、図2はそ
のシリアル入出力装置(以下、SIOと略記する)の内
部構成を示すブロック図である。
Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing components for realizing a serial data transfer method according to an embodiment of the present invention, and FIG. 2 is a block diagram showing an internal configuration of the serial input / output device (hereinafter abbreviated as SIO). .

【0020】図1において、1は中央処理装置(以下、
CPUと略記する)で、内部にROM(リード・オンリ
ー・メモリ)を持ち、このROMに記憶されているシス
テムプログラムに従い、例えばファクシミリ装置全体を
制御するものである。
In FIG. 1, reference numeral 1 is a central processing unit (hereinafter,
It is abbreviated as CPU), has a ROM (Read Only Memory) inside, and controls, for example, the entire facsimile apparatus according to a system program stored in this ROM.

【0021】2はDMAコントローラであり、CPU1
を介さずに、SIO3内のシフトレジスタとRAM(ラ
ンダム・アクセス・メモリ)5間のデータ転送を制御す
るもので、SIO3からのアドレスADD0〜ADD1
5(16ビット)をシステムのアドレスバス7に出力す
る。また、DMAコントローラ2からはCPU1に対し
てDMAリクエストが出力され、それに対してCPU1
から出力されるDMAアクノリッジを入力する。
Reference numeral 2 denotes a DMA controller, which is a CPU 1
The data transfer between the shift register in the SIO 3 and the RAM (random access memory) 5 is controlled without using the SIO 3, and addresses ADD0 to ADD1 from the SIO 3 are controlled.
5 (16 bits) is output to the address bus 7 of the system. Further, the DMA controller 2 outputs a DMA request to the CPU 1, and the CPU 1 responds to the DMA request.
Input the DMA acknowledge output from.

【0022】SIO3は、例えば32ビット(4バイ
ト)幅のシフトレジスタを有し、RAM5からDMA転
送されたパラレルデータを当該シフトレジスタを介して
シリアルデータに変換して周辺装置8に出力し、また、
周辺装置8から入力されたシリアルデータを当該シフト
レジスタを介してパラレルデータに変換してRAM5に
DMA転送するものである。このSIO3の内部構成に
ついては、追って図2を用いて詳述する。
The SIO 3 has, for example, a shift register having a width of 32 bits (4 bytes), converts parallel data DMA-transferred from the RAM 5 into serial data via the shift register, and outputs the serial data to the peripheral device 8. ,
The serial data input from the peripheral device 8 is converted into parallel data via the shift register and DMA-transferred to the RAM 5. The internal configuration of the SIO 3 will be described later in detail with reference to FIG.

【0023】主走査カウンタ4は、外部から入力される
基準クロックをカウントして主走査同期信号を発生し、
この時のカウント値を主走査カウンタ値としてSIO3
に出力する。この主走査同期信号は、ファクシミリ装置
における画像読取や画像記録に用いられる主走査同期信
号と同様なもので、本実施例では、この主走査同期信号
を主走査カウンタ4内で生成しているが、画像読取や画
像記録に用いられる主走査同期信号を用いることも可能
である。
The main scanning counter 4 counts a reference clock input from the outside to generate a main scanning synchronizing signal,
The count value at this time is used as the main scan counter value and SIO3
Output to. This main scanning synchronization signal is the same as the main scanning synchronization signal used for image reading and image recording in a facsimile machine. In the present embodiment, this main scanning synchronization signal is generated in the main scanning counter 4. It is also possible to use the main scanning synchronization signal used for image reading and image recording.

【0024】RAM5は、システムプログラムが使用す
る作業領域や、システムプログラムがシリアル転送デー
タをアクセスするための記憶領域となる。このRAM5
のアウトプットイネーブル端子OE(負論理)には、C
PU1からのリード信号RDB(負論理)とDMAコン
トローラ2からのメモリリード信号MEMRDB(負論
理)がANDゲート(負論理のORゲート)5aと介し
て与えられ、また、ライトイネーブル端子WE(負論
理)には、CPU1からのライト信号WRB(負論理)
とDMAコントローラ2からのメモリライト信号MEM
WRB(負論理)がANDゲート(負論理のORゲー
ト)5bを介して与えられる。また、このRAM5は、
データバス6を介してCPU1及びSIO3と接続さ
れ、また、アドレスバス7を介してCPU1及びDMA
コントローラ2と接続されている。
The RAM 5 serves as a work area used by the system program and a storage area for the system program to access serial transfer data. This RAM5
Output enable terminal OE (negative logic) of
The read signal RDB (negative logic) from the PU1 and the memory read signal MEMRDB (negative logic) from the DMA controller 2 are given through the AND gate (OR gate of negative logic) 5a, and the write enable terminal WE (negative logic). ) Is a write signal WRB (negative logic) from the CPU 1.
And a memory write signal MEM from the DMA controller 2
WRB (negative logic) is applied through an AND gate (negative logic OR gate) 5b. Also, this RAM5
It is connected to the CPU 1 and SIO 3 via the data bus 6, and also to the CPU 1 and DMA via the address bus 7.
It is connected to the controller 2.

【0025】上記SIO3は、図2に示すように、タイ
ミング制御部31、クロック発生部32、DMAアドレ
ス発生部33、PS(パラレル→シリアル)/SP(シ
リアル→パラレル)シフトレジスタ34、転送バイト数
設定レジスタ35、DREQ発生部36、及び転送要求
レジスタ37から構成されている。
As shown in FIG. 2, the SIO 3 includes a timing controller 31, a clock generator 32, a DMA address generator 33, a PS (parallel → serial) / SP (serial → parallel) shift register 34, and a transfer byte number. It comprises a setting register 35, a DREQ generator 36, and a transfer request register 37.

【0026】タイミング制御部31は、DMA転送アド
レスの発生タイミングを制御し、DMAアドレス発生部
33から主走査カウンタ値に対応するDMAアドレスA
DD0〜ADD15を発生させる。同様に、DMAリク
エストの発生タイミングを制御し、DREQ(DMAリ
クエスト)発生部36からDMAリクエストDREQを
発生させる。また、同じ信号線SIOSCK,SIOS
ID,SIOSOD上に混在するシリアルI/Oのどの
チャネルが駆動しているかを周辺装置8が識別するため
の駆動チャネル識別信号SIOSEL0〜nを発生す
る。さらに、DMAコントローラ2に転送データ幅を指
定する転送データ幅指定信号DMA1BT〜DMAnB
Tを発生する(請求項2対応)。また、転送要求レジス
タ37の転送要求フラグをリセットするタイミングを発
生する(請求項4対応)。また、転送バイト数設定レジ
スタ35をデクリメントするタイミングを発生する(請
求項5対応)。
The timing control unit 31 controls the generation timing of the DMA transfer address, and the DMA address generation unit 33 controls the DMA address A corresponding to the main scanning counter value.
Generate DD0 to ADD15. Similarly, the generation timing of the DMA request is controlled, and the DREQ (DMA request) generation unit 36 generates the DMA request DREQ. In addition, the same signal lines SIOSCK and SIOS
Drive channel identification signals SIOSEL0-n for the peripheral device 8 to identify which channel of serial I / O mixed on ID and SIOSOD is driven are generated. Further, transfer data width designation signals DMA1BT to DMAnB for designating the transfer data width to the DMA controller 2
T is generated (corresponding to claim 2). Further, the timing for resetting the transfer request flag of the transfer request register 37 is generated (corresponding to claim 4). Further, the timing for decrementing the transfer byte number setting register 35 is generated (corresponding to claim 5).

【0027】クロック発生部32は、シリアル転送クロ
ックを発生する。また、主走査カウンタ4のカウント値
に対応して異なる転送クロックを発生するため、タイミ
ング制御部31からの信号により転送クロックを変化さ
せる(請求項3対応)。
The clock generator 32 generates a serial transfer clock. Further, since different transfer clocks are generated corresponding to the count value of the main scanning counter 4, the transfer clock is changed by a signal from the timing control section 31 (corresponding to claim 3).

【0028】DMAアドレス発生部33は、タイミング
制御部31からのアドレス発生タイミングによりDMA
アドレスADD0〜ADD15とメモリリードライト信
号MEMRWを発生する。また、シリアルデータを全ビ
ット受け取ると、上記DMAアドレスADD0〜ADD
15とメモリリードライト信号MEMRWを切り換え
る。
The DMA address generation unit 33 executes the DMA at the address generation timing from the timing control unit 31.
Addresses ADD0 to ADD15 and a memory read / write signal MEMRW are generated. When all bits of serial data are received, the above DMA addresses ADD0 to ADD
15 and the memory read / write signal MEMRW are switched.

【0029】シフトレジスタ34は、クロック発生部3
2からのシフトクロックで、RAM5からの転送データ
をパラレル/シリアル変換し、得られたシリアルデータ
SIOSODをシフトクロックSIOSCKとともに周
辺装置8に送出するとともに、シリアル入力データSI
OSIDをシリアル/パラレル変換する。また、このシ
フトレジスタ34は、DMAコントローラ2からのリー
ド信号SIORDBによりデータが読み出され、ライト
信号SIOWRBによりデータが書き込まれる。
The shift register 34 includes a clock generator 3
With the shift clock from 2, the transfer data from the RAM 5 is converted from parallel to serial, and the obtained serial data SIOSOD is sent to the peripheral device 8 together with the shift clock SIOSCK, and the serial input data SI
Convert OSID to serial / parallel. Data is read from the shift register 34 by the read signal SIORDB from the DMA controller 2 and written by the write signal SIOWRB.

【0030】転送バイト数設定レジスタ35は、CPU
1が設定した転送バイト数をタイミング制御部31から
の信号によりデクリメントし、カウントアップする(零
になる)までDREQ発生部36にDMAリクエストの
発生要求信号を発生する(請求項5対応)。
The transfer byte number setting register 35 is
The number of transfer bytes set by 1 is decremented by a signal from the timing control unit 31, and a DMA request generation request signal is generated in the DREQ generation unit 36 until it counts up (becomes zero) (corresponding to claim 5).

【0031】DREQ発生部36は、タイミング制御部
31からのDREQ発生タイミングによりDMAコント
ローラ2にDMAリクエストDREQを発生する。ま
た、DMAコントローラ2からのリード信号SIORD
B,ライト信号SIOWRBによりDMAリクエストD
REQをリセットする。さらに、タイミング制御部31
からの転送データ幅指定信号DMA1BT〜DMAnB
Tの転送データ幅によって上記リード信号SIORD
B,ライト信号SIOWRBをカウントし、DMAリク
エストDREQをリセットする(請求項2対応)。ま
た、転送バイト数設定レジスタ35からのDMAリクエ
スト発生要求信号によりDMAリクエストDREQを発
生する(請求項5対応)。
The DREQ generation unit 36 generates a DMA request DREQ to the DMA controller 2 at the DREQ generation timing from the timing control unit 31. In addition, the read signal SIORD from the DMA controller 2
B, DMA request D by write signal SIOWRB
Reset REQ. Furthermore, the timing control unit 31
Transfer data width designation signals DMA1BT to DMAnB from
The read signal SIORD depends on the transfer data width of T.
B, the write signal SIOWRB is counted, and the DMA request DREQ is reset (corresponding to claim 2). Further, a DMA request DREQ is generated by a DMA request generation request signal from the transfer byte number setting register 35 (corresponding to claim 5).

【0032】転送要求レジスタ37は、CPU1が設定
した転送要求フラグによりDREQ発生部36にDMA
リクエストDREQの発生要求信号を出力し、転送終了
後、タイミング制御部31からの信号によりリセットさ
れる。CPU1は、本レジスタ37をポーリングし、転
送要求フラグがリセットされていれば、RAM5の転送
データを更新することができる(請求項4対応)。
The transfer request register 37 sends a DMA to the DREQ generator 36 according to the transfer request flag set by the CPU 1.
The generation request signal of the request DREQ is output, and after the transfer is completed, the signal is reset by the signal from the timing control unit 31. The CPU 1 can poll the register 37 and update the transfer data in the RAM 5 if the transfer request flag is reset (corresponding to claim 4).

【0033】以下、本発明によるシリアルデータ転送方
法の第1の実施例を説明する。
The first embodiment of the serial data transfer method according to the present invention will be described below.

【0034】図3は第1の実施例におけるSIO3の動
作フローチャート、図4はDMAコントローラ2の動作
フローチャートである。また、図5は第1の実施例にお
ける各部の入出力信号のタイミングチャートである。こ
の図5は、主走査カウンタ4が00h(hは16進表記
を示す)のとき、シリアルI/OのSIOチャネル0
(アドレスXX00hに送信データバッファ、アドレス
XX01hに受信データバッファを持つ)が駆動し、同
様に主走査カウンタ4が01hのとき、シリアルI/O
のSIOチャネル1(アドレスXX02hに送信データ
バッファ、アドレスXX03hに受信データバッファを
持つ)が駆動し、主走査カウンタ4が02hのとき、シ
リアルI/OのSIOチャネル2(アドレスXX04h
に送信データバッファ、アドレスXX05hに受信デー
タバッファを持つ)が駆動し、3つのシリアルI/Oが
転送クロック、入出力データライン、シフトレジスタ3
4を時分割にて使用している様子を示している。
FIG. 3 is an operation flowchart of the SIO 3 in the first embodiment, and FIG. 4 is an operation flowchart of the DMA controller 2. Further, FIG. 5 is a timing chart of the input / output signals of each part in the first embodiment. In FIG. 5, when the main scanning counter 4 is 00h (h indicates hexadecimal notation), SIO channel 0 of serial I / O is shown.
When the main scanning counter 4 is 01h (having the transmission data buffer at the address XX00h and the reception data buffer at the address XX01h) is driven, the serial I / O
SIO channel 1 (having a transmission data buffer at address XX02h and a reception data buffer at address XX03h) is driven and the main scan counter 4 is 02h, SIO channel 2 of serial I / O (address XX04h
A transmit data buffer, and a receive data buffer at address XX05h) are driven, and three serial I / Os are used as a transfer clock, an input / output data line, and a shift register 3.
4 shows that 4 is used by time division.

【0035】さて、システムが立ち上がると、SIO3
は図3のフローチャートに従い処理を実行する。まず、
主走査カウンタ4の値に対応するDMAアドレスの発生
タイミングがくると(判断101)、主走査カウンタ値
(図5の例では“00h”)に対応し、送信データバッ
ファとなるDMAアドレス(図5の例では“XX00
h”)を発生し、同時にメモリリード/ライト信号ME
MRWをリード(図5でMEMRWが“Hi”)にする
(処理102)。次に、メモリ→シフトレジスタ方向の
DMAリクエスト発生タイミングがくると(判断10
3)、DMAリクエストDREQをイネーブルにする
(処理104)。
Now, when the system starts up, SIO3
Executes processing according to the flowchart of FIG. First,
When the generation timing of the DMA address corresponding to the value of the main scanning counter 4 comes (decision 101), the DMA address corresponding to the main scanning counter value (“00h” in the example of FIG. 5) becomes the transmission data buffer (FIG. 5). In the example, "XX00
h ") and at the same time, the memory read / write signal ME
The MRW is read (MEMRW is "Hi" in FIG. 5) (process 102). Next, when the DMA request generation timing in the memory → shift register direction comes (decision 10
3) Enable the DMA request DREQ (process 104).

【0036】DMAコントローラ2は、上記DMAリク
エストを受け付けると、他のDMAチャネルとの優先順
位の比較等の処理を行った後、本DMAの処理を図4の
フローチャートに従い実行する。図4にてDMAの実行
を開始すると、メモリリード/ライト信号MEMRWが
リード(図5でMEMRWが“Hi”)のとき、SIO
3からのアドレスADD0〜ADD15をアドレスバス
7に出力する(判断201→処理202)。次に、RA
M5に対しメモリリード信号MEMRDBを発生し、転
送データをデータバス6に出力させるとともに、SIO
3のシフトレジスタ34に対しレジスタライト信号SI
OWRBを発生し、メモリ→シフトレジスタのDMA転
送を行う(処理203)。
When the DMA controller 2 receives the above-mentioned DMA request, the DMA controller 2 performs processing such as priority comparison with other DMA channels, and then executes the processing of this DMA according to the flowchart of FIG. When the execution of the DMA is started in FIG. 4, when the memory read / write signal MEMRW is read (MEMRW is “Hi” in FIG. 5), the SIO
The addresses ADD0 to ADD15 from 3 are output to the address bus 7 (decision 201 → process 202). Next, RA
A memory read signal MEMRDB is generated for M5, transfer data is output to the data bus 6, and SIO
Register write signal SI to the shift register 34 of 3
OWRB is generated, and DMA transfer from memory to shift register is performed (process 203).

【0037】SIO3は、レジスタライト信号SIOW
RBによりDMA転送の終了を確認し(判断105)、
DMAリクエストDREQをディスエーブルにする(処
理106)。その後、転送クロックを発生し、シリアル
転送を行う(処理107)。図5で、SIOSCKは転
送クロック、SIOSODは出力データ、SIOSID
は入力データを示している。この図5では、出力データ
SIOSODとして、“00000000”,“010
00000”,“00100000”を、入力データS
IOSIDとして、“10000000”,“1100
0000”,“10100000”を一例として示して
いる。
SIO3 is a register write signal SIOW
The RB confirms the end of the DMA transfer (decision 105),
The DMA request DREQ is disabled (process 106). After that, a transfer clock is generated and serial transfer is performed (process 107). In FIG. 5, SIOSCK is a transfer clock, SIOSOD is output data, and SIOSID.
Indicates input data. In FIG. 5, as output data SIOSOD, "00000000", "010"
Input data S for "00000" and "00100000"
As the IOS ID, "10000000", "1100"
"0000" and "10100000" are shown as an example.

【0038】シリアル転送が終了すると、DMAアドレ
スを受信データバッファアドレス(図5の例では“XX
01h”)に切り換え、メモリリード/ライト信号ME
MRWをライト(図5でMEMRWが“Low”)に切
り換える(処理108)。
When the serial transfer is completed, the DMA address is changed to the reception data buffer address ("XX" in the example of FIG. 5).
01h "), and the memory read / write signal ME
The MRW is switched to write (MEMRW is "Low" in FIG. 5) (process 108).

【0039】シフトレジスタ→メモリ方向のDMAリク
エスト発生タイミングがくるとDMAリクエストDRE
Qをイネーブルにする(判断109→処理110)。
When the DMA request generation timing in the shift register → memory direction comes, the DMA request DRE
Q is enabled (decision 109 → process 110).

【0040】DMAコントローラ2は、上記と同様に図
4のフローチャートに従い処理を実行する。すなわち、
メモリリード/ライト信号MEMRWがライト(図5で
MEMRWが“Low”)のとき、SIO3からのアド
レスをアドレスバス7に出力する(判断201→処理2
04)。次に、SIO3のシフトレジスタ34に対しレ
ジスタリード信号SIORDBを発生し、転送データを
データバス6に出力させるとともに、RAM5に対して
メモリライト信号MEMWRBを発生し、シフトレジス
タ→メモリのDMA転送を行う(処理205)。
The DMA controller 2 executes the processing according to the flowchart of FIG. 4 similarly to the above. That is,
When the memory read / write signal MEMRW is write (MEMRW is “Low” in FIG. 5), the address from the SIO 3 is output to the address bus 7 (decision 201 → process 2).
04). Next, the register read signal SIORDB is generated for the shift register 34 of the SIO 3, the transfer data is output to the data bus 6, and the memory write signal MEMWRB is generated for the RAM 5 to perform the shift register → memory DMA transfer. (Process 205).

【0041】SIO3は、上記と同様に、レジスタリー
ド信号SIORDBによりDMA転送の終了を確認し、
DMAリクエストDREQをディスエーブルにする(処
理112)。そして、最初の判断101に戻って上述し
た一連の処理を繰り返す。
In the same manner as above, the SIO 3 confirms the end of the DMA transfer by the register read signal SIORDB,
The DMA request DREQ is disabled (process 112). Then, the process returns to the first determination 101 and the series of processes described above is repeated.

【0042】すなわち、主走査カウンタ4が00hのと
きは、アドレスXX00hに送信データバッファ、アド
レスXX01hに受信データバッファを持つSIOチャ
ネル0が駆動し、主走査カウンタ4が01hのときは、
アドレスXX02hに送信データバッファ、アドレスX
X03hに受信データバッファを持つSIOチャネル1
が駆動し、主走査カウンタ4が02hのときは、アドレ
スXX04hに送信データバッファ、アドレスXX05
hに受信データバッファを持つSIOチャネル2が駆動
する。
That is, when the main scanning counter 4 is 00h, the SIO channel 0 having the transmission data buffer at the address XX00h and the reception data buffer at the address XX01h is driven, and when the main scanning counter 4 is 01h,
Send data buffer at address XX02h, address X
SIO channel 1 with receive data buffer in X03h
Is driven and the main scanning counter 4 is 02h, the transmission data buffer is stored in the address XX04h and the address XX05.
The SIO channel 2 having the receive data buffer in h is driven.

【0043】このように、シフトレジスタ34を主走査
カウンタ4のカウンタ値により時分割して使用している
ため、1つのシフトレジスタ34で複数のシリアルポー
トを実現することができる。これにより、回路規模が縮
小し、低コスト化を図ることができる。
As described above, since the shift register 34 is used by being time-divided by the count value of the main scanning counter 4, one shift register 34 can realize a plurality of serial ports. As a result, the circuit scale can be reduced and the cost can be reduced.

【0044】次に、本発明によるシリアルデータ転送方
法の第2の実施例を説明する。
Next, a second embodiment of the serial data transfer method according to the present invention will be described.

【0045】図6は第2の実施例におけるSIO3の動
作フローチャート、図7はDMAコントローラ2の動作
フローチャートである。また、図8は第2の実施例にお
ける各部の入出力信号のタイミングチャートである。こ
の図8は、主走査カウンタ4が00hのとき、24ビッ
トシリアルI/OのSIOチャネル0(アドレスXX0
0h〜XX02hに送信データバッファ、アドレスXX
03h〜XX05hに受信データバッファを持つ)が駆
動し、同様に主走査カウンタ4が01hのとき、16ビ
ットシリアルI/OのSIOチャネル1(アドレスXX
06h〜XX07hに送信データバッファ、アドレスX
X08h〜XX09hに受信データバッファを持つ)が
駆動し、転送データ幅の異なる2つのシリアルI/Oが
転送クロック、入出力データライン、シフトレジスタ3
4を時分割して使用している様子を示している。
FIG. 6 is an operation flowchart of the SIO 3 in the second embodiment, and FIG. 7 is an operation flowchart of the DMA controller 2. In addition, FIG. 8 is a timing chart of input / output signals of each part in the second embodiment. In FIG. 8, when the main scanning counter 4 is 00h, the SIO channel 0 (address XX0) of 24-bit serial I / O is shown.
Transmission data buffer at 0h to XX02h, address XX
When the reception data buffer is driven in 03h to XX05h and the main scanning counter 4 is 01h in the same manner, 16-bit serial I / O SIO channel 1 (address XX).
Send data buffer, address X in 06h to XX07h
X08h to XX09h are driven), and two serial I / Os having different transfer data widths are driven by the transfer clock, the input / output data line, and the shift register 3.
4 shows that 4 is used by time division.

【0046】システムが立ち上がると、SIO3は図6
のフローチャートに従い処理を実行する。まず、主走査
カウンタ4の値に対応するDMAアドレスの発生タイミ
ングがくると(判断301)、カウンタ値(図8の例で
は“00h”)に対応し、送信データバッファとなるD
MAアドレス(図8の例では“XX00h”)を発生
し、同時にメモリリード/ライト信号MEMRWをリー
ド(図8でMEMRWが“Hi”)にし、3バイト転送
を示す信号DMA3BTをイネーブルにする(処理30
2)。次に、メモリ→シフトレジスタ方向のDMAリク
エスト発生タイミングがくると(判断303)、DMA
リクエストDREQをイネーブルにする(処理30
4)。
When the system is started up, SIO3 is set to FIG.
The process is executed according to the flowchart of. First, when the generation timing of the DMA address corresponding to the value of the main scanning counter 4 comes (decision 301), it corresponds to the counter value (“00h” in the example of FIG. 8) and becomes the transmission data buffer D.
The MA address (“XX00h” in the example of FIG. 8) is generated, at the same time, the memory read / write signal MEMRW is read (MEMRW is “Hi” in FIG. 8), and the signal DMA3BT indicating 3-byte transfer is enabled (Processing). Thirty
2). Next, when the DMA request generation timing in the memory → shift register direction comes (decision 303), the DMA
Enable the request DREQ (process 30)
4).

【0047】DMAコントローラ2は、上記DMAリク
エストを受け付けると、他のDMAチャネルとの優先順
位の比較等の処理を行った後、本DMAの処理を図7の
フローチャートに従い実行する。図7にてDMAの実行
を開始すると、メモリリード/ライト信号MEMRWが
リード(図8でMEMRWが“Hi”)のとき、3バイ
ト転送を示す信号DMA3BTに基づきDMA転送バイ
ト数(転送データ幅)を判定して(判断402)、処理
403に分岐し、SIO3からのアドレスADD0〜A
DD15をアドレスバス7に出力する。次に、RAM5
に対しリード信号MEMRDBを発生し、転送データを
データバス6に出力させるとともに、SIO3のシフト
レジスタ34に対しレジスタライト信号SIORDBを
発生し、メモリ→シフトレジスタのDMA転送を行う
(処理404)。3バイト転送を示す信号DMA3BT
がイネーブルであるため、アドレスをインクリメントし
(処理405)、DMA3回終了か否かの判断406の
後、処理403に戻ってインクリメントしたアドレスを
アドレスバス7に出力する。このような動作を3回繰り
返し、3バイトのDMA転送を終了する。
When the DMA controller 2 receives the above DMA request, it performs processing such as comparison of priorities with other DMA channels, and then executes this DMA processing according to the flowchart of FIG. When DMA execution is started in FIG. 7, when the memory read / write signal MEMRW is read (MEMRW is “Hi” in FIG. 8), the number of DMA transfer bytes (transfer data width) based on the signal DMA3BT indicating 3-byte transfer. (Judgment 402), the process branches to process 403, and addresses ADD0-A from SIO3
DD15 is output to the address bus 7. Next, RAM5
A read signal MEMRDB is generated to output the transfer data to the data bus 6, and a register write signal SIORDB is generated to the shift register 34 of SIO3 to perform a DMA transfer from memory to shift register (process 404). Signal DMA3BT indicating 3-byte transfer
Is enabled, the address is incremented (process 405), and after determining 406 whether or not the DMA is completed three times, the process returns to process 403 and the incremented address is output to the address bus 7. This operation is repeated three times to complete the 3-byte DMA transfer.

【0048】SIO3は、3回のレジスタライト信号S
IOWRBにより3バイトDMAの終了を確認し(判断
305,306)、DMAリクエストDREQをディス
エーブルにする(処理309)。その後、転送クロック
SIOSCKを発生し、出力データSIOSODと入力
データSIOSIDのシリアル転送を行う(処理31
0)。図8で、出力データSIOSODと入力データS
IOSIDは前記実施例同様、任意のデータを用いてい
る。
SIO3 is a register write signal S for three times.
The IOWRB confirms the end of the 3-byte DMA (decisions 305 and 306), and disables the DMA request DREQ (process 309). After that, the transfer clock SIOSCK is generated, and the output data SIOSOD and the input data SIOSID are serially transferred (process 31).
0). In FIG. 8, output data SIOSOD and input data S
As in the above-described embodiment, the IOS ID uses arbitrary data.

【0049】シリアル転送が終了すると、DMAアドレ
スを受信データバッファアドレス(図8の例では“XX
03h”)に切り換え、メモリリード/ライト信号ME
MRWをライト(図8ではMEMRWが“Low”)に
切り換える(処理311)。
When the serial transfer is completed, the DMA address is changed to the reception data buffer address ("XX" in the example of FIG. 8).
03h "), memory read / write signal ME
The MRW is switched to write (MEMRW is "Low" in FIG. 8) (process 311).

【0050】シフトレジスタ→メモリ方向のDMAリク
エスト発生タイミングがくるとDMAリクエストDRE
Qをイネーブルにする(判断312→処理313)。
When the DMA request generation timing in the shift register → memory direction comes, the DMA request DRE
Q is enabled (decision 312 → process 313).

【0051】DMAコントローラ2は、上記と同様に図
7のフローチャートに従い処理を実行する。すなわち、
メモリリード/ライト信号MEMRWがライト(図8で
MEMRWが“Low”)のとき(判断401)、3バ
イト転送を示す信号DMA3BTに基づきDMA転送バ
イト数を判定して(判断415)、処理416に分岐
し、SIO3からのアドレスADD0〜ADD15をア
ドレスバス7に出力する。次に、SIO3のシフトレジ
スタ34に対しレジスタリード信号SIORDBを発生
し、転送データをデータバス6に出力させるとともに、
RAM5に対してメモリライト信号MEMWRBを発生
し、シフトレジスタ→メモリのDMA転送を行う(処理
417)。3バイト転送を示す信号DMA3BTがイネ
ーブルであるため、アドレスをインクリメントし(処理
418)、DMA3回終了か否かの判断419の後、処
理416に戻ってインクリメントしたアドレスをアドレ
スバス7に出力し、シフトレジスタ→メモリのDMA転
送を行う。このような動作を3回繰り返し、3バイトの
DMA転送を終了する。
The DMA controller 2 executes the processing according to the flowchart of FIG. 7 as described above. That is,
When the memory read / write signal MEMRW is write (MEMRW is “Low” in FIG. 8) (decision 401), the number of DMA transfer bytes is determined based on the signal DMA3BT indicating 3-byte transfer (decision 415), and the process 416 is performed. It branches and outputs the addresses ADD0 to ADD15 from SIO3 to the address bus 7. Next, a register read signal SIORDB is generated for the shift register 34 of the SIO 3 to output the transfer data to the data bus 6, and
A memory write signal MEMWRB is generated for the RAM 5 and a DMA transfer from the shift register to the memory is performed (process 417). Since the signal DMA3BT indicating the 3-byte transfer is enabled, the address is incremented (process 418), and after the determination 419 as to whether or not the DMA is completed three times, the process returns to the process 416 and the incremented address is output to the address bus 7. Performs DMA transfer from shift register to memory. This operation is repeated three times to complete the 3-byte DMA transfer.

【0052】SIO3は、同様に、3回のレジスタリー
ド信号SIORDBによりDMA転送の終了を確認し、
DMAリクエストDREQをディスエーブルにする(判
断314→判断315→処理318)。そして、最初の
判断301に戻り、上述した一連の処理を繰り返す。
Similarly, the SIO 3 confirms the end of the DMA transfer by the register read signal SIORDB three times,
The DMA request DREQ is disabled (decision 314 → decision 315 → process 318). Then, the process returns to the first determination 301, and the series of processes described above is repeated.

【0053】すなわち、主走査カウンタ4が00hのと
きは、アドレスXX00h〜XX02hに送信データバ
ッファ、アドレスXX03h〜XX05hに受信データ
バッファを持つ24ビット(3バイト)シリアルI/O
のSIOチャネル0が駆動し、主走査カウンタ4が01
hのときは、アドレスXX06h〜XX07hに送信デ
ータバッファ、アドレスXX08h〜XX09hに受信
データバッファを持つ16ビット(2バイト)シリアル
I/OのSIOチャネル1が駆動する。
That is, when the main scanning counter 4 is 00h, a 24-bit (3-byte) serial I / O having a transmission data buffer at addresses XX00h to XX02h and a reception data buffer at addresses XX03h to XX05h.
SIO channel 0 of the main scanning counter 4 is driven by 01
When it is h, the SIO channel 1 of 16-bit (2-byte) serial I / O having the transmission data buffer at the addresses XX06h to XX07h and the reception data buffer at the addresses XX08h to XX09h is driven.

【0054】このように、転送データ幅の異なるシリア
ルポートを1つのシフトレジスタ34で実現することが
できるので、前記第1の実施例の効果に加えて、さらに
回路規模を縮小し、低コスト化を図ることができる。
As described above, since the serial ports having different transfer data widths can be realized by one shift register 34, in addition to the effect of the first embodiment, the circuit scale can be further reduced and the cost can be reduced. Can be achieved.

【0055】次に、本発明によるシリアルデータ転送方
法の第3の実施例を説明する。
Next, a third embodiment of the serial data transfer method according to the present invention will be described.

【0056】図9は第3の実施例におけるSIO3の動
作フローチャート、図10はDMAコントローラ2の動
作フローチャートである。また、図11は第3の実施例
における各部の入出力信号のタイミングチャートであ
る。この図11は、主走査カウンタ4が00hのとき、
低速シリアルI/OのSIOチャネル0(アドレスXX
00hに送信データバッファ、アドレスXX01hに受
信データバッファを持つ)が駆動し、同様に主走査カウ
ンタ4が01hのとき、高速シリアルI/OのSIOチ
ャネル1(アドレスXX02hに送信データバッファ、
アドレスXX03hに受信データバッファを持つ)が駆
動し、転送速度の異なる2つのシリアルI/Oが転送ク
ロック、入出力データライン、シフトレジスタ34を時
分割して使用している様子を示している。
FIG. 9 is an operation flowchart of the SIO 3 in the third embodiment, and FIG. 10 is an operation flowchart of the DMA controller 2. In addition, FIG. 11 is a timing chart of input / output signals of each part in the third embodiment. In FIG. 11, when the main scanning counter 4 is 00h,
Low-speed serial I / O SIO channel 0 (address XX
When the send data buffer is driven at 00h and the receive data buffer is at address XX01h, and when the main scanning counter 4 is 01h, the SIO channel 1 of the high-speed serial I / O (send data buffer at address XX02h,
The address XX03h has a receive data buffer), and two serial I / Os having different transfer rates use the transfer clock, the input / output data line, and the shift register 34 in a time-division manner.

【0057】システムが立ち上がると、SIO3は図9
のフローチャートに従い処理を実行する。まず、主走査
カウンタ4の値に対応するDMAアドレスの発生タイミ
ングがくると(判断501)、カウンタ値(図11の例
では“00h”)に対応し、送信データバッファとなる
DMAアドレス(図11の例では“XX00h”)を発
生し、同時にメモリリード/ライト信号MEMRWをリ
ード(図11でMEMRWが“Hi”)にする(処理5
02)。次に、メモリ→シフトレジスタ方向のDMAリ
クエスト発生タイミングがくると(判断503)、DM
AリクエストDREQをイネーブルにする(処理50
4)。
When the system is started up, SIO3 is set in FIG.
The process is executed according to the flowchart of. First, when the generation timing of the DMA address corresponding to the value of the main scanning counter 4 comes (decision 501), the DMA address corresponding to the counter value (“00h” in the example of FIG. 11) becomes the transmission data buffer (FIG. 11). In this example, "XX00h") is generated, and at the same time, the memory read / write signal MEMRW is read (MEMRW is "Hi" in FIG. 11) (process 5).
02). Next, when the DMA request generation timing in the memory → shift register direction comes (decision 503), DM
Enable A-request DREQ (process 50)
4).

【0058】DMAコントローラ2は、上記DMAリク
エストを受け付けると、他のDMAチャネルとの優先順
位の比較等の処理を行った後、本DMAの処理を図10
のフローチャートに従い実行する。図10にてDMAの
実行を開始すると、メモリリード/ライト信号MEMR
Wがリード(図11でMEMRWが“Hi”)のとき、
SIO3からのアドレスADD0〜ADD15をアドレ
スバス7に出力する(判断601→処理602)。次
に、RAM5に対しメモリリード信号MEMRDBを発
生し、転送データをデータバス6に出力させるととも
に、SIO3のシフトレジスタ34に対しレジスタライ
ト信号SIOWRBを発生し、メモリ→シフトレジスタ
のDMA転送を行う(処理603)。
When the DMA controller 2 receives the above DMA request, it performs processing such as comparison of priorities with other DMA channels, and then executes the processing of this DMA as shown in FIG.
Execute according to the flowchart in. When the DMA execution is started in FIG. 10, the memory read / write signal MEMR
When W is a lead (MEMRW is “Hi” in FIG. 11),
Addresses ADD0 to ADD15 from SIO3 are output to address bus 7 (decision 601 → process 602). Next, the memory read signal MEMRDB is generated for the RAM 5, the transfer data is output to the data bus 6, and the register write signal SIOWRB is generated for the shift register 34 of the SIO 3 to perform the DMA transfer from the memory to the shift register ( Process 603).

【0059】SIO3は、レジスタライト信号SIOW
RBによりDMAの終了を確認し、DMAリクエストD
REQをディスエーブルにする(判断505→処理50
6)。その後、主走査カウンタ4のカウント値(図11
では00h)に対応する転送クロック(図11では低速
クロックSIOSCK0)を選択して(判断507→処
理508)、転送クロックSIOSCK0を発生し、出
力データSIOSODと入力データSIOSIDのシリ
アル転送を行う(処理511)。
SIO3 is a register write signal SIOW.
Confirm the end of DMA by RB, DMA request D
Disable REQ (decision 505 → process 50)
6). After that, the count value of the main scanning counter 4 (see FIG.
00h), a transfer clock (low-speed clock SIOSCK0 in FIG. 11) is selected (decision 507 → process 508), a transfer clock SIOSCK0 is generated, and output data SIOSOD and input data SIOSID are serially transferred (process 511). ).

【0060】シリアル転送が終了すると、DMAアドレ
スを受信データバッファアドレス(図11の例では“X
X01h”)に切り換え、メモリリード/ライト信号M
EMRWをライト(図8でMEMRWが“Low”)に
切り換える(処理512)。
When the serial transfer is completed, the DMA address is set to the reception data buffer address ("X" in the example of FIG. 11).
X01h "), and the memory read / write signal M
The EMRW is switched to write (MEMRW is “Low” in FIG. 8) (process 512).

【0061】シフトレジスタ→メモリ方向のDMAリク
エスト発生タイミングがくるとDMAリクエストDRE
Qをイネーブルにする(判断513→処理514)。
When a DMA request generation timing in the shift register → memory direction comes, a DMA request DRE
Q is enabled (decision 513 → process 514).

【0062】DMAコントローラ2は、上記と同様に図
10のフローチャートに従い処理を実行する。すなわ
ち、メモリリード/ライト信号MEMRWがライト(図
11でMEMRWが“Low”)のとき(判断60
1)、SIO3からのアドレスADD0〜ADD15を
アドレスバス7に出力する(処理604)。次に、SI
O3のシフトレジスタ34に対しレジスタリード信号S
IORDBを発生し、転送データをデータバス6に出力
させるとともに、RAM5に対してメモリライト信号M
EMWRBを発生し、シフトレジスタ→メモリのDMA
転送を行う(処理605)。
The DMA controller 2 executes the processing according to the flow chart of FIG. 10 similarly to the above. That is, when the memory read / write signal MEMRW is write (MEMRW is “Low” in FIG. 11) (determination 60
1), the addresses ADD0 to ADD15 from SIO3 are output to the address bus 7 (process 604). Next, SI
Register read signal S to the O3 shift register 34
IORDB is generated, the transfer data is output to the data bus 6, and the memory write signal M is sent to the RAM 5.
EMWRB generated, shift register → memory DMA
Transfer is performed (process 605).

【0063】SIO3は、同様に、レジスタリード信号
SIORDBによりDMA転送の終了を確認し、DMA
リクエストDREQをディスエーブルにする(判断51
5→処理516)。そして、最初の判断501に戻り、
上述した一連の処理を繰り返す。
Similarly, the SIO 3 confirms the end of the DMA transfer by the register read signal SIORDB,
Disable request DREQ (decision 51
5 → Process 516). Then, returning to the first decision 501,
The series of processes described above is repeated.

【0064】すなわち、主走査カウンタ4が00hのと
きは、アドレスXX00hに送信データバッファ、アド
レスXX01hに受信データバッファを持つ低速シリア
ルI/OのSIOチャネル0(図11で転送クロックS
IOSCK0)が駆動し、同様に主走査カウンタ4が0
1hのときは、アドレスXX02hに送信データバッフ
ァ、アドレスXX03hに受信データバッファを持つ高
速シリアルI/OのSIOチャネル1(図11で転送ク
ロックSIOSCK0)が駆動する。
That is, when the main scanning counter 4 is 00h, the SIO channel 0 of the low-speed serial I / O having the transmission data buffer at the address XX00h and the reception data buffer at the address XX01h (transfer clock S in FIG. 11).
IOSCK0) is driven and the main scanning counter 4 is set to 0 in the same manner.
At 1h, the SIO channel 1 (transfer clock SIOSCK0 in FIG. 11) of the high-speed serial I / O having the transmission data buffer at the address XX02h and the reception data buffer at the address XX03h is driven.

【0065】このように、転送速度の異なるシリアルポ
ートを1つのシフトレジスタ34で実現することができ
るので、前記第1の実施例の効果に加えて、さらに回路
規模を縮小し、低コスト化を図ることができる。
As described above, since the serial ports having different transfer rates can be realized by one shift register 34, in addition to the effect of the first embodiment, the circuit scale can be further reduced and the cost can be reduced. Can be planned.

【0066】次に、本発明によるシリアルデータ転送方
法の第4の実施例を説明する。
Next, a fourth embodiment of the serial data transfer method according to the present invention will be described.

【0067】図12は第4の実施例におけるSIO3の
動作フローチャート、図13はDMAコントローラ2の
動作フローチャートである。また、図14は第4の実施
例における各部の入出力信号のタイミングチャートであ
る。この図14は、主走査カウンタ4が00h,03
h,・・・のとき、シリアルI/OのSIOチャネル0
(アドレスXX00hに送信データバッファ、アドレス
XX01hに受信データバッファを持つ)が駆動し、同
様に主走査カウンタ4が01h,04hのとき、シリア
ルI/OのSIOチャネル1(アドレスXX02hに送
信データバッファ、アドレスXX03hに受信データバ
ッファを持つ)が駆動し、主走査カウンタ4が02h,
05hのとき、シリアルI/OのSIOチャネル2(ア
ドレスXX04hに送信データバッファ、アドレスXX
05hに受信データバッファを持つ)が駆動し、3つの
シリアルI/Oが転送クロック、入出力データライン、
シフトレジスタ34を時分割して使用している様子を示
している。
FIG. 12 is an operation flowchart of the SIO 3 in the fourth embodiment, and FIG. 13 is an operation flowchart of the DMA controller 2. In addition, FIG. 14 is a timing chart of input / output signals of each part in the fourth embodiment. In FIG. 14, the main scanning counter 4 has 00h, 03
When h, ..., SIO channel 0 of serial I / O
When the main scanning counter 4 is 01h and 04h (the transmission data buffer is located at the address XX00h and the reception data buffer is located at the address XX01h), the SIO channel 1 of the serial I / O (the transmission data buffer at the address XX02h, (The reception data buffer is provided at the address XX03h), and the main scanning counter 4 operates at 02h,
When 05h, SIO channel 2 of serial I / O (transmission data buffer at address XX04h, address XX
05h has a reception data buffer), and three serial I / Os transfer clock, input / output data line,
It shows that the shift register 34 is used in a time division manner.

【0068】システムが立ち上がると、SIO3は図1
2のフローチャートに従い処理を実行する。まず、主走
査カウンタ4の値に対応するDMAアドレスの発生タイ
ミングがきて、転送要求レジスタ37の要求フラグが
“1”であると、主走査カウンタ値(図14の例では
“00h”)に対応し、送信データバッファとなるDM
Aアドレス(図14の例では“XX00h”)を発生
し、同時にメモリリード/ライト信号MEMRWをリー
ド(図14でMEMRWが“Hi”)にする(判断70
1→判断702→処理703)。次に、メモリ→シフト
レジスタ方向のDMAリクエスト発生タイミングがくる
と(判断704)、DMAリクエストDREQをイネー
ブルにする(処理705)。
When the system is started up, SIO3 is set in FIG.
The process is executed according to the flowchart of 2. First, when the generation timing of the DMA address corresponding to the value of the main scanning counter 4 comes and the request flag of the transfer request register 37 is "1", it corresponds to the main scanning counter value ("00h" in the example of FIG. 14). And becomes a transmission data buffer DM
The A address (“XX00h” in the example of FIG. 14) is generated, and at the same time, the memory read / write signal MEMRW is read (MEMRW is “Hi” in FIG. 14) (determination 70).
1 → judgment 702 → process 703). Next, when the DMA request generation timing in the memory → shift register direction comes (decision 704), the DMA request DREQ is enabled (process 705).

【0069】DMAコントローラ2は、上記DMAリク
エストを受け付けると、他のDMAチャネルとの優先順
位の比較等の処理を行った後、本DMAの処理を図13
のフローチャートに従い実行する。図13にてDMAの
実行を開始すると、メモリリード/ライト信号MEMR
Wがリード(図14でMEMRWが“Hi”)のとき、
SIO3からのアドレスADD0〜ADD15をアドレ
スバス7に出力する(判断801→処理802)。次
に、RAM5に対しメモリリード信号MEMRDBを発
生し、転送データをデータバス6に出力させるととも
に、SIO3のシフトレジスタ34に対しレジスタライ
ト信号SIOWRBを発生し、メモリ→シフトレジスタ
のDMA転送を行う(処理803)。
When the DMA controller 2 receives the above DMA request, it performs processing such as priority comparison with other DMA channels, and then executes the processing of this DMA as shown in FIG.
Execute according to the flowchart in. When the DMA execution is started in FIG. 13, the memory read / write signal MEMR
When W is a lead (MEMRW is “Hi” in FIG. 14),
Addresses ADD0 to ADD15 from SIO3 are output to address bus 7 (decision 801 → process 802). Next, the memory read signal MEMRDB is generated for the RAM 5, the transfer data is output to the data bus 6, and the register write signal SIOWRB is generated for the shift register 34 of the SIO 3 to perform the DMA transfer from the memory to the shift register ( Process 803).

【0070】SIO3は、レジスタライト信号SIOW
RBによりDMA転送の終了を確認し、DMAリクエス
トDREQをディスエーブルにする(判断706→処理
707)。その後、転送クロックSIOSCKを発生
し、出力データSIOSODと入力データSIOSID
のシリアル転送を行う(処理708)。
SIO3 is a register write signal SIOW
The RB confirms the end of the DMA transfer, and disables the DMA request DREQ (decision 706 → process 707). After that, the transfer clock SIOSCK is generated, and the output data SIOSOD and the input data SIOSID are generated.
Is serially transferred (process 708).

【0071】シリアル転送が終了すると、DMAアドレ
スを受信データバッファアドレス(図14の例では“X
X01h”)に切り換え、メモリリード/ライト信号M
EMRWをライト(図14ではMEMRWが“Lo
w”)に切り換える(処理709)。
When the serial transfer is completed, the DMA address is changed to the reception data buffer address ("X" in the example of FIG. 14).
X01h "), and the memory read / write signal M
Write EMRW (in FIG. 14, MEMRW is “Lo”
w ″) (process 709).

【0072】シフトレジスタ→メモリ方向のDMAリク
エスト発生タイミングがくるとDMAリクエストDRE
Qをイネーブルにする(判断710→処理711)。
When the DMA request generation timing in the shift register → memory direction comes, the DMA request DRE
Q is enabled (decision 710 → process 711).

【0073】DMAコントローラ2は、上記と同様に図
13のフローチャートに従い処理を実行する。すなわ
ち、メモリリード/ライト信号MEMRWがライト(図
14でMEMRWが“Low”)のとき(判断80
1)、SIO3からのアドレスADD0〜ADD15を
アドレスバス7に出力する(処理804)。次に、SI
O3のシフトレジスタ34に対しレジスタリード信号S
IORDBを発生し、転送データをデータバス6に出力
させるとともに、RAM5に対してメモリライト信号M
EMWRBを発生し、シフトレジスタ→メモリのDMA
転送を行う(処理805)。
The DMA controller 2 executes the processing according to the flow chart of FIG. 13 similarly to the above. That is, when the memory read / write signal MEMRW is write (MEMRW is “Low” in FIG. 14) (determination 80
1), the addresses ADD0 to ADD15 from SIO3 are output to the address bus 7 (process 804). Next, SI
Register read signal S to the O3 shift register 34
IORDB is generated, the transfer data is output to the data bus 6, and the memory write signal M is sent to the RAM 5.
EMWRB generated, shift register → memory DMA
Transfer is performed (process 805).

【0074】SIO3は、同様に、レジスタリード信号
SIORDBによりDMA転送の終了を確認し、DMA
リクエストDREQをディスエーブルにするとともに、
転送要求レジスタ37の要求フラグをリセットする(判
断712→処理713)。そして、最初の判断701に
戻り、上述した一連の処理を繰り返す。CPU1は上記
転送要求レジスタ37の要求フラグをポーリングにより
監視しており、要求フラグがリセットされたことを検知
すると、転送終了を確認し、RAM5内の転送データを
更新する。
Similarly, the SIO 3 confirms the end of the DMA transfer by the register read signal SIORDB,
While disabling the request DREQ,
The request flag of the transfer request register 37 is reset (decision 712 → process 713). Then, the process returns to the first determination 701, and the series of processes described above is repeated. The CPU 1 monitors the request flag of the transfer request register 37 by polling. When it detects that the request flag has been reset, it confirms the end of transfer and updates the transfer data in the RAM 5.

【0075】すなわち、主走査カウンタ4が00h,0
3h,・・・のときは、アドレスXX00hに送信デー
タバッファ、アドレスXX01hに受信データバッファ
を持つSIOチャネル0が駆動し、主走査カウンタ4が
01h,04hのときは、アドレスXX02hに送信デ
ータバッファ、アドレスXX03hに受信データバッフ
ァを持つSIOチャネル1が駆動し、主走査カウンタ4
が02h,05hのときは、アドレスXX04hに送信
データバッファ、アドレスXX05hに受信データバッ
ファを持つSIOチャネル2が駆動する。
That is, the main scanning counter 4 sets 00h, 0
3h, ..., SIO channel 0 having a transmission data buffer at address XX00h and a reception data buffer at address XX01h is driven, and when the main scanning counter 4 is 01h, 04h, transmission data buffer at address XX02h, The SIO channel 1 having the receive data buffer at the address XX03h is driven, and the main scan counter 4
Is 02h and 05h, the SIO channel 2 having the transmission data buffer at the address XX04h and the reception data buffer at the address XX05h is driven.

【0076】ところで、前記第1の実施例〜第3の実施
例では、1走査間に1つのチャネルでは1回のデータ転
送しかできなかったが、本実施例では、時分割により形
成される各SIOチャネルが1走査間に複数回駆動でき
るので、第1の実施例の効果に加えて、1走査間に各チ
ャネル毎に複数回のシリアル転送が可能となり、データ
転送量を増加することができる。
By the way, in the first to third embodiments, only one data transfer was possible in one channel during one scanning, but in this embodiment, each data is formed by time division. Since the SIO channel can be driven multiple times during one scan, in addition to the effect of the first embodiment, serial transfer can be performed multiple times for each channel during one scan, and the amount of data transfer can be increased. .

【0077】次に、本発明によるシリアルデータ転送方
法の第5の実施例を説明する。
Next explained is a fifth embodiment of serial data transfer method according to the invention.

【0078】図15は第5の実施例におけるSIO3の
動作フローチャート、図16はDMAコントローラ2の
動作フローチャートである。また、図17は第5の実施
例における各部の入出力信号のタイミングチャートであ
る。この図17は、主走査カウンタ4が00h〜05h
のとき、シリアルI/OのSIOチャネル0(アドレス
XX00h,XX02h,XX04h,XX06h,X
X08h,XX0ahに送信データバッファ、アドレス
XX01h,XX03h,XX05h,XX07h,X
X09h,XX0bhに受信データバッファを持つ)が
駆動している様子を示している。
FIG. 15 is an operation flowchart of the SIO 3 in the fifth embodiment, and FIG. 16 is an operation flowchart of the DMA controller 2. In addition, FIG. 17 is a timing chart of the input / output signals of each part in the fifth embodiment. In FIG. 17, the main scanning counter 4 is 00h to 05h.
, The serial I / O SIO channel 0 (addresses XX00h, XX02h, XX04h, XX06h, X
Send data buffers at X08h and XX0ah, addresses XX01h, XX03h, XX05h, XX07h, X
X09h and XX0bh have reception data buffers).

【0079】システムが立ち上がると、SIO3は図1
5のフローチャートに従い処理を実行する。まず、主走
査カウンタ4の値に対応するDMAアドレスの発生タイ
ミングがきて、転送バイト数設定レジスタ35が0でな
いとき、主走査カウンタ値(図17の例では“00
h”)に対応し、送信データバッファとなるDMAアド
レス(図17の例では“XX00h”)を発生し、同時
にメモリリード/ライト信号MEMRWをリード(図1
7でMEMRWが“Hi”)にする(判断901→判断
902→処理903)。次に、メモリ→シフトレジスタ
方向のDMAリクエスト発生タイミングがくると(判断
904)、DMAリクエストDREQをイネーブルにす
る(処理905)。
When the system is started up, SIO3 is set in FIG.
The process is executed according to the flowchart of FIG. First, when the generation timing of the DMA address corresponding to the value of the main scanning counter 4 comes and the transfer byte number setting register 35 is not 0, the main scanning counter value (“00” in the example of FIG. 17).
corresponding to "h"), a DMA address ("XX00h" in the example of FIG. 17) that serves as a transmission data buffer is generated, and at the same time, the memory read / write signal MEMRW is read (FIG. 1).
In step 7, MEMRW is set to “Hi”) (decision 901 → decision 902 → process 903). Next, when the DMA request generation timing in the memory → shift register direction comes (decision 904), the DMA request DREQ is enabled (process 905).

【0080】DMAコントローラ2は、上記DMAリク
エストを受け付けると、他のDMAチャネルとの優先順
位の比較等の処理を行った後、本DMAの処理を図16
のフローチャートに従い実行する。図16にてDMAの
実行を開始すると、メモリリード/ライト信号MEMR
Wがリード(図17でMEMRWが“Hi”)のとき、
SIO3からのアドレスADD0〜ADD15をアドレ
スバス7に出力する(判断1001→処理1002)。
次に、RAM5に対しメモリリード信号MEMRDBを
発生し、転送データをデータバス6に出力させるととも
に、SIO3のシフトレジスタ34に対しレジスタライ
ト信号SIOWRBを発生し、メモリ→シフトレジスタ
のDMA転送を行う(処理1003)。
When the DMA controller 2 receives the above DMA request, it performs processing such as priority comparison with other DMA channels, and then executes the processing of this DMA as shown in FIG.
Execute according to the flowchart in. When the DMA execution is started in FIG. 16, the memory read / write signal MEMR
When W is the lead (MEMRW is “Hi” in FIG. 17),
Addresses ADD0 to ADD15 from SIO3 are output to address bus 7 (determination 1001 → processing 1002).
Next, the memory read signal MEMRDB is generated for the RAM 5, the transfer data is output to the data bus 6, and the register write signal SIOWRB is generated for the shift register 34 of the SIO 3 to perform the DMA transfer from the memory to the shift register ( Process 1003).

【0081】SIO3は、レジスタライト信号SIOW
RBによりDMA転送の終了を確認し、DMAリクエス
トDREQをディスエーブルにする(判断906→処理
907)。その後、転送クロックSIOSCKを発生
し、出力データSIOSODと入力データSIOSID
のシリアル転送を行う(処理908)。
SIO3 is a register write signal SIOW.
The RB confirms the end of the DMA transfer, and disables the DMA request DREQ (decision 906 → process 907). After that, the transfer clock SIOSCK is generated, and the output data SIOSOD and the input data SIOSID are generated.
Is serially transferred (process 908).

【0082】シリアル転送が終了すると、DMAアドレ
スを受信データバッファアドレス(図17の例では“X
X01h”)に切り換え、メモリリード/ライト信号M
EMRWをライト(図17でMEMRWが“Low”)
に切り換える(処理909)。
When the serial transfer is completed, the DMA address is changed to the reception data buffer address ("X" in the example of FIG. 17).
X01h "), and the memory read / write signal M
Write EMRW (MEMRW is "Low" in Figure 17)
(Process 909).

【0083】シフトレジスタ→メモリ方向のDMAリク
エスト発生タイミングがくるとDMAリクエストDRE
Qをイネーブルにする(判断910→処理911)。
When a DMA request generation timing in the shift register → memory direction comes, a DMA request DRE
Q is enabled (decision 910 → process 911).

【0084】DMAコントローラ2は、上記と同様に図
15のフローチャートに従い処理を実行する。すなわ
ち、メモリリード/ライト信号MEMRWがライト(図
17でMEMRWが“Low”)のとき、SIO3から
のアドレスADD0〜ADD15をアドレスバス7に出
力する(判断1001→処理1004)。次に、SIO
3のシフトレジスタ34に対しレジスタリード信号SI
ORDBを発生し、転送データをデータバス6に出力さ
せるとともに、RAM5に対してメモリライト信号ME
MWRBを発生し、シフトレジスタ→メモリのDMA転
送を行う(処理1005)。
The DMA controller 2 executes the processing according to the flow chart of FIG. 15 as described above. That is, when the memory read / write signal MEMRW is a write (MEMRW is “Low” in FIG. 17), the addresses ADD0 to ADD15 from SIO3 are output to the address bus 7 (decision 1001 → process 1004). Next, SIO
Register read signal SI to the shift register 34 of 3
ORDB is generated, the transfer data is output to the data bus 6, and the memory write signal ME is sent to the RAM 5.
MWRB is generated, and DMA transfer from the shift register to the memory is performed (process 1005).

【0085】SIO3は、同様に、レジスタリード信号
SIORDBによりDMA転送の終了を確認し、DMA
リクエストDREQをディスエーブルにする(判断91
2→処理913)。また、転送バイト数設定レジスタ3
5をデクリメントするとともに、DMAアドレスADD
0〜ADD15をインクリメントする。そして、最初の
判断701に戻り、上述した一連の処理を繰り返す。
Similarly, the SIO 3 confirms the end of the DMA transfer by the register read signal SIORDB,
Disable request DREQ (decision 91
2 → Process 913). Also, the transfer byte number setting register 3
Decrement 5 and add DMA address ADD
Increment 0 to ADD15. Then, the process returns to the first determination 701, and the series of processes described above is repeated.

【0086】すなわち、主走査カウンタ4が00h〜0
5hのとき、アドレスXX00h,XX02h,XX0
4h,XX06h,XX08h,XX0ahに送信デー
タバッファ、アドレスXX01h,XX03h,XX0
5h,XX07h,XX09h,XX0bhに受信デー
タバッファを持つSIOチャネル0がCPU1によるソ
フトウエアの介在なしに駆動する。
That is, the main scanning counter 4 is 00h to 0.
When it is 5h, addresses XX00h, XX02h, XX0
4h, XX06h, XX08h, XX0ah, send data buffers, addresses XX01h, XX03h, XX0.
The SIO channel 0 having the receive data buffers at 5h, XX07h, XX09h, and XX0bh is driven without software intervention by the CPU 1.

【0087】ところで、前記第4の実施例において、1
走査間に各チャネルで大量のデータ転送を行うには、1
回の転送毎にCPU1によるソフトウエアの介在が必要
となるため、CPU1の負荷増大を招くが、本実施例で
は、そのような不具合を生じることなく、1走査間に大
量のシリアル転送が可能となる。
By the way, in the fourth embodiment, 1
1 for bulk data transfer on each channel between scans
Since it is necessary to intervene the software by the CPU 1 for each transfer, the load on the CPU 1 increases, but in the present embodiment, a large amount of serial transfer is possible during one scan without causing such a problem. Become.

【0088】なお、上記各実施例では、所定の同期信号
に同期して一定期間をカウントするカウンタとして、フ
ァクシミリ装置等における主走査同期信号に同期して1
走査間をカウントする主走査カウンタ4を用いたが、本
発明はこれに限定されるものではなく、本発明を適用す
るシステムに応じて、当該システムで用いられるこの種
のカウンタが適用されるものである。
In each of the above-described embodiments, the counter for counting a fixed period in synchronization with a predetermined synchronization signal is used as a counter in synchronization with a main scanning synchronization signal in a facsimile machine or the like.
Although the main scanning counter 4 that counts between scans is used, the present invention is not limited to this, and a counter of this type used in the system is applied depending on the system to which the present invention is applied. Is.

【0089】[0089]

【発明の効果】請求項1記載の発明によれば、周辺装置
毎のシリアルポートに共用される1つのシフトレジスタ
を備え、DMA転送によりメモリと前記シフトレジスタ
間のデータの受け渡しを中央処理装置を介さずに行うシ
リアルデータ転送方法であって、所定の同期信号に同期
して一定期間をカウントするカウンタを有し、このカウ
ント値により各シリアルポートに対応する複数のDMA
転送アドレスを時分割で発生させ、前記一定期間に複数
チャネルのシリアル転送を同じシフトレジスタを用いて
行うようにしたので、1つのシフトレジスタで複数のシ
リアルポートを実現することができ、回路規模が縮小
し、低コスト化が図れる効果がある。
According to the first aspect of the present invention, a central processing unit is provided which is provided with one shift register shared by serial ports for each peripheral device and which transfers data between the memory and the shift register by DMA transfer. This is a serial data transfer method that is performed without intervention, and has a counter that counts a certain period in synchronization with a predetermined synchronization signal, and a plurality of DMAs corresponding to each serial port by this count value.
Since the transfer addresses are generated in a time-sharing manner and the serial transfer of a plurality of channels is performed using the same shift register in the fixed period, a plurality of serial ports can be realized by one shift register, and the circuit scale becomes large. There is an effect that the size can be reduced and the cost can be reduced.

【0090】さらに、請求項2記載の発明によれば、前
記カウンタのカウント値によりDMA転送の転送データ
幅を変化させ、前記一定期間に転送データ幅の異なるシ
リアル転送を同じシフトレジスタを用いて行うようにし
たので、前記請求項1の効果に加えて、転送データ幅の
異なるシリアルポートを1つのシフトレジスタで実現で
き、さらに回路規模を縮小し、低コスト化が図れる効果
がある。
Further, according to the second aspect of the present invention, the transfer data width of the DMA transfer is changed according to the count value of the counter, and the serial transfer having the different transfer data width is performed using the same shift register in the fixed period. As a result, in addition to the effect of claim 1, serial ports having different transfer data widths can be realized by one shift register, and the circuit scale can be further reduced and the cost can be reduced.

【0091】また、請求項3記載の発明によれば、前記
カウンタのカウンタ値により転送クロックを変化させ、
前記一定期間に転送速度の異なるシリアル転送を同じシ
フトレジスタを用いて行うようにしたので、前記請求項
1の効果に加えて、転送速度の異なる複数のシリアルポ
ートを1つのシフトレジスタで実現でき、さらに回路規
模を縮小し、低コスト化が図れる効果がある。
According to the invention of claim 3, the transfer clock is changed according to the counter value of the counter,
Since serial transfer with different transfer rates is performed using the same shift register in the fixed period, in addition to the effect of claim 1, a plurality of serial ports with different transfer rates can be realized by one shift register, Further, there is an effect that the circuit scale can be reduced and the cost can be reduced.

【0092】一方、請求項4記載の発明によれば、前記
中央処理装置からの転送要求によりセットされ、転送終
了後にリセットされる転送要求設定手段を有し、前記カ
ウンタのカウント値により一定期間に同じDMAアドレ
スを複数回発生させ、中央処理装置は前記転送要求設定
手段の設定状態を監視し、転送終了後にメモリのデータ
を更新することで、各シリアルポートが一定期間に複数
回駆動するようにしたので、前記請求項1の効果に加え
て、一定期間に各シリアルポートで複数回のシリアル転
送が可能となり、データ転送量を増加できる効果があ
る。
On the other hand, according to the invention described in claim 4, there is provided a transfer request setting means which is set by a transfer request from the central processing unit and is reset after the transfer is completed, and the transfer count is set to a fixed period depending on the count value of the counter. The same DMA address is generated a plurality of times, the central processing unit monitors the setting state of the transfer request setting means, and updates the data in the memory after the transfer is completed, so that each serial port is driven a plurality of times within a certain period. Therefore, in addition to the effect of the first aspect, there is an effect that the serial transfer can be performed plural times in each serial port in a certain period, and the data transfer amount can be increased.

【0093】また、請求項5記載の発明によれば、前記
中央処理装置が転送バイト数を設定するための転送バイ
ト数設定手段を有し、前記カウンタのカウント値により
DMA転送アドレスを変化させ、1回の転送が終わると
前記転送バイト数設定手段の値を減算し、一定期間に複
数のDMA転送アドレスを発生させ、前記転送バイト数
設定手段の値が零になるまでDMA転送を行うようにし
たので、請求項1の効果に加えて、中央処理装置による
ソフトウエアの負荷を増大することなく、一定期間に大
量のシリアル転送が可能となる効果がある。
According to the invention of claim 5, the central processing unit has a transfer byte number setting means for setting the transfer byte number, and changes the DMA transfer address according to the count value of the counter. When one transfer is completed, the value of the transfer byte number setting means is subtracted, a plurality of DMA transfer addresses are generated in a certain period, and DMA transfer is performed until the value of the transfer byte number setting means becomes zero. Therefore, in addition to the effect of claim 1, there is an effect that a large amount of serial transfer can be performed in a certain period without increasing the load of software by the central processing unit.

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

【図1】本発明の実施例に係るシリアルデータ転送方法
を実現する構成要素を示すブロック図。
FIG. 1 is a block diagram showing components that realize a serial data transfer method according to an embodiment of the present invention.

【図2】上記図1のSIO3の内部構成を示すブロック
図。
FIG. 2 is a block diagram showing an internal configuration of the SIO 3 shown in FIG.

【図3】第1の実施例におけるSIOの動作フローチャ
ート。
FIG. 3 is an operation flowchart of SIO in the first embodiment.

【図4】第1の実施例におけるDMAコントローラの動
作フローチャート。
FIG. 4 is an operation flowchart of the DMA controller according to the first embodiment.

【図5】第1の実施例の動作を示すタイミングチャー
ト。
FIG. 5 is a timing chart showing the operation of the first embodiment.

【図6】第2の実施例におけるSIOの動作フローチャ
ート。
FIG. 6 is an operation flowchart of SIO in the second embodiment.

【図7】第2の実施例におけるDMAコントローラの動
作フローチャート。
FIG. 7 is an operation flowchart of the DMA controller according to the second embodiment.

【図8】第2の実施例の動作を示すタイミングチャー
ト。
FIG. 8 is a timing chart showing the operation of the second embodiment.

【図9】第3の実施例におけるSIOの動作フローチャ
ート。
FIG. 9 is an operation flowchart of SIO in the third embodiment.

【図10】第3の実施例におけるDMAコントローラの
動作フローチャート。
FIG. 10 is an operation flowchart of the DMA controller according to the third embodiment.

【図11】第3の実施例の動作を示すタイミングチャー
ト。
FIG. 11 is a timing chart showing the operation of the third embodiment.

【図12】第4の実施例におけるSIOの動作フローチ
ャート。
FIG. 12 is an operation flowchart of SIO in the fourth embodiment.

【図13】第4の実施例におけるDMAコントローラの
動作フローチャート。
FIG. 13 is an operation flowchart of the DMA controller according to the fourth embodiment.

【図14】第4の実施例の動作を示すタイミングチャー
ト。
FIG. 14 is a timing chart showing the operation of the fourth embodiment.

【図15】第5の実施例におけるSIOの動作フローチ
ャート。
FIG. 15 is an operation flowchart of SIO in the fifth embodiment.

【図16】第5の実施例におけるDMAコントローラの
動作フローチャート。
FIG. 16 is an operation flowchart of the DMA controller according to the fifth embodiment.

【図17】第5の実施例の動作を示すタイミングチャー
ト。
FIG. 17 is a timing chart showing the operation of the fifth embodiment.

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

1 CPU 2 DMAコントローラ 3 SIO 4 主走査カウンタ 5 RAM 6 データバス 7 アドレスバス 8 周辺装置 31 タイミング制御部 32 クロック発生部 33 DMAアドレス発生部 34 シフトレジスタ 35 転送バイト数設定レジスタ 36 DREQ発生部 37 転送要求レジスタ 1 CPU 2 DMA controller 3 SIO 4 Main scanning counter 5 RAM 6 data bus 7 address bus 8 peripheral devices 31 Timing control unit 32 clock generator 33 DMA address generator 34 shift register 35 Transfer byte number setting register 36 DREQ generator 37 Transfer Request Register

───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.7,DB名) G06F 13/28 310 EUROPAT(QUESTEL) WPI(DIALOG)─────────────────────────────────────────────────── ─── Continuation of the front page (58) Fields surveyed (Int.Cl. 7 , DB name) G06F 13/28 310 EUROPAT (QUESTEL) WPI (DIALOG)

Claims (5)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 周辺装置毎のシリアルポートに共用され
る1つのシフトレジスタを備え、DMA転送によりメモ
リと前記シフトレジスタ間のデータの受け渡しを中央処
理装置を介さずに行うシリアルデータ転送方法であっ
、 所定の同期信号に同期して一定期間をカウントするカウ
ンタを有し、このカウント値により各シリアルポートに
対応する複数のDMA転送アドレスを時分割で発生さ
せ、前記一定期間に複数チャネルのシリアル転送を同じ
シフトレジスタを用いて行うことを特徴とするシリアル
データ転送方法。
1. A shared serial port for each peripheral device
A serial data transfer method in which data is transferred between the memory and the shift register by DMA transfer without using a central processing unit.
And has a counter that counts a fixed period in synchronization with a predetermined synchronization signal, and a plurality of DMA transfer addresses corresponding to each serial port are generated in a time-division manner by this count value. A serial data transfer method characterized in that transfer is performed using the same shift register.
【請求項2】 前記カウンタのカウント値によりDMA
転送の転送データ幅を変化させ、前記一定期間に転送デ
ータ幅の異なるシリアル転送を同じシフトレジスタを用
いて行うことを特徴とする請求項1記載のシリアルデー
タ転送方法。
2. The DMA according to the count value of the counter
2. The serial data transfer method according to claim 1, wherein the transfer data width of the transfer is changed, and serial transfer with different transfer data widths is performed using the same shift register during the fixed period.
【請求項3】 前記カウンタのカウント値により転送ク
ロックを変化させ、前記一定期間に転送速度の異なるシ
リアル転送を同じシフトレジスタを用いて行うことを特
徴とする請求項1記載のシリアルデータ転送方法。
3. The serial data transfer method according to claim 1, wherein the transfer clock is changed according to the count value of the counter, and serial transfer with different transfer rates is performed using the same shift register during the fixed period.
【請求項4】 前記中央処理装置からの転送要求により
セットされ、転送終了後にリセットされる転送要求設定
手段を有し、 前記カウンタのカウント値により前記一定期間に同じD
MAアドレスを複数回発生させ、中央処理装置は前記転
送要求設定手段の設定状態を監視し、転送終了後にメモ
リのデータを更新することで、各シリアルポートが前記
一定期間に複数回駆動することを特徴とする請求項1記
載のシリアルデータ転送方法。
4. A transfer request setting unit that is set by a transfer request from the central processing unit and is reset after the transfer is completed, and has the same D during the certain period depending on the count value of the counter.
By generating the MA address a plurality of times, the central processing unit monitors the setting state of the transfer request setting means, and updates the data in the memory after the transfer is completed, so that each serial port can be driven a plurality of times during the certain period. The serial data transfer method according to claim 1, characterized in that
【請求項5】 前記中央処理装置が転送バイト数を設定
するための転送バイト数設定手段を有し、 前記カウンタのカウント値によりDMA転送アドレスを
変化させ、1回の転送が終わると前記転送バイト数設定
手段の値を減算し、前記一定期間に複数のDMA転送ア
ドレスを発生させ、前記転送バイト数設定手段の値が零
になるまでDMA転送を行うことを特徴とする請求項1
記載のシリアルデータ転送方法。
5. The transfer byte number setting means for setting the transfer byte number in the central processing unit, the DMA transfer address is changed according to the count value of the counter, and the transfer byte is set when one transfer is completed. 2. The number of the number setting means is subtracted, a plurality of DMA transfer addresses are generated in the fixed period, and the DMA transfer is performed until the value of the transfer byte number setting means becomes zero.
Serial data transfer method described.
JP02233195A 1995-01-18 1995-01-18 Serial data transfer method Expired - Fee Related JP3418734B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP02233195A JP3418734B2 (en) 1995-01-18 1995-01-18 Serial data transfer method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP02233195A JP3418734B2 (en) 1995-01-18 1995-01-18 Serial data transfer method

Publications (2)

Publication Number Publication Date
JPH08194662A JPH08194662A (en) 1996-07-30
JP3418734B2 true JP3418734B2 (en) 2003-06-23

Family

ID=12079734

Family Applications (1)

Application Number Title Priority Date Filing Date
JP02233195A Expired - Fee Related JP3418734B2 (en) 1995-01-18 1995-01-18 Serial data transfer method

Country Status (1)

Country Link
JP (1) JP3418734B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109842601B (en) * 2017-11-29 2023-09-19 中国科学院沈阳自动化研究所 Manned submersible serial port data acquisition and forwarding device

Also Published As

Publication number Publication date
JPH08194662A (en) 1996-07-30

Similar Documents

Publication Publication Date Title
US5045997A (en) Data processor
EP2097828B1 (en) Dmac to handle transfers of unknown lengths
US5640602A (en) Transferring digital data in units of 2 bytes to increase utilization of a 2-byte-wide bus
JP2822986B2 (en) Single chip microcomputer with DMA
KR100375233B1 (en) Direct memory access controller being converted transfer mode flexibly according to data transfer counter value
US6782433B2 (en) Data transfer apparatus
US4473879A (en) Data transfer system in which time for transfer of data to a memory is matched to time required to store data in memory
JP3418734B2 (en) Serial data transfer method
US7007124B2 (en) Image processing system, and semiconductor device and digital still camera apparatus using image processing system
EP0939374A2 (en) Processor for information processing equipment and control method
EP1160671A2 (en) Host interface circuit
KR100633742B1 (en) Direct memory access controller for updating data transmission size automatically from peripheral, and control method thereof
KR100334044B1 (en) System lsi having communication function
JP3399776B2 (en) Computer and method for transferring peripheral device control data in computer
JP3548943B2 (en) Interrupt control method
JPH04225458A (en) Computer
KR950002316B1 (en) Data transmission device for fax
JPH086537A (en) Video data transferring and processing circuit
JPH08179893A (en) Information processor
JPH05324529A (en) Method and device for data transfer
KR940005003Y1 (en) Dynamic memory access system
JPS63187943A (en) Communication control equipment
JPH09259071A (en) Communication controller
JPS6342547A (en) Line control unit
JPH06187281A (en) Microcomputer and data transfer control circuit between data input/output device

Legal Events

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