JP2007036399A - Asynchronous type communication establishing method, communication apparatus, and communication system - Google Patents
Asynchronous type communication establishing method, communication apparatus, and communication system Download PDFInfo
- Publication number
- JP2007036399A JP2007036399A JP2005213362A JP2005213362A JP2007036399A JP 2007036399 A JP2007036399 A JP 2007036399A JP 2005213362 A JP2005213362 A JP 2005213362A JP 2005213362 A JP2005213362 A JP 2005213362A JP 2007036399 A JP2007036399 A JP 2007036399A
- Authority
- JP
- Japan
- Prior art keywords
- baud rate
- setting
- operating frequency
- communication
- specified
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Communication Control (AREA)
Abstract
Description
本発明は、例えば、汎用非同期レシーバトランスミッタ(Universal Asynchronous Receiver Transmitter:UART)等の非同期型通信を使用する通信装置及び通信システム、並びにこの通信装置及び通信システムにおける非同期型通信確立方法に関し、特に一方がボーレート(シリアル転送スピード)の設定機能を有し、且つ他方が任意の動作周波数で動作する通信装置及びこれらの通信システム、並びにその非同期型通信確立方法に関する。 The present invention relates to a communication apparatus and a communication system using asynchronous communication such as a universal asynchronous receiver transmitter (UART), and an asynchronous communication establishment method in the communication apparatus and communication system. The present invention relates to a communication apparatus having a baud rate (serial transfer speed) setting function and the other operating at an arbitrary operating frequency, a communication system thereof, and an asynchronous communication establishment method thereof.
従来、通信のために3つの端子を必要とする同期式の通信方法と比べて端子の数を2つの端子とすることができる例えばUART通信などの非同期通信方法がある。UART通信環境の一例としては、フラッシュメモリを内蔵したマイクロコンピュータ(以下、マイコンという)のオンボードプログラミング環境が挙げられる。この環境は、UART通信設定機能を有するフラッシュライタと、任意の周波数で動作するマイコンと(ターゲットシステム)を搭載したターゲットボードとをUARTで接続し、マイコンをボード上から取り外すことなく、マイコンに内蔵したフラッシュメモリの書き込み(プログラミング)を行うものである。 Conventionally, for example, there is an asynchronous communication method such as UART communication in which the number of terminals can be two as compared with a synchronous communication method that requires three terminals for communication. As an example of the UART communication environment, there is an on-board programming environment of a microcomputer (hereinafter referred to as a microcomputer) having a built-in flash memory. In this environment, a flash writer with a UART communication setting function, a microcomputer operating at an arbitrary frequency, and a target board equipped with a (target system) are connected by UART, and the microcomputer is built into the microcomputer without removing it from the board. The flash memory is programmed (programmed).
ここで、フラッシュライタとは、フラッシュメモリへのプログラムの消去、書き込み、ベリファイを行うためのツールである。また、マイコンは、動作速度が速くなると消費電流が多くなる特性があるため、一般的にマイコンを使用する場合、任意の発振周波数値の発振子を接続し、更に内部のクロック設定により動作周波数を決定する。接続可能な発振子の周波数範囲は、マイコンの発振特性により、予め決められている。 Here, the flash writer is a tool for erasing, writing, and verifying a program in the flash memory. In addition, since microcomputers have the characteristic that current consumption increases as the operating speed increases, in general, when using a microcomputer, an oscillator with an arbitrary oscillation frequency value is connected, and the operating frequency is set by setting the internal clock. decide. The frequency range of the resonators that can be connected is determined in advance by the oscillation characteristics of the microcomputer.
マイコンは、フラッシュ制御プログラムを内蔵しており、フラッシュライタと通信を行いながら、プログラム消去、書き込み、及びベリファイの制御を行う。このフラッシュ制御プログラムはマイコン製造時に組み込まれるため、マイコンのユーザが任意に決定する動作周波数の値は、フラッシュ制御プログラムの設計時点においては未知の値である。 The microcomputer has a built-in flash control program, and controls program erasing, writing, and verifying while communicating with the flash writer. Since this flash control program is incorporated when the microcomputer is manufactured, the value of the operating frequency arbitrarily determined by the user of the microcomputer is an unknown value at the time of designing the flash control program.
一方で、マイコンがフラッシュライタと通信する際のボーレートは、マイコンの動作周波数の値と、マイコンに内蔵されるボーレート・ジェネレータの設定値との関係により決定される。すなわち、マイコンがフラッシュライタとUART通信するためのボーレートは、マイコンの動作周波数の値に基づき生成されるため、マイコンは、先ず、未知の動作周波数の値を知る必要がある。このため、マイコンは、UART通信を確立する際の途中段階でタイマを使用し動作周波数を算出する。動作周波数算出機能は、フラッシュ制御プログラムにより実現される。なお、本明細書においては、ボーレート設定機能を有する側、上記例においてはフラッシュライタより設定されたボーレートにて両者の通信が開始されることをUART通信の確立ということとする。 On the other hand, the baud rate when the microcomputer communicates with the flash writer is determined by the relationship between the value of the operating frequency of the microcomputer and the set value of the baud rate generator built in the microcomputer. In other words, since the baud rate for the microcomputer to perform UART communication with the flash writer is generated based on the value of the operating frequency of the microcomputer, the microcomputer must first know the value of the unknown operating frequency. For this reason, the microcomputer calculates the operating frequency using a timer in the middle of establishing UART communication. The operating frequency calculation function is realized by a flash control program. In the present specification, the establishment of UART communication means that communication between the two at the baud rate setting function, in the above example, at the baud rate set by the flash writer is started.
次に、従来の動作周波数を算出してUART通信を確立する方法について説明する(例えば特許文献1、非特許文献1等参照)。図7は、UART通信を行なう通信システム100の一例として、フラッシュライタ102と、ターゲットボード103上のマイコン104とをUART通信にて接続したオンボードプログラミングシステムを示す。UART通信には、シリアル送信データ信号線Txd及びシリアル受信データ信号線Rxdを使用する。ここで、上記送信及び受信は、マイコン104側からみた場合を示し、フラッシュライタ102側からみると「送信」と「受信」とが逆転する。一方、フラッシュライタ102には、ホストマシン101がRS−232C(Recommended Standard 232 version C)ケーブル106により接続されている。本明細書においては、ボーレートを設定される側、すなわちターゲットシステム側を受信装置とし、ボーレート設定側であるフラッシュライタ2を送信装置として説明する。
Next, a conventional method for calculating the operating frequency and establishing UART communication will be described (see, for example,
ターゲットシステム110は、ターゲットボード103上にマイコン104及びその動作クロック源となる発振子105を有する。マイコン104は、フラッシュメモリ107及びその制御プログラム108を搭載している。
The
このような通信システム100において、ユーザは、ホストマシン101上から、グラフィカル・ユーザ・インタフェース(以下、GUIという)を介し、フラッシュメモリ107の任意のアドレスのデータの読み出し、消去、書き込み等、必要な操作を行う。フラッシュライタ102は、その操作をコマンドとしてUART通信にてマイコン104に伝達する。フラッシュ制御プログラム108は、マイコン104内部において、UART通信で受信したコマンドに従い、フラッシュメモリ107のデータの読み出し、消去、書き込み等の処理を行う。
In such a
以上の動作処理において、マイコン104は動作クロック源として発振子105を使用するが、本来、発振子105はマイコン104が通常動作する際の動作クロック源である。発振子105の発振周波数は、マイコン104の電気的特性で定めた周波数範囲の中で、ターゲットシステム110に適した任意の周波数値をユーザが選択する。そして、発振周波数から生成される所望の動作周波数をターゲットシステム110及びマイコン104の仕様に従ってユーザが設定する。
In the above-described operation processing, the
ところが、フラッシュ制御プログラム108はマイコン104の製造時に組み込まれるため、上記の発振周波数、動作周波数の値は未知である。しかし、ボーレートは動作周波数を元に設定されるため、ターゲットシステム110自信が先ず未知の動作周波数の値を知る(算出する)必要がある。なお、ボーレートの設定方法については後述する。
However, since the
ここでは先ず、フラッシュ制御プログラム108の内部で処理している動作周波数値の算出方法について説明する。先ず、動作周波数値の算出の原理を簡単に説明する。ターゲットシステム110は、フラッシュライタ102から送出された一定時間のLOWレベル幅の信号を受信し、マイコン104に内蔵したタイマ(不図示)を使用し、動作周波数を分周したカウントクロックで計数する。フラッシュライタ2から送られるLOWレベル幅の値は既知であるので、計数値から動作周波数を逆算することができる。なお、ハイレベル幅であってもよい。
Here, first, a method of calculating the operating frequency value processed in the
次に、この動作周波数の算出方法について詳細に説明する。図8は、P31/Rxd端子(外部端子)に入力されたLOWレベル信号と、TM50(タイマ)のカウント動作を示すタイミングチャートである。ここで、図8において、タイマのカウント動作を示すタイミングチャートは、縦軸にカウント値をとり、カウント値が増加する様子を示す模式図である。 Next, this operating frequency calculation method will be described in detail. FIG. 8 is a timing chart showing the LOW level signal input to the P31 / Rxd terminal (external terminal) and the TM50 (timer) counting operation. Here, in FIG. 8, the timing chart showing the count operation of the timer is a schematic diagram showing how the count value increases with the vertical axis representing the count value.
フラッシュライタ2とターゲットシステム110とは、規定のボーレート(9600bps)にてUART通信を開始することが定められているものとする。この場合、例えばフラッシュライタ102からの一定の時間幅のLOWレベル幅201は、9600bpsのUART通信の9bit分で、マイコン104の外部端子から入力される。ターゲットシステム110は、フラッシュライタ2と接続された時点で上記LOWレベルの受信を監視する。そして、マイコン104内部で、信号の立下りを検出し、上記タイマをスタートする。このタイマは、コンペアタイマであり、コンペアレジスタの値は63である。レジスタ値0からカウント開始し、64回カウント後にコンペア一致割り込みを発生し、カウント値が0に戻った後、再びカウント動作を行う。ここで図中のコンペア一致周期202はタイマスタートからコンペア一致までの周期を示す。フラッシュ制御プログラム108は、一致割り込みを発生するたびに変数LOW_CNTをインクリメントする。
It is assumed that the
上記LOWレベル信号の送信が終了し外部端子への入力がハイレベルに立ち上がると、タイマをストップする。このときの変数LOW_CNTの値tをタイマカウント値とする。動作周波数は、このタイマカウント値tから算出することができる。 When the transmission of the LOW level signal ends and the input to the external terminal rises to a high level, the timer is stopped. The value t of the variable LOW_CNT at this time is set as a timer count value. The operating frequency can be calculated from this timer count value t.
本従来例において、動作周波数、タイマカウントクロック、LOWレベル幅は、以下のとおりである。
動作周波数=fxx
タイマカウントクロック=fxx/2
LOWレベル幅201=9bit/9600bps
In this conventional example, the operating frequency, timer count clock, and LOW level width are as follows.
Operating frequency = fxx
Timer count clock = fx / 2
LOW level width 201 = 9 bits / 9600 bps
また、コンペア一致周期は、タイマ値0から63までのため、以下となる。
コンペア一致周期=2/fxx×64
The compare match period is as follows because the timer values are from 0 to 63.
Compare coincidence cycle = 2 / fxx × 64
そして、LOWレベル幅201にコンペア一致周期202が、タイマにてカウントしたカウント値=tの場合、下記の等式が成り立つ。
9/9600=t×2/fxx×64
When the
9/9600 = t × 2 / fxx × 64
従って、動作周波数fxxは、下記の式で求められる。
fxx=t×2×64×9600/9
Therefore, the operating frequency fx is obtained by the following equation.
fx = t × 2 × 64 × 9600/9
ここで、以上により算出した動作周波数値は誤差を含むので、LOWレベル幅201を2回測定し、平均値を取る。こうして算出した動作周波数fxxにより、ボーレート・ジェネレータに搭載されボーレートを設定する後述する制御レジスタを一旦、規定値の9600bpsとなるよう設定し、ボーレートを9600bpsに設定する。 Here, since the operating frequency value calculated as described above includes an error, the LOW level width 201 is measured twice to obtain an average value. Based on the operation frequency fx thus calculated, a control register which is mounted on the baud rate generator and sets the baud rate, which will be described later, is once set to a specified value of 9600 bps, and the baud rate is set to 9600 bps.
次に、上述した周波数算出ルーチンにて求めた動作周波数値は、2回の平均値を取ってもなお規定の値とは違い(誤差)があるため、正確な動作周波数値をユーザがGUI上で入力する。また、他の動作周波数を指定したい場合も同様である。このため、ユーザ指定の動作周波数の値を周波数設定コマンドにて送出して、より正確なボーレートを再設定することができる。又は、システムに応じた最適な動作周波数を選択することができる。最後にユーザが9600bps以外のボーレートを使用する場合は、任意のボーレート値をボーレート設定コマンドにて送出して、これをターゲットシステム110が受信し、このボーレート設定コマンドに応じてボーレートを設定することで、UART通信の確立が行なわれる。
Next, since the operating frequency value obtained by the frequency calculation routine described above is still different (error) from the specified value even if the average value of the two times is taken, an accurate operating frequency value is displayed on the GUI by the user. Enter in. The same applies when it is desired to specify another operating frequency. For this reason, it is possible to reset a more accurate baud rate by sending a user-specified operating frequency value with a frequency setting command. Alternatively, the optimum operating frequency can be selected according to the system. Finally, when the user uses a baud rate other than 9600 bps, the
以上で述べた従来技術における一連のUART通信確立をシーケンスで表すと図9のようになる。すなわち、図9に示すように、マイコン104は、先ずフラッシュライタ102からのLOWレベルの信号を受信し(ステップS11)、LOWレベル幅をカウントする。そして、平均を取るため、再度フラッシュライタ102からのLOWレベルの信号を受信し(ステップS12)、LOWレベル幅をカウントする。そして、これらのカウント値から動作周波数の平均値を算出することで、一旦ボーレートを規定値の9600bpsに設定することができる。これにより、ターゲットシステム110は、フラッシュライタ102からのコマンドを受信することが可能となる。
FIG. 9 shows a sequence of establishment of a series of UART communications in the prior art described above. That is, as shown in FIG. 9, the
次に、ターゲットシステム110は、フラッシュライタ102より周波数設定コマンドを受信し(ステップS13)、その応答(ACK)を送信する(ステップS14)。そして、ターゲットシステム110は、上記周波数設定コマンドに基づき発振周波数を設定し、動作周波数を設定する。次に、フラッシュライタ102からのボーレート設定コマンドを受信する(ステップS15)。これによりターゲットシステム110は、フラッシュライタ102より指定のボーレートに設定し、ACKを送信する(ステップS16)。このように、UART通信確立(規定のボーレートでの通信)に先立ち、2回のLOWレベル受信を経る必要がり、その後周波数設定コマンドの受信、ボーレート設定コマンドの受信を行う。
Next, the
次に、マイコンにおけるボーレート設定方法について説明し、ボーレート設定に動作周波数値が必要である理由について合わせて説明する。 Next, a baud rate setting method in the microcomputer will be described, and the reason why an operating frequency value is required for the baud rate setting will also be described.
図10は、非特許文献1に記載のボーレート・ジェネレータの構成を示す図である。マイコンは、図示せぬクロック発生回路及びボーレート・ジェネレータを有する。クロック発生回路より生成されたクロック(fxx〜fxx/1024)がボーレート・ジェネレータ501に供給される。ボーレート・ジェネレータ501は、ソース・クロック・セレクタ部(以下、セレクタという)552と8ビットのプログラマブル・カウンタ(以下、8ビット・カウンタという)554とを有し、UARTにおける送受信時のシリアル・クロックを生成する。シリアル・クロックは、チャネル毎に専用ボーレート・ジェネレータ出力を選択することができる。なお、8ビット・カウンタ554は送信用と受信用が別々に存在する。
FIG. 10 is a diagram showing the configuration of the baud rate generator described in
クロック選択レジスタ(CKSRレジスタ)553は、基本クロック周波数(fUCLK)を選択するための8ビット・レジスタで、これにより選択されたクロックが送受信モジュールの基本クロック周波数(fUCLK)になる。ボーレート・ジェネレータ・コントロール・レジスタ(BRGCレジスタ)555は、UARTのボーレートを制御する8ビット・レジスタである。 The clock selection register (CKSR register) 553 is an 8-bit register for selecting the basic clock frequency (f UCLK ), and the selected clock becomes the basic clock frequency (f UCLK ) of the transmission / reception module. The baud rate generator control register (BRGC register) 555 is an 8-bit register that controls the UART baud rate.
CKSRレジスタ553とBRGCレジスタ555の設定により、シリアル・クロックを生成する。すなわち、CKSRレジスタ553により、8ビット・カウンタ554へ出力する基本クロック周波数(fUCLK)を選択し、BRGCレジスタ555により、8ビット・カウンタ554の分周値、すなわち分周比を設定するための設定値を設定する。8ビット・カウンタ554の出力とBRCG555とが一致するクロックを一致検出器556が出力し、この出力を分周器557にて2分周したものがボーレートとなる。
A serial clock is generated by setting the
ボーレートは、下記の式により求められる。
ボーレート[bps]=fUCLK/2k
ここで、fUCLKは、メイン・クロック周波数(動作周波数)fxxを分周したクロックである。なお、kは、BRGCレジスタ555にて設定する設定値(分周比)を示し、k=8,9,10,・・・,255の値をとる。
The baud rate is obtained by the following equation.
Baud rate [bps] = f UCLK / 2k
Here, f UCLK is a clock obtained by dividing the main clock frequency (operating frequency) fxx. K represents a set value (frequency division ratio) set in the
このように、ボーレートは、メイン・クロック周波数(動作周波数)fxxを元に生成されており、ボーレートを設定するためには、メイン・クロック周波数fxxの値が必要である。よって、ボーレートの設定には、動作周波数fxxの算出が不可欠となる。
上述したように、従来の方法においては、ボーレート設定のために、フラッシュ制御プログラム108をマイコン104に組み込む時点で未知の動作周波数を算出する必要がある。すなわち、UART通信においては、送信側と受信側とで予め規定のボーレートに設定するが、当該規定のボーレートに設定するためには、受信側のターゲットシステム110が動作周波数を把握する必要がある。よって、通信確立に先立ち、LOWレベル幅から動作周波数を算出する必要がある。しかしながら、LOWレベル幅から動作周波数を算出するためには上述のようにタイマが必要であり、さらに、動作周波数算出のためのルーチン(プログラムコード)と、LOWレベル受信のための最小2回のフラッシュライタ102との通信とが必要となる。なお、上記従来技術においては、動作周波数は2回のLOWレベル幅の受信により平均値を算出しているものの誤差を含み、よって従来一旦設定される9600bpsのボーレートにも誤差が含まれるため周波数設定コマンドを受信する必要がある。これに対し、例えば3回以上の平均を求めることで上記ボーレートの誤差を取り除くことも考えられるが、ボーレート設定コマンドの受信まで、すなわちUART通信確立までに時間がかかってしまうという新たな問題も生じる。
As described above, in the conventional method, it is necessary to calculate an unknown operating frequency when the
以上のような理由によりUART通信確立には、図9に示すように複雑なシーケンスが必要となってしまう。また、マイコン104にタイマを内蔵していることが必須となること、及び上記動作周波数算出ルーチンのためのフラッシュ制御プログラム108のコードの増加、更にはチップ面積の増加により、コスト増加に繋がるという問題点がある。
For the above reasons, a complicated sequence as shown in FIG. 9 is required to establish UART communication. In addition, it is essential that the
特に近年は、低機能、低価格のマイコンの需要が伸び、コスト競争力が求められ、フラッシュ制御プログラムの極限までの縮小化が進められている。したがって、この動作周波数算出機能のプログラムコードは、マイコンの縮小化の弊害となるものである。また、本来のフラッシュ制御機能ではないことから、フラッシュ制御プログラムのコストパフォーマンスを悪化させているとも考えられる。 Particularly in recent years, demand for low-function, low-cost microcomputers has increased, cost competitiveness has been demanded, and flash control programs have been reduced to the limit. Therefore, the program code of the operating frequency calculation function is a harmful effect of downsizing the microcomputer. In addition, since it is not the original flash control function, it is considered that the cost performance of the flash control program is deteriorated.
更に、低機能マイコンにおいて、タイマを内蔵しない場合は、上述の方法で動作周波数を算出することができず、UART通信の確立が困難である。すなわち、マイコンがタイマを内蔵していなければ動作周波数の算出が不可能であるため、動作周波数及びボーレートを固定とした上で、通信確立を行うしかなくなり、ターゲットシステムによっては、システム構成が不可能または、著しく機能制限されてしまう。 Furthermore, in a low-function microcomputer, when a timer is not built in, the operating frequency cannot be calculated by the above-described method, and it is difficult to establish UART communication. In other words, if the microcomputer does not have a built-in timer, it is impossible to calculate the operating frequency, so it is only possible to establish communication after fixing the operating frequency and baud rate, and depending on the target system, the system configuration is impossible. Or, the function is significantly limited.
本発明にかかる非同期型通信確立方法は、一方の機器がボーレートの設定機能を有し、他方の機器との間で非同期型通信を行なう際の非同期型通信確立方法であって、前記他方の機器の仕様に応じて定まる固有のボーレートにより、前記一方の機器が前記他方の機器に対し任意の規定ボーレートを設定し、前記他方の機器が前記設定された規定ボーレートにより通信を開始するものである。 An asynchronous communication establishment method according to the present invention is an asynchronous communication establishment method in which one device has a baud rate setting function and performs asynchronous communication with the other device. The one device sets an arbitrary specified baud rate with respect to the other device based on a specific baud rate determined according to the specifications, and the other device starts communication at the set specified baud rate.
本発明においては、一方がボーレート設定機能を有する通信システムにおいて、規定のボーレートを使用せず、他方の機器の仕様によって定まる固有のボーレートを使用して規定ボーレートを設定させ、非同期型通信を開始する。したがって、規定のボーレートを使用するために必要な他方の機器の動作周波数を予め求める必要がなく、規定ボーレートでの通信までの動作シーケンスを簡素化することができる。すなわち、従来必要であった動作周波数測定のために一定レベルの信号を受信して動作周波数を算出するシーケンス、及び動作周波数を算出するために必要なカウンタ等が不要となる。 In the present invention, in a communication system in which one has a baud rate setting function, a specified baud rate is set using a specific baud rate determined by the specification of the other device without using a specified baud rate, and asynchronous communication is started. . Therefore, it is not necessary to obtain in advance the operating frequency of the other device necessary for using the specified baud rate, and the operation sequence up to communication at the specified baud rate can be simplified. That is, a sequence for receiving a signal at a certain level and calculating the operating frequency for measuring the operating frequency, which has been necessary in the past, and a counter and the like necessary for calculating the operating frequency become unnecessary.
本発明にかかる他の非同期型通信確立方法は、第1の機器が、第1の設定値及び第1の機器の動作周波数により第1のボーレートを設定する工程と、第2の機器が、前記第1の設定値及び前記第1の機器の動作周波数を入力され、前記第1の設定値及び前記第1の機器の動作周波数に基づいて第2のボーレートを設定する工程と、前記第2の機器が、前記第2のボーレートによって前記第1の機器に対し前記第1のボーレートを規定のボーレートに変更するためのボーレート設定コマンドを送信する工程と、前記ボーレート設定コマンドを受信した前記第1の機器が、前記第2の設定値及び前記第1の機器の動作周波数により前記規定のボーレートを設定する工程と、前記ボーレート設定コマンドを送信した前記第2の機器が、前記第2のボーレートを前記規定のボーレートに変更する工程を有するものである。 In another asynchronous communication establishment method according to the present invention, the first device sets the first baud rate according to the first set value and the operating frequency of the first device, and the second device Receiving a first set value and an operating frequency of the first device, and setting a second baud rate based on the first set value and the operating frequency of the first device; and the second A device transmitting a baud rate setting command for changing the first baud rate to a specified baud rate to the first device according to the second baud rate; and the first baud rate setting command received The device sets the specified baud rate according to the second set value and the operating frequency of the first device, and the second device that has transmitted the baud rate setting command includes the second bo Rates and has a step of changing the baud rate of the prescribed.
本発明によれば、非同期型通信確立のシーケンスを簡単化及び高速化することができると共に、通信確立の信頼性の向上、フラッシュ制御プログラムの縮小、及び低機能なマイコン等への応用が可能な非同期型通信確立方法、通信装置及び通信システムを提供することができる。 According to the present invention, the asynchronous communication establishment sequence can be simplified and speeded up, the communication establishment reliability can be improved, the flash control program can be reduced, and it can be applied to a low-function microcomputer or the like. Asynchronous communication establishment method, communication apparatus, and communication system can be provided.
以下、本発明を適用した具体的な実施の形態について、図面を参照しながら詳細に説明する。この実施の形態は、本発明を、ボーレート設定機能を有するフラッシュライタと、任意の動作周波数で動作するフラッシュメモリを有するシステム(ターゲットシステム)との間のUART通信確立方法に適用したものである。 Hereinafter, specific embodiments to which the present invention is applied will be described in detail with reference to the drawings. In this embodiment, the present invention is applied to a method for establishing UART communication between a flash writer having a baud rate setting function and a system (target system) having a flash memory operating at an arbitrary operating frequency.
UART通信は、通常規定のボーレートにより行われる。この場合、規定のボーレートとして、300,600,1200,2400,4800,9600,10400,19200,31250,38400,76800,115200,153600,230400,312500(bps)が使用されている。 UART communication is normally performed at a specified baud rate. In this case, 300, 600, 1200, 2400, 4800, 9600, 10400, 19200, 31250, 38400, 76800, 115200, 153600, 230400, 312500 (bps) are used as the prescribed baud rates.
従来はターゲットシステム側においてこのような規定のボーレートを設定するために、動作周波数を算出する必要があり、このため、ターゲットシステムに含まれるマイコンには動作周波数算出のための専用プログラム及びタイマが必要であった。これに対し、本実施の形態にかかるUART通信確立方法においては、規定ボーレートでの通信が確立又は開始するまでの期間において、両者の間の通信をターゲットシステムの仕様に応じて定まる固有のボーレートである規定外のボーレートにて行なう。 Conventionally, it is necessary to calculate the operating frequency in order to set such a specified baud rate on the target system side. For this reason, the microcomputer included in the target system requires a dedicated program and timer for calculating the operating frequency. Met. On the other hand, in the UART communication establishment method according to the present embodiment, communication between the two is performed at a specific baud rate determined according to the specifications of the target system in a period until communication at the specified baud rate is established or started. Performs at a baud rate outside of the specified range.
ここで、規定外のボーレートとは、マイコンのボーレートの設定に関わる制御レジスタ初期値と、動作周波数とで決定される固有のボーレートを示す。本実施の形態においては、規定ボーレートでの通信に先立ち上記固有のボーレートにて、ボーレート設定機能を有するフラッシュライタによりターゲットシステムにおける規定ボーレートの設定を行わせるため、ターゲットシステム側において規定ボーレートを設定するための動作周波数算出のためのシーケンスが不要となり、よってタイマの内蔵も不要となるものである。 Here, the unspecified baud rate indicates a specific baud rate determined by the control register initial value related to the setting of the baud rate of the microcomputer and the operating frequency. In the present embodiment, the specified baud rate is set on the target system side in order to cause the flash programmer having the baud rate setting function to set the specified baud rate at the target system at the specific baud rate prior to communication at the specified baud rate. This eliminates the need for a sequence for calculating the operating frequency, and therefore eliminates the need for a built-in timer.
図1は、本実施の形態にかかる通信システムを示す図である。通信システム10は、ボーレート値の通信設定機能を有する一方の機器(第1の機器)の一例としてのフラッシュライタ2と、任意の周波数で動作する他方の機器(第2の機器)の一例としてのマイコン4及びその動作クロック源となる発振子5(ターゲットシステム20)を有するターゲットシステム20とを有する。これによりフラッシュライタ2と、ターゲットボード3上のマイコン4とをUART通信にて接続したオンボードプログラミングシステムが構成される。ここで、本例においては、ボーレート設定機能を有するフラッシュライタ2を送信装置、ボーレートを設定される側のターゲットシステム20を受信装置として説明する。
FIG. 1 is a diagram illustrating a communication system according to the present embodiment. The
UART通信には、シリアル送信データ信号線Txd及びシリアル受信データ信号線Rxdを使用する。ここで、上記送信及び受信は、マイコン4側(受信装置側)からみた場合を示し、フラッシュライタ2側(送信装置側)からみると「送信」と「受信」とが逆転する。一方、フラッシュライタ2には、ホストマシン1がRS−232Cケーブル6により接続されている。
For the UART communication, a serial transmission data signal line Txd and a serial reception data signal line Rxd are used. Here, the transmission and reception are shown when viewed from the
マイコン4は、フラッシュメモリ7及びその制御プログラム8を搭載している。マイコン4は、その他、ターゲットボード3上にマイコン4とは別に具備される発振子5からクロックを生成する後述するクロック発生回路(不図示)、及びボーレートを生成するボーレート・ジェネレータ(不図示)を有する。フラッシュライタ2とマイコン4とのUART通信は、フラッシュライタ2が指定するボーレートにより行なわれる。ターゲットシステム20においては、上記クロック発生回路により任意の動作周波数のクロックを発生させることができ、またボーレート・ジェネレータによりフラッシュライタ2により設定される規定ボーレートを生成する。
The
このようなシステムにおいて、ユーザは、ホストマシン1上から、GUIを介し、フラッシュメモリ7の任意のアドレスのデータの読み出し、消去、書き込み等、必要な操作を行う。フラッシュライタ2は、その操作をコマンドとしてUART通信にてマイコン4に伝達する。フラッシュ制御プログラム8は、マイコン4内部において、UART通信で受信したコマンドに従い、フラッシュメモリ7のデータの読み出し、消去、書き込み等の処理を行う。以上の点は従来と同様である。
In such a system, the user performs necessary operations such as reading, erasing, and writing data at an arbitrary address in the
ここで、フラッシュライタ2とターゲットシステム20との間のUART通信は、例えば9600bpsの規定のボーレートで行うことが決められている。ターゲットシステム20においては、その動作周波数に基づきボーレートが生成されるため、上記規定のボーレート設定のために先ず動作周波数を求める必要があった。なお、その他の規定のボーレート値としても同様である。これに対し、本実施の形態においては、ターゲットシステム20の仕様によって定まる固有のボーレート(第1のボーレート)にてフラッシュライタ2よりボーレートの設定を行なわせることで、上記動作周波数の算出を不要とするものである。
Here, it is determined that the UART communication between the
図2は、ターゲットシステム20が有するクロック発生回路41及びUARTのボーレート・ジェネレータ51部分を示す図である。図2に示すように、クロック発生回路41は、発振子5に接続されたクロック発振回路42と、PLL(Phase Locked Loop)回路43と、セレクタ44と、プリスケーラ45とを有する。発振子5は、ターゲットシステム20に応じてユーザが例えば2MHz〜10MHzの範囲で選択し、クロック発振回路42から出力される。クロック発生回路41は、クロック発振回路42の出力fxをメイン・クロック周波数(fxx)としてそのまま使用するクロック・スルー・モード(ダイレクトモード)とfxを例えば4逓倍して使用するPLLモードとを有する。この発振子5の発振周波数と、PLLモード又はダイレクトモードかにより任意の動作周波数fxxが決定され、その範囲は、例えば2MHz〜20MHzである。
FIG. 2 is a diagram showing a
すなわち、PLLモードにおいては、
動作周波数fxx=4×fx
ダイレクトモードにおいては、
動作周波数fxx=fx
となる。ユーザは、発振子5の発振周波数、各モード等により任意の動作周波数を設定することができる。
That is, in the PLL mode,
Operating frequency fx = 4 × fx
In direct mode,
Operating frequency fx = fx
It becomes. The user can set an arbitrary operating frequency according to the oscillation frequency of the
プリスケーラ45は、メイン・クロック周波数fxxを分周する回路であり、後述するセレクタ52にプリスケーラ45で生成したクロック(fxx〜fxx/1024:周辺クロック47)を供給する。
The
ボーレート・ジェネレータ51は、ソース・クロック・セレクタ部(以下、セレクタという)52と8ビットのプログラマブル・カウンタ(以下、8ビット・カウンタという)54とを有し、UART通信における送受信時のシリアル・クロックを生成する。シリアル・クロックは、複数のチャネルを有する場合にはチャネル毎に専用ボーレート・ジェネレータ出力を選択することができる。なお、8ビット・カウンタ54は送信用と受信用が別々に存在する。
The
クロック選択レジスタ(CKSRレジスタ)53は、基本クロック周波数(fUCLK)を選択するための8ビット・レジスタで、これにより選択されたクロックが送受信モジュールの基本クロック周波数(fUCLK)にななる。ボーレート・ジェネレータ・コントロール・レジスタ(BRGCレジスタ)55は、UARTのボーレートを制御する8ビット・レジスタである。 The clock selection register (CKSR register) 53 is an 8-bit register for selecting the basic clock frequency (f UCLK ), and the selected clock becomes the basic clock frequency (f UCLK ) of the transmission / reception module. The baud rate generator control register (BRGC register) 55 is an 8-bit register that controls the UART baud rate.
CKSRレジスタ53とBRGCレジスタ55の設定により、シリアル・クロックを生成する。すなわち、CKSRレジスタ53により、8ビット・カウンタ54へ出力する基本クロック周波数(fUCLK)を選択し、BRGCレジスタ55により、8ビット・カウンタ54の分周値、すなわち分周比を設定するための設定値を設定する。8ビット・カウンタ54の出力とBRGCレジスタ55とが一致するクロックを一致検出器56が出力し、この出力を分周器57にて2分周したものがボーレートとなる。
A serial clock is generated by setting the
ここで、通常のUART通信においては、フラッシュライタ2による周波数設定コマンドにより動作周波数が設定され、ボーレート設定コマンドによりCKSRレジスタ53及びBRGCレジスタ55の各レジスタ値が設定され、これによりボーレート・ジェネレータ51が指定のボーレートを生成する。よって、上述の従来技術のように、一般的には、動作周波数を算出しなければ規定のボーレートを設定することができない。規定のボーレートを設定しなければフラッシュライタ2とのUART通信を行なうことができない。
Here, in normal UART communication, the operating frequency is set by the frequency setting command from the
ここで、CKSRレジスタ53及びBRGCレジスタ55に、規定ボーレート設定のための設定値を設定せず、リセット初期値をそのまま使用すると、ターゲットシステム20にて固有のボーレートが生成される。本実施の形態においては、この固有のボーレートによりフラッシュライタ2との通信を開始する。すなわち、本実施の形態におけるマイコン4は、フラッシュライタ2による規定ボーレートの設定によって開始されるUART通信に先立つ工程において、予め定められた規定のボーレートではなく、ボーレート・ジェネレータ51の設定制御部であるCKSRレジスタ53及びBRGCレジスタ55のリセット初期値及び動作周波数から求まる固有の規定外ボーレートを使用してフラッシュライタ2との通信を実行する。
Here, if the reset initial value is used as it is without setting the setting value for setting the specified baud rate in the
ここでCKSRレジスタ53、BRGCレジスタ55のリセット初期値及びその設定は以下のとおりである。
CKSR=00H(fUCLK=fxx)
BRGC=FFH(k=255)
ボーレートは、下記で求められる。
ボーレート(bps)=基本クロック周波数fUCLK/(2×k)
なお、kは、BRGCレジスタ55にて設定する設定値(分周比)を示し、k=8,9,10,・・・,255の値をとる。
Here, reset initial values and settings of the
CKSR = 00H (f UCLK = fxx)
BRGC = FFH (k = 255)
The baud rate is obtained as follows.
Baud rate (bps) = Basic clock frequency f UCLK / (2 × k)
K represents a set value (frequency division ratio) set in the
従って、以上の環境で、設定されるボーレートは、図3のようになる。すなわち、ボーレートは動作周波数とCKSRレジスタ53及びBRGCレジスタ55とから決まる固有のボーレートとなり、本例においては規定外のボーレート値となる。
Therefore, the baud rate set in the above environment is as shown in FIG. In other words, the baud rate is a specific baud rate determined by the operating frequency and the
一方、フラッシュライタ2側では、上記固有のボーレート値に合致するよう次に説明する方法にてボーレートの設定を行う。図4は、フラッシュライタ2の構成及びホストマシン1のGUIイメージを示す模式図である。CKSRレジスタ53及びBRGCレジスタ55のリセット初期値は、製品毎にその仕様より予め定められており、デバイスファイル61から入力することができる。動作周波数fxxは、ホストマシン1のGUIを介し、ホストマシン・GUIイメージ62に示すように、動作周波数入力部63によりユーザがその数値を直接入力する。
On the other hand, on the
以上のように、CKSRレジスタ53及びBRGCレジスタ55のリセット初期値と動作周波数fxxが明らかであることから、図3に示した規定外のボーレートを規定のボーレート設定側であるフラッシュライタ2内でも算出可能である。なお、フラッシュライタ2は、CKSRレジスタ53及びBRGCレジスタ55のリセット初期値と動作周波数fxxとからボーレートを算出する演算部又はプログラム(不図示)を有している。ここで、フラッシュライタ2内蔵のUART通信部21の動作周波数を例えば40MHzと仮定し、図3に示したボーレート設定例を目標ボーレートとし、設定したボーレート(第2のボーレート)の例を図5に示す。
As described above, since the reset initial values and the operating frequency fxx of the
ここで、受信の際に送信先のボーレートのずれがどの程度まで許容できるか(許容誤差)は理論上下記の式により求めることができる(非特許文献1、P495−496)。なお、下記式は11ビット受信に当てはめた場合を示す。
受信可能な送信先の最大ボーレート(BRmax)=22k/(21k+2)×Brate
受信可能な送信先の最小ボーレート(BRmin)=20k/(21k−2)×Brate
なお、kはBRGCレジスタ55の設定値(分周比)、Brateは、フラッシュライタ2により指定されるUARTのボーレートを示す。受信の精度は1フレーム・ビット数、基本クロック周波数(fUCLK)、分周比kに依存し、基本クロック周波数(fUCLK)が高く、分周比kが大きくなるほど精度が高くなる。すなわち、許容誤差は、基本クロック周波数(fUCLK)が高く、分周比kが大きくなるほど小さくなる。
Here, to what extent the deviation of the baud rate of the transmission destination can be allowed at the time of reception (allowable error) can theoretically be obtained by the following equation (
Receivable destination maximum baud rate (BRmax) = 22k / (21k + 2) × Brate
Receivable minimum baud rate (BRmin) = 20k / (21k−2) × Brate
Note that k represents a set value (frequency division ratio) of the
上記式にて求めたk=8の許容最大ボーレート誤差は、3.53%である。これに対し、本実施の形態においては、目標ボーレート(固有のボーレート又は第1のボーレート)からのボーレート誤差は、図5に示すように−0.39%〜+0.24%となり、通信誤差は十分小さく実用に耐えうる。 The allowable maximum baud rate error of k = 8 obtained by the above formula is 3.53%. On the other hand, in this embodiment, the baud rate error from the target baud rate (specific baud rate or first baud rate) is −0.39% to + 0.24% as shown in FIG. Small enough to withstand practical use.
以上のように、フラッシュライタ2による規定ボーレートの設定において、機器の仕様に応じて定まる規定外のボーレートを使用することにより、規定ボーレート設定のために動作周波数の算出等の複雑な処理をすることなく、またマイコン4にカウンタを内蔵する必要もなくなる。図6は、これらの操作シーケンスを示す図である。
As described above, in the setting of the specified baud rate by the
本実施の形態においては、上述の如く規定外の固有のボーレートにて規定ボーレートの設定を行なうため、動作周波数の算出が必要ない。ターゲットシステム20は、第1回目の通信でフラッシュライタ2より上記固有のボーレートにて周波数設定コマンドの受信を行う(ステップS1)。この周波数設定コマンドに対するアクノーリッジ(ACK)の返信(ステップS2)も上記固有のボーレートにて行なう。次いで任意の規定のボーレートに設定するため、フラッシュライタ2から上記固有のボーレートにてボーレート設定コマンドを受信する(ステップS3)。以上の受信により、ターゲットシステム20は、動作周波数を設定し、任意の規定のボーレートに設定することができる。
In this embodiment, since the specified baud rate is set at a specific baud rate that is not specified as described above, it is not necessary to calculate the operating frequency. The
こうしてフラッシュライタ2とマイコン4との間にて規定ボーレートによる通信が確立するまでの間、すなわち、ステップS1のマイコン4の動作周波数を設定するための周波数設定コマンドの受信、ステップS2のACKの返信、ステップS3のボーレートを設定するボーレート設定コマンドの受信は、上述の固有のボーレートで行ない、規定ボーレートに設定することで、ターゲットシステム20は、規定のボーレート設定コマンドに対するアクノーリッジ返信(ステップS4)を規定のボーレートを使用して実行する。これにて規定ボーレートによるUART通信が確立される。
Thus, until communication at the specified baud rate is established between the
本実施の形態においては、マイコン4に内蔵されるボーレート・ジェネレータ51のボーレート設定制御部であるCKSRレジスタ53及びBRGCレジスタ55のリセット初期値をそのまま使用した場合にボーレート・ジェネレータ51にて設定される固有のボーレートを使用してフラッシュライタ2に規定ボーレートの設定を行なわせる。すなわち、フラッシュライタ2との規定ボーレートでの通信が確立するまでの間は規定のボーレートを使用しないため、マイコン4ではUART通信を開始するための予め定められたボーレートの設定自体が不要となる。このため、以下の効果を奏する。
In this embodiment, the
先ず、従来のLOWレベル受信により動作周波数を算出する方法であると、ノイズ等の影響によりLOWレベル幅測定が正常終了できない場合、UART通信確立が失敗したと見なされ、タイムアウト時間(動作周波数20MHzの場合、約600μsec)待機の後、再度処理を繰り返すこととなり、通信確立に極めて時間がかかる場合があった。そして、従来の規定のボーレートを使用するUART通信確立方法と比較すると、本実施の形態においては、少なくとも動作周波数算出のためのLOWレベル受信2回分が不要となり、その分UART通信確立処理の高速化が可能となる。これは時間に換算すると、例えば1.875(msec)の短縮化が可能である。 First, in the conventional method of calculating the operating frequency by receiving the LOW level, if the LOW level width measurement cannot be normally terminated due to the influence of noise or the like, it is considered that the UART communication establishment has failed, and the timeout time (the operating frequency of 20 MHz) In this case, the process is repeated after waiting for about 600 μsec), and it may take a very long time to establish communication. Compared with the conventional UART communication establishment method using the specified baud rate, in this embodiment, at least two LOW level receptions for calculating the operating frequency are unnecessary, and the UART communication establishment process is speeded up accordingly. Is possible. In terms of time, this can be shortened to 1.875 (msec), for example.
次に、一方、本実施の形態においては、フラッシュ制御プログラム8に内蔵する周波数算出ルーチンも不要となるため、フラッシュ制御プログラム8には、動作周波数算出ルーチンを組み込む必要がなくなり、当該プログラムを記録するために必要であった約500byteを削減することができる。
On the other hand, in the present embodiment, since the frequency calculation routine built in the
更に、動作周波数算出が不要になることにより、マイコンに内蔵されていることが前提であったタイマも不要となり、低機能なマイコン又は類似するシステムにも応用ができる。 Furthermore, since the calculation of the operating frequency is not required, a timer that is premised on being incorporated in the microcomputer is also unnecessary, and can be applied to a low-functional microcomputer or a similar system.
このように、本実施の形態においては、UART通信確立のシーケンスが簡単になるばかりか、通信確立までの時間の短縮化が図れ、通信確立の信頼性の向上、フラッシュ制御プログラム8の縮小、及び低機能なマイコンへの応用が可能という優れた効果を奏する。
As described above, in this embodiment, not only the UART communication establishment sequence is simplified, but also the time until communication establishment is shortened, the communication establishment reliability is improved, the
なお、本発明は上述した実施の形態のみに限定されるものではなく、本発明の要旨を逸脱しない範囲において種々の変更が可能であることは勿論である。例えば、本実施の形態においては、非同期型通信の一例としてUART通信について説明したが、他の非同期型通信の通信確立方法に適用することも可能である。 It should be noted that the present invention is not limited to the above-described embodiments, and various modifications can be made without departing from the scope of the present invention. For example, in this embodiment, UART communication has been described as an example of asynchronous communication. However, the present invention can also be applied to other asynchronous communication establishment methods.
1 ホストマシン
2 フラッシュライタ
3 ターゲットボード
4 マイコン
5 発振子
6 ケーブル
7 フラッシュメモリ
8 フラッシュ制御プログラム
10 通信システム
20 ターゲットシステム
21 UART通信部
41 クロック発生回路
42 クロック発振回路
43 PLL回路
44 セレクタ
45 プリスケーラ
47 周辺クロック
51 ボーレート・ジェネレータ
52 セレクタ
53 CKSRレジスタ
54 8ビット・カウンタ
55 BRGCレジスタ
56 一致検出器
57 分周器
61 デバイスファイル
62 GUIイメージ
63 動作周波数入力
DESCRIPTION OF
Claims (18)
前記他方の機器の仕様に応じて定まる固有のボーレートにより、前記一方の機器が前記他方の機器に対し任意の規定ボーレートを設定し、
前記他方の機器が前記設定された規定ボーレートにより通信を開始する非同期型通信確立方法。 An asynchronous communication establishment method when one device has a baud rate setting function and performs asynchronous communication with the other device,
With a specific baud rate determined according to the specifications of the other device, the one device sets an arbitrary specified baud rate for the other device,
An asynchronous communication establishment method in which the other device starts communication at the set specified baud rate.
前記他方の機器は、前記周波数設定命令及び前記ボーレート設定命令に基づき前記規定ボーレートを生成して前記規定ボーレートにより通信を開始する
ことを特徴とする請求項1記載の非同期型通信確立方法。 The one device transmits a frequency setting command for setting an operating frequency to the other device at the specific baud rate, and transmits a baud rate setting command for setting the specified baud rate at the specific baud rate. To set an arbitrary specified baud rate for the other device,
The asynchronous communication establishment method according to claim 1, wherein the other device generates the specified baud rate based on the frequency setting command and the baud rate setting command and starts communication with the specified baud rate.
ことを特徴とする請求項1記載の非同期型通信確立方法。 The specific baud rate is a baud rate determined by a predetermined value and an operating frequency of a setting control unit that sets a setting value for generating the specified baud rate in the other device. Asynchronous communication establishment method.
ことを特徴とする請求項3記載の非同期型通信確立方法。 The asynchronous communication establishment method according to claim 3, wherein the predetermined value is a reset initial value of the setting control unit.
ことを特徴とする請求項1記載の非同期型通信確立方法。 The asynchronous communication establishment method according to claim 1, wherein the specific baud rate is an unspecified baud rate.
ことを特徴とする請求項4記載の非同期型通信確立方法。 The one device receives the reset initial value and the information on the operating frequency of the other device from the outside, generates the unique baud rate based on the input information, and sends the specific baud rate to the other device by the unique baud rate. The asynchronous communication establishment method according to claim 4, wherein a frequency setting command and a baud rate setting command are transmitted.
ことを特徴とする請求項1記載の非同期型通信確立方法。 The asynchronous communication establishment method according to claim 1, wherein the asynchronous communication is UART communication.
第2の機器が、前記第1の設定値及び前記第1の機器の動作周波数を入力され、前記第1の設定値及び前記第1の機器の動作周波数に基づいて第2のボーレートを設定する工程と、
前記第2の機器が、前記第2のボーレートによって前記第1の機器に対し前記第1のボーレートを規定のボーレートに変更するためのボーレート設定コマンドを送信する工程と、
前記ボーレート設定コマンドを受信した前記第1の機器が、前記第2の設定値及び前記第1の機器の動作周波数により前記規定のボーレートを設定する工程と、
前記ボーレート設定コマンドを送信した前記第2の機器が、前記第2のボーレートを前記規定のボーレートに変更する工程を有する非同期型通信確立方法。 The first device sets the first baud rate according to the first set value and the operating frequency of the first device;
The second device receives the first set value and the operating frequency of the first device, and sets the second baud rate based on the first set value and the operating frequency of the first device. Process,
The second device transmits a baud rate setting command for changing the first baud rate to a specified baud rate to the first device according to the second baud rate;
The first device that has received the baud rate setting command sets the specified baud rate according to the second setting value and the operating frequency of the first device;
An asynchronous communication establishment method, comprising: a step in which the second device that has transmitted the baud rate setting command changes the second baud rate to the specified baud rate.
ことを特徴とする請求項8記載の非同期型通信確立方法。 The asynchronous communication establishment method according to claim 8, wherein the first setting value is a reset initial value of a setting unit that sets a baud rate in the first device.
ことを特徴とする請求項8記載の非同期型通信確立方法。 9. The asynchronous communication establishment method according to claim 8, wherein the baud rate used in the first device has an allowable error that is a deviation width that enables communication with the second device from the baud rate. .
ことを特徴とする請求項8記載の非同期型通信確立方法。 9. The asynchronous communication establishment method according to claim 8, wherein the first and second baud rates are baud rates that are not defined in UART communication.
ことを特徴とする請求項10記載の非同期型通信確立方法。 The asynchronous communication establishment method according to claim 10, wherein the second baud rate is within an allowable error range of the first baud rate.
動作周波数のクロックを生成するクロック生成部と、
前記他の機器からの命令によりボーレートを設定する設定制御部と、
前記設定制御部の設定値及び前記クロック生成部にて生成される動作周波数とによりボーレートを生成するボーレート生成部とを有し、
前記設定制御部が有する所定値と動作周波数とに基づき決定される固有ボーレートにて前記他の機器との非同期型通信を確立させ前記他の機器から任意の規定ボーレートを設定される通信装置。 A communication device that performs asynchronous communication with other devices having a baud rate setting function,
A clock generator that generates a clock of an operating frequency;
A setting control unit for setting a baud rate according to a command from the other device;
A baud rate generation unit that generates a baud rate based on a setting value of the setting control unit and an operating frequency generated by the clock generation unit;
A communication apparatus in which asynchronous communication with the other device is established at a specific baud rate determined based on a predetermined value and an operating frequency of the setting control unit, and an arbitrary specified baud rate is set from the other device.
前記クロック生成部は、前記動作周波数設定命令に応じて動作周波数を生成し、
前記設定制御は、前記ボーレート設定命令に応じて前記規定ボーレートを前記ボーレート生成部に生成させる
ことを特徴とする請求項13記載の通信装置。 An operating frequency setting command for setting the operating frequency from the other device at the specific baud rate and a baud rate setting command for setting the specified baud rate are received,
The clock generation unit generates an operating frequency according to the operating frequency setting command,
The communication apparatus according to claim 13, wherein the setting control causes the baud rate generation unit to generate the specified baud rate in response to the baud rate setting command.
ことを特徴とする請求項14記載の通信装置。 The communication device according to claim 14, wherein the predetermined value is a reset initial value included in the setting control unit.
前記他の機器と非同期通信を行うためのボーレート生成部と、
前記他の機器にボーレートを設定するボーレート設定部とを有し、
前記ボーレート生成部は、前記他の機器の仕様に応じて定まる固有のボーレートを生成し、
前記ボーレート設定部は、前記固有のボーレートにより、前記他の機器に対し任意の規定ボーレートを設定する通信装置。 A communication device having a baud rate setting function and performing asynchronous communication by setting a baud rate for other devices,
A baud rate generator for performing asynchronous communication with the other device;
A baud rate setting unit for setting a baud rate in the other device;
The baud rate generation unit generates a specific baud rate determined according to the specifications of the other device,
The baud rate setting unit is a communication device that sets an arbitrary specified baud rate for the other device based on the specific baud rate.
ことを特徴とする請求項16記載の通信装置。 The communication apparatus according to claim 16, wherein the baud rate generation unit receives specification information of the other device from the outside and generates the specific baud rate based on the input information.
前記第1の機器は、
動作周波数のクロックを生成するクロック生成部と、
前記第2の機器からの命令によりボーレートを設定する設定制御部と、
前記設定制御部の設定値及び前記クロック生成部にて生成される動作周波数とによりボーレートを生成するボーレート生成部とを有し、
前記設定制御部が有する所定値と動作周波数とに基づき決定される固有ボーレートにて前記第1の機器との非同期型通信を確立させ、
前記第2の機器は、前記第1の機器の動作周波数及び前記所定値が外部から入力され、該入力情報に基づき前記固有ボーレートを生成し、前記固有ボーレートにより前記第1の機器に対して任意の規定ボーレートを設定する通信システム。 A communication system comprising a first device and a second device having a baud rate setting function for the first device,
The first device is:
A clock generator that generates a clock of an operating frequency;
A setting control unit for setting a baud rate according to a command from the second device;
A baud rate generation unit that generates a baud rate based on a setting value of the setting control unit and an operating frequency generated by the clock generation unit;
Establishing asynchronous communication with the first device at a specific baud rate determined based on a predetermined value and an operating frequency of the setting control unit;
The second device receives the operating frequency of the first device and the predetermined value from the outside, generates the specific baud rate based on the input information, and arbitrarily selects the first device based on the specific baud rate. A communication system that sets the specified baud rate.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005213362A JP4315935B2 (en) | 2005-07-22 | 2005-07-22 | Asynchronous communication establishment method, communication apparatus, and communication system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005213362A JP4315935B2 (en) | 2005-07-22 | 2005-07-22 | Asynchronous communication establishment method, communication apparatus, and communication system |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2007036399A true JP2007036399A (en) | 2007-02-08 |
JP4315935B2 JP4315935B2 (en) | 2009-08-19 |
Family
ID=37795146
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005213362A Expired - Fee Related JP4315935B2 (en) | 2005-07-22 | 2005-07-22 | Asynchronous communication establishment method, communication apparatus, and communication system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4315935B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120244290A1 (en) | 2011-03-24 | 2012-09-27 | United Technologies Corporation | Deposition Substrate Temperature and Monitoring |
-
2005
- 2005-07-22 JP JP2005213362A patent/JP4315935B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP4315935B2 (en) | 2009-08-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP2506074B1 (en) | Image capturing device and interchangeable lens | |
JP4327764B2 (en) | Data receiving apparatus, sync signal detecting method and program | |
JP5762011B2 (en) | Imaging device, interchangeable lens, and imaging device system | |
US11032671B2 (en) | Methods, systems and devices for communicating between devices within a channel hopping system | |
US20160330278A1 (en) | Synchronization measurement system, synchronization measurement method, controller, sensor unit, synchronous signal generation unit, synchronous signal transfer unit, and program | |
KR20150128658A (en) | Dithering circuit for serial data transmission | |
JP2009303178A (en) | Data receiver, method of receiving data, and data receiving program | |
JP4315935B2 (en) | Asynchronous communication establishment method, communication apparatus, and communication system | |
US9094911B2 (en) | Data communication system, method of optimizing preamble length, and communication apparatus | |
CN114884627B (en) | Baud rate synchronization method | |
JP5127342B2 (en) | Receiving apparatus and method | |
JP2004064616A (en) | Baud rate setting method, baud rate setting program, readable recording medium, communication system and communication method | |
JP2003134098A (en) | Serial receiver | |
JP2007202151A (en) | Integrated circuit for asynchronous serial data transfer with bit length counter | |
JP2005303631A (en) | Data communications system | |
KR101619506B1 (en) | Signal generating device, active cable, and method for signal generating | |
KR101879053B1 (en) | Test equipment in which baud rate is set automatically | |
JP2004146987A (en) | Received data reproducing apparatus | |
EP4020811B1 (en) | Power-on communication between a host ic and a client ic | |
JP4555888B2 (en) | Electronic device and clock control device | |
JP2006094430A (en) | Communications system, communications equipment, communication method using the communications system, program, and recording medium with the program stored thereto | |
KR101092850B1 (en) | Clock frequency offset compensation method and apparatus for dsrc systems | |
CN115811325A (en) | UART serial communication circuit and output method of voltage zero-crossing signal | |
JP3481483B2 (en) | Digital data wireless communication device and digital data wireless communication method | |
JP2011124882A (en) | Asynchronous type communication establishing method and asynchronous type communication system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20081218 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20090203 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20090406 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20090428 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20090519 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120529 Year of fee payment: 3 |
|
LAPS | Cancellation because of no payment of annual fees |