JP2002252661A - Communication apparatus - Google Patents

Communication apparatus

Info

Publication number
JP2002252661A
JP2002252661A JP2001048799A JP2001048799A JP2002252661A JP 2002252661 A JP2002252661 A JP 2002252661A JP 2001048799 A JP2001048799 A JP 2001048799A JP 2001048799 A JP2001048799 A JP 2001048799A JP 2002252661 A JP2002252661 A JP 2002252661A
Authority
JP
Japan
Prior art keywords
input
signal
value
data
timer counter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2001048799A
Other languages
Japanese (ja)
Inventor
Hideki Kawamura
英樹 河村
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.)
Nippon Signal Co Ltd
Original Assignee
Nippon Signal 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 Nippon Signal Co Ltd filed Critical Nippon Signal Co Ltd
Priority to JP2001048799A priority Critical patent/JP2002252661A/en
Publication of JP2002252661A publication Critical patent/JP2002252661A/en
Pending legal-status Critical Current

Links

Landscapes

  • Synchronisation In Digital Transmission Systems (AREA)
  • Dc Digital Transmission (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a compact communication apparatus capable of conducting high-speed start-stop synchronization communication. SOLUTION: This invention comprises an input capture circuit, which detects an input capture value of leading and trailing edges of a prescribed signal based on a clock signal inputted from a timer counter and resets the timer counter during leading and trailing edges of the prescribed signal, an output compare circuit, which inputs a counter value from the timer counter and outputs an interrupt signal when the inputted counter value is larger than a prescribed data length included in the prescribed input signal, and a data generation means, which generates data based on the detected input capture value, and detects a data end by the interrupt signal from the output compare circuit.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、調歩同期式通信に
係る通信装置であって、特に、高速通信が可能な通信装
置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a communication device for start-stop synchronous communication, and more particularly to a communication device capable of high-speed communication.

【0002】[0002]

【従来の技術】従来、調歩同期式通信に係る通信装置
は、ストップ信号からスタート信号に変化した状態を検
出することにより、データの単位毎のキャラクタの始め
を知って同期をとり始めて各キャラクタを受信し、各キ
ャラクタに続くストップ信号を検出して終りを知り、同
期を休止するように構成されている。
2. Description of the Related Art Conventionally, a communication apparatus relating to start-stop synchronous communication detects a state in which a stop signal is changed to a start signal, thereby knowing the beginning of a character for each data unit and starting to synchronize so that each character is synchronized. It is configured to receive, detect a stop signal following each character to know the end, and suspend synchronization.

【0003】上述の調歩同期式通信がシングルチップマ
イコンで行われるときは、そのシングルチップマイコン
に内蔵されている通信モジュールで処理されるように構
成されている。
When the asynchronous communication is performed by a single-chip microcomputer, the communication is processed by a communication module built in the single-chip microcomputer.

【0004】[0004]

【発明が解決しようとする課題】しかしながら、上記従
来のシングルチップマイコンに内蔵されている通信モジ
ュールで調歩同期式通信を行う通信装置は、その通信モ
ジュールはシングルチップマイコン内蔵のタイマを用い
るために高速処理ができないという欠点があった。この
ような欠点を解決するために、高速処理を行おうとする
ときは、シングルチップマイコンに別付けで通信処理回
路を付加しなければならず、装置の大型化を招来する欠
点があった。特に、通信装置が非接触式自動改札機のよ
うに、既に実装密道が高い機器においては、小型化され
た高速処理の可能な通信装置の出現が待たれていた。
However, a communication device that performs start-stop synchronous communication with a communication module built in the above-mentioned conventional single-chip microcomputer has a high speed because the communication module uses a timer built in the single-chip microcomputer. There was a drawback that processing could not be performed. In order to solve such a drawback, when high-speed processing is to be performed, a communication processing circuit must be added separately to a single-chip microcomputer, and there is a drawback that the apparatus becomes large. In particular, in a device such as a non-contact automatic ticket gate that has already been mounted in a highly confidential manner, the emergence of a communication device that is reduced in size and capable of high-speed processing has been awaited.

【0005】そこで、本発明は、上記欠点を解決するた
めになされたものであって、その目的は、高速な調歩同
期式通信が可能で、かつ、小型化された通信装置を提供
することにある。
The present invention has been made in order to solve the above-mentioned drawbacks, and an object of the present invention is to provide a communication device which is capable of high-speed start-stop synchronous communication and is downsized. is there.

【0006】[0006]

【課題を解決するための手段】本発明に係る通信装置
は、上記目的を達成するために、タイマカウンタから入
力されたクロック信号に基づいて所定の入力信号の立下
り,立上りのインプットキャプチャ値を検出するととも
に、その所定の入力信号の立下り,立上り時にそのタイ
マカウンタをリセットするインプットキャプチャ回路
と、前記タイマカウンタからのカウンタ値を入力し、そ
の入力されたカウンタ値が前記所定の入力信号に含まれ
る所定のデータ長より大きくなったときに割込信号を出
力するアウトプットコンペア回路と、検出されたインプ
ットキャプチャ値に基づいてデータを生成するととも
に、前記アウトプットコンペア回路からの割込信号によ
りデータの終了を検出するデータ生成手段と、を有する
ことを特徴としている。
In order to achieve the above object, a communication apparatus according to the present invention, based on a clock signal input from a timer counter, detects a falling or rising input capture value of a predetermined input signal. An input capture circuit for detecting and resetting the timer counter when the predetermined input signal falls or rises, and a counter value from the timer counter is input, and the input counter value is applied to the predetermined input signal. An output compare circuit that outputs an interrupt signal when the data length becomes longer than a predetermined data length included therein, and generates data based on the detected input capture value, and outputs an interrupt signal from the output compare circuit. Data generation means for detecting the end of data.

【0007】[0007]

【発明の実施の形態】以下、本発明の実施の形態を図面
に基づいて説明する。図1は、一実施の形態に係る通信
装置の概略構成図であって、シングルチップマイコンと
してのCPU1に含まれているタイマモジュール2の部
分のブロック図である。
Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a schematic configuration diagram of a communication device according to an embodiment, and is a block diagram of a timer module 2 included in a CPU 1 as a single-chip microcomputer.

【0008】このタイマモジュール2には、CPU1の
上位に当たる図示しない上位装置から送信されてくるシ
リアルデータ(後述する図2の入力信号参照)を入力す
るインプットキャプチャ回路3と、タイマ信号を発生す
るタイマカウンタ4と、タイマカウンタ4のカウント値
を記憶し、所定のカウント値に達したときに信号(割込
信号)を出力するアウトプットコンペア回路5とが含ま
れている。
The timer module 2 includes an input capture circuit 3 for inputting serial data (refer to an input signal in FIG. 2 to be described later) transmitted from a higher-level device (not shown) which is higher than the CPU 1, and a timer for generating a timer signal. It includes a counter 4 and an output compare circuit 5 that stores the count value of the timer counter 4 and outputs a signal (interrupt signal) when the count value reaches a predetermined count value.

【0009】図1中、6は、MPUであって、インプッ
トキャプチャ回路3からのインプットキャプチャ値及び
アウトプットコンペア回路5からの割込信号を基に受信
データを読取ることができるように構成されている。
In FIG. 1, reference numeral 6 denotes an MPU configured to read received data based on an input capture value from the input capture circuit 3 and an interrupt signal from the output compare circuit 5. I have.

【0010】以下、図2のタイムチャート及び図3のフ
ローチャートを用いて制御動作を説明する。今、インプ
ットキャプチャ回路3に図示しない上位装置(本通信装
置が非接触式自動改札機に組込まれる場合は、その非接
触式自動改札機の本体を統括的に制御するCPUを中心
に構成される制御器)から、図2に入力信号として示さ
れるシリアルデータが入力されたとする。この入力信号
は、図2の下部に拡大して示されるように、1ビットか
らなるスタートビット及び1ビットからなるストップビ
ットの間に8ビットからなるデータ(キャラクタ)が含
まれている。なお、パリティビットは含まれていない。
The control operation will be described below with reference to the time chart of FIG. 2 and the flowchart of FIG. Now, a higher-level device not shown in the input capture circuit 3 (when the present communication device is incorporated in a non-contact automatic ticket gate, a CPU that controls the main body of the non-contact automatic ticket gate is mainly configured. It is assumed that serial data shown as an input signal in FIG. 2 is input from the controller). This input signal includes 8-bit data (character) between a 1-bit start bit and a 1-bit stop bit, as shown in an enlarged manner at the bottom of FIG. Note that no parity bit is included.

【0011】インプットキャプチャ回路1は、信号の立
下りを検出するスタートビットを検出すると、そのとき
に取込んでいるタイマカウンタ4からのカウンタ値(図
2ののこ歯状のタイマのタイムチャートの立下り位置に
おける値)を記憶するとともに、タイマカウンタ4に対
して割込信号を与える(図2の及び図3(a)参
照)。タイマカウンタ4は、インプットキャプチャ回路
3から割込信号を受信するとリセットされ、新たにカウ
ントが開始される。インプットキャプチャ回路3に記憶
されたカウント値、すなわち、キャプチャ値は、MPU
6に送出される。
When the input capture circuit 1 detects a start bit for detecting the fall of the signal, the input capture circuit 1 reads the counter value from the timer counter 4 at that time (see the time chart of the sawtooth timer in FIG. 2). The value at the falling position is stored and an interrupt signal is given to the timer counter 4 (see FIGS. 2 and 3A). The timer counter 4 is reset when receiving an interrupt signal from the input capture circuit 3, and starts counting again. The count value stored in the input capture circuit 3, that is, the capture value is
6 is sent.

【0012】インプットキャプチャ回路3は、入力信号
の立上り,立下りを検出する毎にキャプチャ値を検出し
てMPU6に送出するとともに、その都度、タイマカウ
ンタ4に割込信号を与える(図3(b)参照)。
The input capture circuit 3 detects a capture value each time a rising edge or a falling edge of an input signal is detected and sends it to the MPU 6, and also provides an interrupt signal to the timer counter 4 each time (FIG. 3 (b) )reference).

【0013】MPU6は、インプットキャプチャ回路3
から入力したキャプチャ値に基づいて、図2に示される
ような「00,12…」のデータを生成し、その生成さ
れたデータを図示しない機器(例えば、非接触式自動改
札機のリーダライタ)へ出力する。
The MPU 6 has an input capture circuit 3
Generates data "00, 12,..." As shown in FIG. 2 on the basis of the capture value input from the device, and transmits the generated data to a device not shown (for example, a reader / writer of a contactless automatic ticket gate). Output to

【0014】アントプットコンペア回路5にもインプッ
トキャプチャ回路3と同様にカウンタ値が入力されてお
り、この入力されたカウンタ値は、アウトプットコンペ
ア回路5に予め設定されているカウンタ値(データビッ
トとスタートビットの合計(9ビット)より少し大きい
値のカウンタ値、例えば、10ビット相当のカウンタ
値)と比較される。そして、アウトプットコンペア回路
5は、入力したカウンタ値が予め設定されているカウン
タ値を越えたときに、MPU6に対して割込信号を送出
する(図2の参照)。すなわち、インプットキャプチ
ャ回路3に入力される入力信号に立上り,立下りがな
く、所定のカウンタ値(上述の例では10ビット)に達
してもタイマカウンタ4がリセットされないときは、デ
ータ終了と判定される(図3(c)参照)。
A counter value is input to the input compare circuit 5 in the same manner as the input capture circuit 3. The input counter value is a counter value (data bit and data bit) preset in the output compare circuit 5. This is compared with a counter value slightly larger than the total start bit (9 bits), for example, a counter value equivalent to 10 bits. Then, the output compare circuit 5 sends an interrupt signal to the MPU 6 when the input counter value exceeds a preset counter value (see FIG. 2). That is, if the input signal input to the input capture circuit 3 does not rise or fall, and the timer counter 4 is not reset even after reaching a predetermined counter value (10 bits in the above example), it is determined that the data has ended. (See FIG. 3C).

【0015】以上のように、本発明に係る通信装置は、
シングルチップマイコンの内蔵モジュールに含まれるイ
ンプットキャプチャ回路3及びアウトプットコンペア回
路5を利用してインプットキャプチャ値を検出できるの
で、高速で入力される入力信号を効率よく読取ることが
可能となる。また、装置も小型化できるので、例えば、
非接触式自動改札機の通信装置として好適なものとする
ことができる。
As described above, the communication device according to the present invention
Since the input capture value can be detected using the input capture circuit 3 and the output compare circuit 5 included in the built-in module of the single-chip microcomputer, it is possible to efficiently read an input signal input at high speed. Also, since the device can be downsized, for example,
It can be made suitable as a communication device for a non-contact automatic ticket gate.

【0016】[0016]

【発明の効果】本発明に係る通信装置は、タイマカウン
タから入力されたクロック信号に基づいて所定の入力信
号の立下り,立上りのインプットキャプチャ値を検出す
るとともに、その所定の入力信号の立下り,立上り時に
そのタイマカウンタをリセットするインプットキャプチ
ャ回路と、前記タイマカウンタからのカウンタ値を入力
し、その入力されたカウンタ値が前記所定の入力信号に
含まれる所定のデータ長より大きくなったときに割込信
号を出力するアウトプットコンペア回路と、検出された
インプットキャプチャ値に基づいてデータを生成すると
ともに、前記アウトプットコンペア回路からの割込信号
によりデータの終了を検出するデータ生成手段とからな
るので、高速通信が可能で、しかも、装置を小型化する
ことができる。
The communication device according to the present invention detects the falling and rising input capture values of a predetermined input signal based on a clock signal input from a timer counter, and detects the falling of the predetermined input signal. An input capture circuit for resetting the timer counter at the time of rising, and a counter value from the timer counter, and when the input counter value becomes larger than a predetermined data length included in the predetermined input signal. An output compare circuit for outputting an interrupt signal, and data generating means for generating data based on the detected input capture value and detecting the end of the data based on the interrupt signal from the output compare circuit. Therefore, high-speed communication is possible, and the size of the device can be reduced.

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

【図1】本発明の一実施の形態に係る通信装置の概略構
成を示すブロック図である。
FIG. 1 is a block diagram illustrating a schematic configuration of a communication device according to an embodiment of the present invention.

【図2】タイムチャートの一例である。FIG. 2 is an example of a time chart.

【図3】制御動作を示すフローチャートである。FIG. 3 is a flowchart showing a control operation.

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

1 シングルチップマイコン(CPU) 2 タイマモジュール 3 インプットキャプチャ回路 4 タイマカウンタ 5 アウトプットコンペア回路 6 MPU 1 Single-chip microcomputer (CPU) 2 Timer module 3 Input capture circuit 4 Timer counter 5 Output compare circuit 6 MPU

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 タイマカウンタから入力されたクロック
信号に基づいて所定の入力信号の立下り,立上りのイン
プットキャプチャ値を検出するとともに、その所定の入
力信号の立下り,立上り時にそのタイマカウンタをリセ
ットするインプットキャプチャ回路と、 前記タイマカウンタからのカウンタ値を入力し、その入
力されたカウンタ値が前記所定の入力信号に含まれる所
定のデータ長より大きくなったときに割込信号を出力す
るアウトプットコンペア回路と、 検出されたインプットキャプチャ値に基づいてデータを
生成するとともに、前記アウトプットコンペア回路から
の割込信号によりデータの終了を検出するデータ生成手
段と、 を有することを特徴とする通信装置。
An input capture value of a predetermined input signal falling and rising is detected based on a clock signal input from a timer counter, and the timer counter is reset when the predetermined input signal falls and rises. An input capture circuit for inputting a counter value from the timer counter, and outputting an interrupt signal when the input counter value becomes larger than a predetermined data length included in the predetermined input signal. A communication circuit, comprising: a compare circuit; and data generating means for generating data based on the detected input capture value and detecting the end of the data by an interrupt signal from the output compare circuit. .
JP2001048799A 2001-02-23 2001-02-23 Communication apparatus Pending JP2002252661A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001048799A JP2002252661A (en) 2001-02-23 2001-02-23 Communication apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001048799A JP2002252661A (en) 2001-02-23 2001-02-23 Communication apparatus

Publications (1)

Publication Number Publication Date
JP2002252661A true JP2002252661A (en) 2002-09-06

Family

ID=18910005

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001048799A Pending JP2002252661A (en) 2001-02-23 2001-02-23 Communication apparatus

Country Status (1)

Country Link
JP (1) JP2002252661A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008160181A (en) * 2006-12-20 2008-07-10 Kenwood Corp Symbol processor and symbol processing method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008160181A (en) * 2006-12-20 2008-07-10 Kenwood Corp Symbol processor and symbol processing method

Similar Documents

Publication Publication Date Title
TW528944B (en) A processing system and method of resetting a plurality of processing modules
JP2005508531A5 (en)
WO2017065923A1 (en) Methods to avoid i2c void message in i3c
CN107771331B (en) Independent UARK BRK detection
TW409204B (en) Expansion interface conversion device and conversion method therefor
JPH10154021A (en) Clock switching device and clock switching method
US7930582B2 (en) Image processing apparatus and method of transmitting reference clock
JP2002252661A (en) Communication apparatus
US20130162289A1 (en) Method and apparatus for configuring an integrated circuit
TW514790B (en) UART clock wake-up sequence
US7172129B2 (en) Integrated circuit card capable of automatically transmitting NULL byte information without intervention by CPU
CN108536413B (en) Audio data acquisition method and equipment
US7127632B2 (en) Method and device for synchronizing integrated circuits
JP4630288B2 (en) Verifying the rate of the received serial transfer alignment sequence
CN113132044A (en) Audio synchronous processing circuit and method thereof
US8909970B2 (en) Information processing apparatus or information processing method which supplies a clock to an external device
KR101453176B1 (en) Information processing apparatus or information processing method
JP2004117344A (en) Method for adjusting transition of bitstream
KR100962478B1 (en) Apparatus and method for controlling system using 1-wire interface
JPH0664483B2 (en) Pulse counter
JP4097377B2 (en) Microcomputer
CN108268087B (en) Semiconductor device, semiconductor system, and method of operating semiconductor device
JP2004199580A (en) Clock control circuit and interface circuit
JP2003263404A (en) Serial communication system and microcomputer using the same
JP4489379B2 (en) IC card reader / writer