JP2007036399A - Asynchronous type communication establishing method, communication apparatus, and communication system - Google Patents

Asynchronous type communication establishing method, communication apparatus, and communication system Download PDF

Info

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
Application number
JP2005213362A
Other languages
Japanese (ja)
Other versions
JP4315935B2 (en
Inventor
Masami Ochiai
雅実 落合
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.)
NEC Electronics Corp
Original Assignee
NEC Electronics Corp
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 NEC Electronics Corp filed Critical NEC Electronics Corp
Priority to JP2005213362A priority Critical patent/JP4315935B2/en
Publication of JP2007036399A publication Critical patent/JP2007036399A/en
Application granted granted Critical
Publication of JP4315935B2 publication Critical patent/JP4315935B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Communication Control (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a communication establishing method for a communication system wherein a communication establishing sequence can be simplified, the reliability of communication establishment is enhanced, and the flash control program is reduced and applicable to a low function microcomputer or the like, and to provide a communication apparatus. <P>SOLUTION: The UART communication establishing method for carrying out UART communication between a flash writer 2 having a function of establishing a baud rate and a target system 20 comprising a microcomputer 4 operated at an optional operating frequency and an oscillator 5 allows the flash writer 2 to set a baud rate on the basis of a unique baud rate determined by a reset initial value set to a setting control section for setting a baud rate and built in the microcomputer 4 and by the operating frequency of the microcomputer 4. Thus, the baud rate in the target system 20 is set and the communication between the flash writer 2 and the target system 20 is established. <P>COPYRIGHT: (C)2007,JPO&INPIT

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, Patent Document 1 and Non-Patent Document 1). FIG. 7 shows an on-board programming system in which the flash writer 102 and the microcomputer 104 on the target board 103 are connected by UART communication as an example of the communication system 100 that performs UART communication. For the UART communication, a serial transmission data signal line Txd and a serial reception data signal line Rxd are used. Here, the above transmission and reception are viewed from the microcomputer 104 side, and “transmission” and “reception” are reversed when viewed from the flash writer 102 side. On the other hand, a host machine 101 is connected to the flash writer 102 by an RS-232C (Recommended Standard 232 version C) cable 106. In this specification, the side on which the baud rate is set, that is, the target system side will be described as a receiving device, and the flash writer 2 on the baud rate setting side will be described as a transmitting device.

ターゲットシステム110は、ターゲットボード103上にマイコン104及びその動作クロック源となる発振子105を有する。マイコン104は、フラッシュメモリ107及びその制御プログラム108を搭載している。   The target system 110 includes a microcomputer 104 and an oscillator 105 serving as an operation clock source on a target board 103. The microcomputer 104 has a flash memory 107 and a control program 108 mounted thereon.

このような通信システム100において、ユーザは、ホストマシン101上から、グラフィカル・ユーザ・インタフェース(以下、GUIという)を介し、フラッシュメモリ107の任意のアドレスのデータの読み出し、消去、書き込み等、必要な操作を行う。フラッシュライタ102は、その操作をコマンドとしてUART通信にてマイコン104に伝達する。フラッシュ制御プログラム108は、マイコン104内部において、UART通信で受信したコマンドに従い、フラッシュメモリ107のデータの読み出し、消去、書き込み等の処理を行う。   In such a communication system 100, a user needs to read, erase, write, etc. data at an arbitrary address in the flash memory 107 from a host machine 101 via a graphical user interface (hereinafter referred to as GUI). Perform the operation. The flash writer 102 transmits the operation as a command to the microcomputer 104 by UART communication. The flash control program 108 performs processing such as reading, erasing, and writing data in the flash memory 107 in accordance with a command received by UART communication within the microcomputer 104.

以上の動作処理において、マイコン104は動作クロック源として発振子105を使用するが、本来、発振子105はマイコン104が通常動作する際の動作クロック源である。発振子105の発振周波数は、マイコン104の電気的特性で定めた周波数範囲の中で、ターゲットシステム110に適した任意の周波数値をユーザが選択する。そして、発振周波数から生成される所望の動作周波数をターゲットシステム110及びマイコン104の仕様に従ってユーザが設定する。   In the above-described operation processing, the microcomputer 104 uses the oscillator 105 as an operation clock source. Originally, the oscillator 105 is an operation clock source when the microcomputer 104 normally operates. The oscillation frequency of the oscillator 105 is selected by the user from any frequency value suitable for the target system 110 within the frequency range defined by the electrical characteristics of the microcomputer 104. Then, the user sets a desired operating frequency generated from the oscillation frequency according to the specifications of the target system 110 and the microcomputer 104.

ところが、フラッシュ制御プログラム108はマイコン104の製造時に組み込まれるため、上記の発振周波数、動作周波数の値は未知である。しかし、ボーレートは動作周波数を元に設定されるため、ターゲットシステム110自信が先ず未知の動作周波数の値を知る(算出する)必要がある。なお、ボーレートの設定方法については後述する。   However, since the flash control program 108 is incorporated when the microcomputer 104 is manufactured, the values of the oscillation frequency and the operating frequency are unknown. However, since the baud rate is set based on the operating frequency, the target system 110 must first know (calculate) the value of the unknown operating frequency. A baud rate setting method will be described later.

ここでは先ず、フラッシュ制御プログラム108の内部で処理している動作周波数値の算出方法について説明する。先ず、動作周波数値の算出の原理を簡単に説明する。ターゲットシステム110は、フラッシュライタ102から送出された一定時間のLOWレベル幅の信号を受信し、マイコン104に内蔵したタイマ(不図示)を使用し、動作周波数を分周したカウントクロックで計数する。フラッシュライタ2から送られるLOWレベル幅の値は既知であるので、計数値から動作周波数を逆算することができる。なお、ハイレベル幅であってもよい。   Here, first, a method of calculating the operating frequency value processed in the flash control program 108 will be described. First, the principle of calculating the operating frequency value will be briefly described. The target system 110 receives a LOW level width signal sent from the flash writer 102 for a certain period of time, and uses a timer (not shown) built in the microcomputer 104 to count with a count clock obtained by dividing the operating frequency. Since the value of the LOW level width sent from the flash writer 2 is known, the operating frequency can be calculated backward from the count value. It may be a high level width.

次に、この動作周波数の算出方法について詳細に説明する。図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 flash writer 2 and the target system 110 are set to start UART communication at a specified baud rate (9600 bps). In this case, for example, the LOW level width 201 of a certain time width from the flash writer 102 is input from the external terminal of the microcomputer 104 for 9 bits of 9600 bps UART communication. The target system 110 monitors the reception of the LOW level when it is connected to the flash writer 2. Then, the falling edge of the signal is detected inside the microcomputer 104, and the timer is started. This timer is a compare timer, and the value of the compare register is 63. Counting starts from the register value 0, a compare match interrupt is generated after counting 64 times, and the count operation is performed again after the count value returns to 0. Here, a compare match period 202 in the figure indicates a period from the start of the timer to the compare match. The flash control program 108 increments the variable LOW_CNT every time a coincidence interrupt is generated.

上記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 compare coincidence period 202 is in the LOW level width 201 and the count value counted by the timer = t, the following equation is established.
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 target system 110 receives an arbitrary baud rate value by using a baud rate setting command, and sets the baud rate according to the baud rate setting command. The UART communication is established.

以上で述べた従来技術における一連の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 microcomputer 104 first receives a LOW level signal from the flash writer 102 (step S11), and counts the LOW level width. Then, in order to take the average, the LOW level signal is received again from the flash writer 102 (step S12), and the LOW level width is counted. Then, by calculating the average value of the operating frequencies from these count values, the baud rate can be once set to the specified value of 9600 bps. As a result, the target system 110 can receive a command from the flash writer 102.

次に、ターゲットシステム110は、フラッシュライタ102より周波数設定コマンドを受信し(ステップS13)、その応答(ACK)を送信する(ステップS14)。そして、ターゲットシステム110は、上記周波数設定コマンドに基づき発振周波数を設定し、動作周波数を設定する。次に、フラッシュライタ102からのボーレート設定コマンドを受信する(ステップS15)。これによりターゲットシステム110は、フラッシュライタ102より指定のボーレートに設定し、ACKを送信する(ステップS16)。このように、UART通信確立(規定のボーレートでの通信)に先立ち、2回のLOWレベル受信を経る必要がり、その後周波数設定コマンドの受信、ボーレート設定コマンドの受信を行う。   Next, the target system 110 receives a frequency setting command from the flash writer 102 (step S13), and transmits a response (ACK) (step S14). Then, the target system 110 sets the oscillation frequency based on the frequency setting command and sets the operating frequency. Next, a baud rate setting command is received from the flash writer 102 (step S15). Thereby, the target system 110 sets the designated baud rate from the flash writer 102 and transmits ACK (step S16). As described above, prior to establishment of UART communication (communication at a specified baud rate), it is necessary to receive two LOW level receptions, and then receive a frequency setting command and a baud rate setting command.

次に、マイコンにおけるボーレート設定方法について説明し、ボーレート設定に動作周波数値が必要である理由について合わせて説明する。   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 Non-Patent Document 1. The microcomputer has a clock generation circuit and a baud rate generator (not shown). Clocks (fx to xxx / 1024) generated by the clock generation circuit are supplied to the baud rate generator 501. The baud rate generator 501 includes a source clock selector unit (hereinafter referred to as a selector) 552 and an 8-bit programmable counter (hereinafter referred to as an 8-bit counter) 554, and a serial clock at the time of transmission / reception in the UART. Generate. The serial clock can select a dedicated baud rate generator output for each channel. Note that the 8-bit counter 554 exists separately for transmission and reception.

クロック選択レジスタ(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 CKSR register 553 and the BRGC register 555. That is, the basic clock frequency (f UCLK ) to be output to the 8-bit counter 554 is selected by the CKSR register 553, and the division value of the 8-bit counter 554, that is, the division ratio is set by the BRGC register 555. Set the setting value. The coincidence detector 556 outputs a clock in which the output of the 8-bit counter 554 coincides with the BRCG 555, and a frequency obtained by dividing the output by 2 by the frequency divider 557 is the baud rate.

ボーレートは、下記の式により求められる。
ボーレート[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 BRGC register 555, and takes values k = 8, 9, 10,.

このように、ボーレートは、メイン・クロック周波数(動作周波数)fxxを元に生成されており、ボーレートを設定するためには、メイン・クロック周波数fxxの値が必要である。よって、ボーレートの設定には、動作周波数fxxの算出が不可欠となる。
特開2001−69194号公報 「ユーザーズ・マニュアル V850ES/KJ1ハードウェア編 32ビット・シングルチップ・マイクロコンピュータ」,資料番号U16889JJ1V0UD00(第1版),第490〜496頁,2004年2月,NEC Electronics Corporation 2004, [平成17年6月16日検索] インターネット<http://www.necel.com/cgi-bin/nesdis/o002.cgi?aliascode=170127&langcode=J>
As described above, the baud rate is generated based on the main clock frequency (operating frequency) fx. In order to set the baud rate, the value of the main clock frequency fx is required. Therefore, calculation of the operating frequency fxx is indispensable for setting the baud rate.
JP 2001-69194 A "User's Manual V850ES / KJ1 Hardware Edition 32-bit Single-Chip Microcomputer", Document No. U16889EJ1V0UD00 (1st edition), 490-496, February 2004, NEC Electronics Corporation 2004, [June 2005 Search on March 16] Internet <http://www.necel.com/cgi-bin/nesdis/o002.cgi?aliascode=170127&langcode=J>

上述したように、従来の方法においては、ボーレート設定のために、フラッシュ制御プログラム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 flash control program 108 is incorporated into the microcomputer 104 in order to set the baud rate. That is, in the UART communication, a predetermined baud rate is set in advance on the transmission side and the reception side, but in order to set the predetermined baud rate, it is necessary for the target system 110 on the reception side to grasp the operating frequency. Therefore, it is necessary to calculate the operating frequency from the LOW level width before establishing communication. However, in order to calculate the operating frequency from the LOW level width, a timer is necessary as described above, and furthermore, a routine (program code) for calculating the operating frequency and a minimum of two flashes for receiving the LOW level. Communication with the writer 102 is required. In the above prior art, the operating frequency includes an error although the average value is calculated by receiving the LOW level width twice, and thus the error is also included in the baud rate of 9600 bps that has been once set conventionally. A command needs to be received. On the other hand, for example, it may be possible to remove the error of the baud rate by obtaining an average of three times or more, but there is a new problem that it takes time until the baud rate setting command is received, that is, until UART communication is established. .

以上のような理由により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 microcomputer 104 has a built-in timer, the code of the flash control program 108 for the operating frequency calculation routine is increased, and the chip area is increased, leading to an increase in cost. There is a point.

特に近年は、低機能、低価格のマイコンの需要が伸び、コスト競争力が求められ、フラッシュ制御プログラムの極限までの縮小化が進められている。したがって、この動作周波数算出機能のプログラムコードは、マイコンの縮小化の弊害となるものである。また、本来のフラッシュ制御機能ではないことから、フラッシュ制御プログラムのコストパフォーマンスを悪化させているとも考えられる。   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 communication system 10 includes a flash writer 2 as an example of one device (first device) having a communication setting function for a baud rate value, and an example of the other device (second device) that operates at an arbitrary frequency. A microcomputer 4 and a target system 20 having an oscillator 5 (target system 20) serving as an operation clock source thereof. Thus, an on-board programming system in which the flash writer 2 and the microcomputer 4 on the target board 3 are connected by UART communication is configured. Here, in this example, the flash writer 2 having a baud rate setting function is described as a transmission device, and the target system 20 on the side where the baud rate is set is described as a reception device.

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 microcomputer 4 side (reception device side), and “transmission” and “reception” are reversed when viewed from the flash writer 2 side (transmission device side). On the other hand, the host machine 1 is connected to the flash writer 2 by an RS-232C cable 6.

マイコン4は、フラッシュメモリ7及びその制御プログラム8を搭載している。マイコン4は、その他、ターゲットボード3上にマイコン4とは別に具備される発振子5からクロックを生成する後述するクロック発生回路(不図示)、及びボーレートを生成するボーレート・ジェネレータ(不図示)を有する。フラッシュライタ2とマイコン4とのUART通信は、フラッシュライタ2が指定するボーレートにより行なわれる。ターゲットシステム20においては、上記クロック発生回路により任意の動作周波数のクロックを発生させることができ、またボーレート・ジェネレータによりフラッシュライタ2により設定される規定ボーレートを生成する。   The microcomputer 4 has a flash memory 7 and a control program 8 mounted thereon. In addition, the microcomputer 4 includes a clock generation circuit (not shown) that generates a clock from an oscillator 5 provided separately from the microcomputer 4 on the target board 3, and a baud rate generator (not shown) that generates a baud rate. Have. UART communication between the flash writer 2 and the microcomputer 4 is performed at a baud rate specified by the flash writer 2. In the target system 20, a clock having an arbitrary operating frequency can be generated by the clock generation circuit, and a specified baud rate set by the flash writer 2 is generated by a baud rate generator.

このようなシステムにおいて、ユーザは、ホストマシン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 flash memory 7 from the host machine 1 via the GUI. The flash writer 2 transmits the operation as a command to the microcomputer 4 by UART communication. The flash control program 8 performs processing such as reading, erasing, and writing data in the flash memory 7 in accordance with a command received by UART communication within the microcomputer 4. The above points are the same as in the prior art.

ここで、フラッシュライタ2とターゲットシステム20との間のUART通信は、例えば9600bpsの規定のボーレートで行うことが決められている。ターゲットシステム20においては、その動作周波数に基づきボーレートが生成されるため、上記規定のボーレート設定のために先ず動作周波数を求める必要があった。なお、その他の規定のボーレート値としても同様である。これに対し、本実施の形態においては、ターゲットシステム20の仕様によって定まる固有のボーレート(第1のボーレート)にてフラッシュライタ2よりボーレートの設定を行なわせることで、上記動作周波数の算出を不要とするものである。   Here, it is determined that the UART communication between the flash writer 2 and the target system 20 is performed at a specified baud rate of 9600 bps, for example. In the target system 20, since the baud rate is generated based on the operating frequency, it is necessary to first obtain the operating frequency in order to set the specified baud rate. The same applies to other prescribed baud rate values. On the other hand, in the present embodiment, the baud rate is set by the flash writer 2 at a specific baud rate (first baud rate) determined by the specifications of the target system 20, thereby eliminating the need to calculate the operating frequency. To do.

図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 clock generation circuit 41 and a UART baud rate generator 51 included in the target system 20. As shown in FIG. 2, the clock generation circuit 41 includes a clock oscillation circuit 42 connected to the oscillator 5, a PLL (Phase Locked Loop) circuit 43, a selector 44, and a prescaler 45. The oscillator 5 is selected by the user in the range of, for example, 2 MHz to 10 MHz according to the target system 20 and is output from the clock oscillation circuit 42. The clock generation circuit 41 has a clock through mode (direct mode) in which the output fx of the clock oscillation circuit 42 is used as it is as a main clock frequency (fxx) and a PLL mode in which fx is multiplied by, for example, 4 times. An arbitrary operating frequency fx is determined by the oscillation frequency of the resonator 5 and whether it is in the PLL mode or the direct mode, and the range thereof is, for example, 2 MHz to 20 MHz.

すなわち、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 oscillator 5, each mode, and the like.

プリスケーラ45は、メイン・クロック周波数fxxを分周する回路であり、後述するセレクタ52にプリスケーラ45で生成したクロック(fxx〜fxx/1024:周辺クロック47)を供給する。   The prescaler 45 is a circuit that divides the main clock frequency fxx, and supplies a clock (fxx to fxx / 1024: peripheral clock 47) generated by the prescaler 45 to the selector 52 described later.

ボーレート・ジェネレータ51は、ソース・クロック・セレクタ部(以下、セレクタという)52と8ビットのプログラマブル・カウンタ(以下、8ビット・カウンタという)54とを有し、UART通信における送受信時のシリアル・クロックを生成する。シリアル・クロックは、複数のチャネルを有する場合にはチャネル毎に専用ボーレート・ジェネレータ出力を選択することができる。なお、8ビット・カウンタ54は送信用と受信用が別々に存在する。   The baud rate generator 51 has a source clock selector section (hereinafter referred to as a selector) 52 and an 8-bit programmable counter (hereinafter referred to as an 8-bit counter) 54, and a serial clock at the time of transmission / reception in UART communication. Is generated. When the serial clock has a plurality of channels, a dedicated baud rate generator output can be selected for each channel. Note that the 8-bit counter 54 is provided separately for transmission and reception.

クロック選択レジスタ(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 CKSR register 53 and the BRGC register 55. That is, the basic clock frequency (f UCLK ) to be output to the 8-bit counter 54 is selected by the CKSR register 53, and the division value of the 8-bit counter 54, that is, the division ratio is set by the BRGC register 55. Set the setting value. The coincidence detector 56 outputs a clock in which the output of the 8-bit counter 54 and the BRGC register 55 coincide with each other, and a frequency obtained by dividing the output by 2 by the frequency divider 57 is the baud rate.

ここで、通常の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 flash writer 2, and the register values of the CKSR register 53 and the BRGC register 55 are set by the baud rate setting command. Generates the specified baud rate. Therefore, as in the above-described prior art, generally, a prescribed baud rate cannot be set unless the operating frequency is calculated. Unless the specified baud rate is set, UART communication with the flash writer 2 cannot be performed.

ここで、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 register 53 and the BRGC register 55, a unique baud rate is generated in the target system 20. In the present embodiment, communication with the flash writer 2 is started at this unique baud rate. That is, the microcomputer 4 in the present embodiment is a setting control unit for the baud rate generator 51 instead of a predetermined specified baud rate in a process prior to the UART communication started by setting the specified baud rate by the flash writer 2. Communication with the flash writer 2 is executed using a specific unspecified baud rate obtained from the reset initial values and the operating frequency of the CKSR register 53 and the BRGC register 55.

ここで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 register 53 and the BRGC register 55 are as follows.
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 BRGC register 55, and takes values k = 8, 9, 10,.

従って、以上の環境で、設定されるボーレートは、図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 CKSR register 53 and the BRGC register 55, and in this example, a baud rate value that is not specified.

一方、フラッシュライタ2側では、上記固有のボーレート値に合致するよう次に説明する方法にてボーレートの設定を行う。図4は、フラッシュライタ2の構成及びホストマシン1のGUIイメージを示す模式図である。CKSRレジスタ53及びBRGCレジスタ55のリセット初期値は、製品毎にその仕様より予め定められており、デバイスファイル61から入力することができる。動作周波数fxxは、ホストマシン1のGUIを介し、ホストマシン・GUIイメージ62に示すように、動作周波数入力部63によりユーザがその数値を直接入力する。   On the other hand, on the flash writer 2 side, the baud rate is set by the method described below so as to match the specific baud rate value. FIG. 4 is a schematic diagram showing a configuration of the flash writer 2 and a GUI image of the host machine 1. The reset initial values of the CKSR register 53 and the BRGC register 55 are determined in advance for each product according to its specifications, and can be input from the device file 61. As shown in the host machine / GUI image 62, the user directly inputs the numerical value of the operating frequency fx through the GUI of the host machine 1 as shown in the host machine / GUI image 62.

以上のように、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 CKSR register 53 and the BRGC register 55 are clear, the non-specified baud rate shown in FIG. 3 is also calculated in the flash writer 2 on the specified baud rate setting side. Is possible. The flash writer 2 has a calculation unit or a program (not shown) that calculates a baud rate from the reset initial values of the CKSR register 53 and the BRGC register 55 and the operating frequency fxx. Here, assuming that the operating frequency of the UART communication unit 21 built in the flash writer 2 is 40 MHz, for example, the baud rate setting example shown in FIG. 3 is set as the target baud rate, and an example of the set baud rate (second baud rate) is shown in FIG. Show.

ここで、受信の際に送信先のボーレートのずれがどの程度まで許容できるか(許容誤差)は理論上下記の式により求めることができる(非特許文献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 (Non-patent Document 1, P495-496). The following formula shows a case where 11-bit reception is applied.
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 BRGC register 55, and “Brate” represents a UART baud rate designated by the flash writer 2. The accuracy of reception depends on the number of bits per frame, the basic clock frequency (f UCLK ), and the frequency division ratio k. The basic clock frequency (f UCLK ) is higher, and the higher the frequency division ratio k, the higher the accuracy. That is, the allowable error decreases as the basic clock frequency (f UCLK ) increases and the frequency division ratio k increases.

上記式にて求めた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 flash writer 2, complicated processing such as calculation of the operating frequency is performed for setting the specified baud rate by using an unspecified baud rate determined according to the specification of the device. In addition, there is no need to incorporate a counter in the microcomputer 4. FIG. 6 is a diagram showing these operation sequences.

本実施の形態においては、上述の如く規定外の固有のボーレートにて規定ボーレートの設定を行なうため、動作周波数の算出が必要ない。ターゲットシステム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 target system 20 receives the frequency setting command from the flash writer 2 at the specific baud rate in the first communication (step S1). An acknowledge (ACK) response (step S2) to the frequency setting command is also performed at the specific baud rate. Next, in order to set an arbitrary specified baud rate, a baud rate setting command is received from the flash writer 2 at the specific baud rate (step S3). With the above reception, the target system 20 can set the operating frequency and set it to any prescribed baud rate.

こうしてフラッシュライタ2とマイコン4との間にて規定ボーレートによる通信が確立するまでの間、すなわち、ステップS1のマイコン4の動作周波数を設定するための周波数設定コマンドの受信、ステップS2のACKの返信、ステップS3のボーレートを設定するボーレート設定コマンドの受信は、上述の固有のボーレートで行ない、規定ボーレートに設定することで、ターゲットシステム20は、規定のボーレート設定コマンドに対するアクノーリッジ返信(ステップS4)を規定のボーレートを使用して実行する。これにて規定ボーレートによるUART通信が確立される。   Thus, until communication at the specified baud rate is established between the flash writer 2 and the microcomputer 4, that is, reception of a frequency setting command for setting the operating frequency of the microcomputer 4 in step S1, and return of an ACK in step S2. The reception of the baud rate setting command for setting the baud rate in step S3 is performed at the above-mentioned specific baud rate, and the target baud rate is set to the target baud rate, so that the target system 20 returns an acknowledge response to the specified baud rate setting command (step S4). Run using the specified baud rate. This establishes UART communication at the specified baud rate.

本実施の形態においては、マイコン4に内蔵されるボーレート・ジェネレータ51のボーレート設定制御部であるCKSRレジスタ53及びBRGCレジスタ55のリセット初期値をそのまま使用した場合にボーレート・ジェネレータ51にて設定される固有のボーレートを使用してフラッシュライタ2に規定ボーレートの設定を行なわせる。すなわち、フラッシュライタ2との規定ボーレートでの通信が確立するまでの間は規定のボーレートを使用しないため、マイコン4ではUART通信を開始するための予め定められたボーレートの設定自体が不要となる。このため、以下の効果を奏する。   In this embodiment, the baud rate generator 51 sets the reset initial values of the CKSR register 53 and the BRGC register 55 which are baud rate setting control units of the baud rate generator 51 built in the microcomputer 4 as they are. Uses a specific baud rate to cause the flash writer 2 to set a specified baud rate. That is, since the prescribed baud rate is not used until the communication with the flash writer 2 at the prescribed baud rate is established, the microcomputer 4 does not need to set a predetermined baud rate for starting the UART communication. For this reason, there exist the following effects.

先ず、従来の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 flash control program 8 is not required, it is not necessary to incorporate the operating frequency calculation routine in the flash control program 8, and the program is recorded. Therefore, it is possible to reduce about 500 bytes required for the purpose.

更に、動作周波数算出が不要になることにより、マイコンに内蔵されていることが前提であったタイマも不要となり、低機能なマイコン又は類似するシステムにも応用ができる。   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 flash control program 8 is reduced, and It has an excellent effect that it can be applied to low-function microcomputers.

なお、本発明は上述した実施の形態のみに限定されるものではなく、本発明の要旨を逸脱しない範囲において種々の変更が可能であることは勿論である。例えば、本実施の形態においては、非同期型通信の一例として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.

本発明の実施の形態にかかる通信システムを示す図である。It is a figure which shows the communication system concerning embodiment of this invention. 本発明の実施の形態にかかる通信システムにおけるマイコンに内蔵されたクロック発生回路及びUARTのボーレート・ジェネレータを示す図である。It is a figure which shows the clock generation circuit incorporated in the microcomputer in the communication system concerning embodiment of this invention, and the baud rate generator of UART. 本発明の実施の形態にかかる通信システムにおける通信確立するまでの間のマイコンにおけるボーレート設定例を示す図である。It is a figure which shows the baud rate setting example in the microcomputer until communication establishment in the communication system concerning embodiment of this invention is established. 本発明の実施の形態にかかる通信システムにおけるフラッシュライタの構成及びホストマシン1のGUIイメージを示す模式図である。1 is a schematic diagram showing a configuration of a flash writer and a GUI image of a host machine 1 in a communication system according to an embodiment of the present invention. 図3に示したボーレート設定例を目標ボーレートとしてフラッシュライタにて設定したボーレート設定例を示す図である。FIG. 4 is a diagram showing a baud rate setting example set by a flash writer as a target baud rate example shown in FIG. 3. 本発明の実施の形態にかかる通信システムにおけるUART通信確立のシーケンスを示す図である。It is a figure which shows the sequence of UART communication establishment in the communication system concerning embodiment of this invention. 従来の通信システムを示す図である。It is a figure which shows the conventional communication system. 従来の通信システムにおいて、マイコンに入力されたLOWレベル信号と、タイマのカウント動作を示すタイミングチャートである。It is a timing chart which shows the LOW level signal input into the microcomputer, and the count operation of a timer in the conventional communication system. 従来のUART通信確立のシーケンスを示す図である。It is a figure which shows the sequence of the conventional UART communication establishment. 非特許文献1に記載のボーレート・ジェネレータの構成を示す図である。It is a figure which shows the structure of the baud rate generator of a nonpatent literature 1.

符号の説明Explanation of symbols

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 SYMBOLS 1 Host machine 2 Flash writer 3 Target board 4 Microcomputer 5 Oscillator 6 Cable 7 Flash memory 8 Flash control program 10 Communication system 20 Target system 21 UART communication part 41 Clock generation circuit 42 Clock oscillation circuit 43 PLL circuit 44 Selector 45 Prescaler 47 Clock 51 Baud rate generator 52 Selector 53 CKSR register 54 8-bit counter 55 BRGC register 56 Match detector 57 Divider 61 Device file 62 GUI image 63 Operating frequency input

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.
前記非同期型通信は、UART通信である
ことを特徴とする請求項1記載の非同期型通信確立方法。
The asynchronous communication establishment method according to claim 1, wherein the asynchronous communication is UART communication.
第1の機器が、第1の設定値及び第1の機器の動作周波数により第1のボーレートを設定する工程と、
第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.
前記第1の設定値は、前記第1の機器におけるボーレートを設定する設定部のリセット初期値である
ことを特徴とする請求項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.
前記第1の機器で使用されるボーレートは、当該ボーレートからの前記第2の機器との通信が可能なずれ幅である許容誤差を有する
ことを特徴とする請求項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. .
前記第1及び第2のボーレートは、UART通信の規定外のボーレートであること
ことを特徴とする請求項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.
前記第2のボーレートは、前記第1のボーレートの許容誤差範囲内にある
ことを特徴とする請求項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の機器と、前記第1の機器に対してボーレートの設定機能を有する第2の機器とを有する通信システムであって、
前記第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.
JP2005213362A 2005-07-22 2005-07-22 Asynchronous communication establishment method, communication apparatus, and communication system Expired - Fee Related JP4315935B2 (en)

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)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120244290A1 (en) 2011-03-24 2012-09-27 United Technologies Corporation Deposition Substrate Temperature and Monitoring

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