JPH0748647B2 - Duty ratio discrimination circuit - Google Patents

Duty ratio discrimination circuit

Info

Publication number
JPH0748647B2
JPH0748647B2 JP63237017A JP23701788A JPH0748647B2 JP H0748647 B2 JPH0748647 B2 JP H0748647B2 JP 63237017 A JP63237017 A JP 63237017A JP 23701788 A JP23701788 A JP 23701788A JP H0748647 B2 JPH0748647 B2 JP H0748647B2
Authority
JP
Japan
Prior art keywords
signal
duty ratio
value
pbctl
register
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP63237017A
Other languages
Japanese (ja)
Other versions
JPH0284812A (en
Inventor
英樹 坂本
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC 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 Corp filed Critical NEC Corp
Priority to JP63237017A priority Critical patent/JPH0748647B2/en
Publication of JPH0284812A publication Critical patent/JPH0284812A/en
Publication of JPH0748647B2 publication Critical patent/JPH0748647B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Manipulation Of Pulses (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、パルス信号のデューティ比判別回路に関し、
特に周期が変動するパルス信号のデューティ比を判別で
きるデューティ比判別回路に関する。
TECHNICAL FIELD The present invention relates to a pulse signal duty ratio determination circuit,
In particular, the present invention relates to a duty ratio discriminating circuit capable of discriminating the duty ratio of a pulse signal whose period changes.

〔従来の技術〕[Conventional technology]

家電品のリモートコントロールやVTR装置のインデクス
信号,バーコード等において、ディジタル値の表現にパ
ルス信号が用いられている。たとえばデューティ比70%
のパルス信号を“1"、デューティ比40%のパルス信号を
“0"と決めておき、これら2種類のパルス信号の組合せ
でデータを表現する。一例としてデータ1011は第8図の
パルス信号で表現する。
Pulse signals are used to represent digital values in remote control of home electric appliances, index signals of VTR devices, and bar codes. For example, duty ratio 70%
The pulse signal of 1 is determined as “1”, the pulse signal having a duty ratio of 40% is determined as “0”, and data is expressed by a combination of these two types of pulse signals. As an example, the data 1011 is represented by the pulse signal shown in FIG.

上述した方法で1,0のデータを表現する機器において
は、入力パルス信号のデューティ比を判別する回路を内
蔵している。
A device that expresses 1,0 data by the method described above has a built-in circuit for determining the duty ratio of the input pulse signal.

一例としてマイクロコンピュータで判別する場合を説明
する。
As an example, a case of making a determination with a microcomputer will be described.

ここではパルス信号としてVTRのインデクス信号を想定
する。VTRのインデクス信号は再生コントロール信号
(以下PBCTL信号と記す)のデューティ比を2種類設定
し、デューティ比の違いにより1,0のデータを表現す
る。PBCTL信号は磁気テープの長手方向に記録されてお
り、VTR再生時のサーボ制御に用いられる信号である。
Here, a VTR index signal is assumed as the pulse signal. For the VTR index signal, two types of duty ratio of the playback control signal (hereinafter referred to as PBCTL signal) are set, and 1,0 data is expressed by the difference in duty ratio. The PBCTL signal is recorded in the longitudinal direction of the magnetic tape and is a signal used for servo control during VTR reproduction.

第9図は従来のデューティ比判別回路を示している。こ
の回路はVTRのインデクス信号を判別するためのもので
ある。
FIG. 9 shows a conventional duty ratio discrimination circuit. This circuit is for discriminating the VTR index signal.

まず各部の構成を説明する。First, the configuration of each part will be described.

PBCTL信号1はVTRの再生コントロール信号である。The PBCTL signal 1 is a VTR reproduction control signal.

CPU101はプログラムに従ってシステム全体を制御する中
央処理装置である。またエッジ検出信号110により、割
込み処理プログラムを起動する。
The CPU 101 is a central processing unit that controls the entire system according to a program. In addition, the edge detection signal 110 activates the interrupt processing program.

両エッジ検出回路102はPBCTL信号1を入力とし、PBCTL
信号1の立上りエッジ又は立下りエッジを検出したと
き、ハイアクティブのエッジ検出信号110を出力する。
Both edge detection circuit 102 receives PBCTL signal 1 as input,
When the rising edge or the falling edge of the signal 1 is detected, the high active edge detection signal 110 is output.

カウンタ105はクロック信号106を入力とし、そのパルス
数をカウントし、カウント信号120を出力する。
The counter 105 receives the clock signal 106 as an input, counts the number of pulses thereof, and outputs a count signal 120.

クロック信号106は一定インターバルのパルス信号であ
る。
The clock signal 106 is a pulse signal with a constant interval.

キャプチャレジスタ107はカウント信号120とエッジ検出
信号110を入力とし、エッジ検出信号110入力時のカウン
ト信号120をラッチする。またCPU101がキャプチャレジ
スタ107の読出し処理を実行するとき、キャプチャ信号1
21をバスライン108に出力する。
The capture register 107 receives the count signal 120 and the edge detection signal 110, and latches the count signal 120 when the edge detection signal 110 is input. When the CPU 101 executes the reading process of the capture register 107, the capture signal 1
21 is output to the bus line 108.

バスライン108はデータを転送するバスである。The bus line 108 is a bus for transferring data.

次に第10図のタイミングチャートを参照し動作を説明す
る。
Next, the operation will be described with reference to the timing chart of FIG.

PBCTL信号1の立上りエッジでエッジ検出信号110が発生
し、キャプチャレジスタ107はカウント信号120をラッチ
する。このときのキャプチャ値をn1とする。一方、エッ
ジ検出信号110の発生によりCPU101は割込み処理を開始
する。CPU101は割込み処理プログラムで、キャプチャ信
号121を読み出しCPU101内のレジスタに記憶する。従っ
てn1を記憶することになる。
The edge detection signal 110 is generated at the rising edge of the PBCTL signal 1, and the capture register 107 latches the count signal 120. The capture value at this time is n 1 . On the other hand, when the edge detection signal 110 is generated, the CPU 101 starts interrupt processing. The CPU 101 is an interrupt processing program and reads the capture signal 121 and stores it in a register in the CPU 101. Therefore, n 1 will be stored.

その後割込み処理を終了する。After that, the interrupt processing ends.

次にPBCTL信号1の立下りエッジでエッジ検出信号110が
発生し、キャプチャレジスタ107はカウント信号120をラ
ッチする。このときのキャプチャ値をn2とする。エッジ
検出信号110の発生によりCPU101は割込み処理を開始す
る。CPU101は割込み処理プログラムでCPU101内のレジス
タから前回のキャプチャ値n1を読み出し、今回のキャプ
チャ値n2との差 t1=n2−n1 ……(1) を計算する。t1はPBCTL信号1のハイレベル区間のパル
ス幅を示している。一方PBCTL信号1の周期Tは33[m
s]で一定である。従ってPBCTL信号1が信号“1"(デュ
ーティ比70%)であるか、信号“0"(デューティ比40
%)であるかは、 の関係から判定することができる。CPU101は式(2),
式(3)のいずれが成立するかをプログラムで判定した
後、割込み処理を終了する。
Next, the edge detection signal 110 is generated at the falling edge of the PBCTL signal 1, and the capture register 107 latches the count signal 120. The capture value at this time is n 2 . When the edge detection signal 110 is generated, the CPU 101 starts interrupt processing. The CPU 101 reads the previous capture value n 1 from the register in the CPU 101 by the interrupt processing program, and calculates the difference t 1 = n 2 −n 1 (1) from the current capture value n 2 . t 1 indicates the pulse width of the PBCTL signal 1 in the high level section. On the other hand, the cycle T of PBCTL signal 1 is 33 [m
s] is constant. Therefore, whether PBCTL signal 1 is signal "1" (duty ratio 70%) or signal "0" (duty ratio 40%)
%) Can be determined from the relationship. The CPU 101 uses equation (2),
After the program determines which of the expressions (3) holds, the interrupt processing is ended.

以後、同様の処理を繰り返し、信号“1"又は信号“0"を
順次判定する。
After that, similar processing is repeated to sequentially determine the signal “1” or the signal “0”.

〔発明が解決しようとする課題〕[Problems to be Solved by the Invention]

上述した回路はPBCTL信号1の周期が33[ms]のとき
(再生時)は問題はない。しかしVTRのインデクスサー
チモードではテープを通常再生時より高速に走行させる
ため、式(2),式(3)が成立しなくなる。従って上
述した回路でデューティ比を判別できない。
The circuit described above has no problem when the cycle of the PBCTL signal 1 is 33 [ms] (during reproduction). However, in the VTR index search mode, the tape is run at a higher speed than during normal playback, and therefore equations (2) and (3) do not hold. Therefore, the duty ratio cannot be determined by the circuit described above.

すなわち従来のデューティ比判別回路は、入力パルス信
号の周期が変化する場合はデューティ比を判別できない
構成となっていた。
That is, the conventional duty ratio determination circuit has a configuration in which the duty ratio cannot be determined when the cycle of the input pulse signal changes.

〔課題を解決するための手段〕[Means for Solving the Problems]

本発明のパルス信号のデューティ比判定回路は、所定の
クロックをカウントするカウンタと、入力パルスのエッ
ジで前記カウンタの値をラッチするキャプチャレジスタ
とキャプチャ後に前記カウンタの値をクリアするクリア
手段と、比較値を記憶するコンペアレジスタと、前記カ
ウンタと前記コンペアレジスタの値を比較し一致した時
に一致信号を出力するコンパレータと、前記一致信号が
発生した時の前記入力パルスのレベルを記憶する記憶回
路と、前記キャプチャレジスタの値を読み取り所定の演
算を行い前記コンペアレジスタに比較値を設定する演算
回路とを有している。
The pulse signal duty ratio determination circuit of the present invention includes a counter that counts a predetermined clock, a capture register that latches the value of the counter at the edge of an input pulse, and a clear unit that clears the value of the counter after capture. A compare register that stores a value, a comparator that outputs a match signal when the values of the counter and the compare register are compared and matches, and a storage circuit that stores the level of the input pulse when the match signal occurs, An arithmetic circuit for reading the value of the capture register and performing a predetermined arithmetic operation to set a comparison value in the compare register.

すなわち、本発明に係るパルス信号のデューティ比判別
回路は、パルス信号の周期を測定し、その周期に応じた
タイミングでパルス信号のレベルをラッチすることによ
りデューティ比を判別する。したがって、パルス信号の
周期が変化してもデューティ比を判別することができ
る。
That is, the pulse signal duty ratio determination circuit according to the present invention determines the duty ratio by measuring the period of the pulse signal and latching the level of the pulse signal at the timing corresponding to the period. Therefore, the duty ratio can be determined even if the cycle of the pulse signal changes.

〔実施例〕〔Example〕

次に、本発明について図面を参照して説明する。 Next, the present invention will be described with reference to the drawings.

第1図は本発明の一実施例のブロック図である。まず各
構成要素を説明する。
FIG. 1 is a block diagram of an embodiment of the present invention. First, each component will be described.

PBCTL信号1はVTRの再生コントロール信号である。The PBCTL signal 1 is a VTR reproduction control signal.

CPU2はプログラムに従ってシステム全体を制御する中央
処理装置である。またエッジ検出信号13により、割込み
処理プログラムを起動する。
The CPU 2 is a central processing unit that controls the entire system according to a program. Further, the edge detection signal 13 activates the interrupt processing program.

立上りエッジ検出回路12はPBCTL信号1を入力とし、PBC
TL信号1の立上りエッジを検出したとき、ハイアクティ
ブのエッジ検出信号13を出力する。
The rising edge detection circuit 12 receives the PBCTL signal 1 and
When the rising edge of the TL signal 1 is detected, a high active edge detection signal 13 is output.

ディレイ回路14はエッジ検出信号13を1クロックだけ遅
延させてクリア手段15として出力し、カウンタ16をクリ
アする。
The delay circuit 14 delays the edge detection signal 13 by one clock and outputs it as the clearing means 15 to clear the counter 16.

カウンタ16はクロック信号17を入力とし、そのパルス数
をカウントし、カウント信号40を出力する。
The counter 16 receives the clock signal 17 as an input, counts the number of pulses thereof, and outputs a count signal 40.

クロック信号17は一定インターバルのパルス信号であ
る。
The clock signal 17 is a pulse signal with a constant interval.

キャプチャレジスタ18はエッジ検出信号13とカウント信
号40を入力とし、エッジ検出信号13入力時のカウント信
号40をラッチする。またCPU2がキャプチャレジスタ18の
読み出し処理を実行するキャプチャ信号41をバスライン
22に出力する。
The capture register 18 receives the edge detection signal 13 and the count signal 40, and latches the count signal 40 when the edge detection signal 13 is input. In addition, the CPU2 sends the capture signal 41 for reading the capture register 18 to the bus line.
Output to 22.

コンペアレジスタ19はCPU2がコンペアレジスタ19への書
込み処理を実行するときバスライン22上のデータをラッ
チしコンペア信号42を出力する。
The compare register 19 latches the data on the bus line 22 and outputs the compare signal 42 when the CPU 2 executes the writing process to the compare register 19.

コンパレータ20はカウント信号40とコンペア信号42を入
力とし、両者を比較し、比較結果が真の場合はハイアク
ティブの一致信号21を出力する。
The comparator 20 receives the count signal 40 and the compare signal 42 as inputs, compares them, and outputs a high-active coincidence signal 21 when the comparison result is true.

バスライン22は各種データを転送するバスである。The bus line 22 is a bus that transfers various data.

Dラッチ23は一致信号21とPBCTL信号1を入力とし、一
致信号21を入力したときのPBCTL信号1のレベルをラッ
チする。またCPU2がDラッチ23の読み出し処理を実行す
るとき、Dラッチ23のQ出力をデューティ判別信号43と
してバスライン22に出力する。
The D latch 23 receives the match signal 21 and the PBCTL signal 1, and latches the level of the PBCTL signal 1 when the match signal 21 is input. When the CPU 2 executes the reading process of the D latch 23, it outputs the Q output of the D latch 23 to the bus line 22 as the duty discrimination signal 43.

次に動作を説明する。Next, the operation will be described.

第2図はデューティ比判別の原理を示している。本発明
においてはPBCTL信号のパルス幅を測定するのではな
く、特定の時刻におけるPBCTL信号のレベルでデューテ
ィ比を判別する。レベルを判定する時刻はPBCTL信号の
立上りからPBCTL信号の周期の55%だけ経過した時刻と
する。
FIG. 2 shows the principle of determining the duty ratio. In the present invention, the duty ratio is determined by the level of the PBCTL signal at a specific time, instead of measuring the pulse width of the PBCTL signal. The time to determine the level is the time when 55% of the period of the PBCTL signal has elapsed from the rising of the PBCTL signal.

本例では信号“0"のデューティ比40%と、信号“1"のデ
ューティ比70%の中間の値である55%を、レベル判定の
時刻としたが、40%と70%の間であればどこで判定して
もよい(たとえば50%でもよい)。また信号“0",“1"
のデューティ比が本例と異なる場合も、本例と同様に信
号“0"のデューティ比と信号“1"のデューティ比の間の
値をレベル判定の時刻とすればよい。たとえば信号“0"
がデューティ比50%、信号“1"がデューティ比90%であ
れば、レベル判定の時刻を70%程度に設定する。
In this example, 55%, which is an intermediate value between the duty ratio 40% of the signal “0” and the duty ratio 70% of the signal “1”, is set as the level determination time. However, it may be between 40% and 70%. You may decide anywhere (eg 50%). Signals "0", "1"
Even when the duty ratio is different from that in this example, a value between the duty ratio of the signal “0” and the duty ratio of the signal “1” may be used as the level determination time, as in the present example. For example, the signal “0”
If the duty ratio is 50% and the signal “1” is 90% duty ratio, the level judgment time is set to about 70%.

第3図は動作のタイミングチャートを示している。FIG. 3 shows a timing chart of the operation.

PBCTL信号1の立上りに同期してエッジ検出信号13が発
生し、その1クロック後にクリア手段15を出力するので
カウンタ16をクリアする。従ってカウンタ16はPBCTL信
号1の立上りに同期してクリアされるインターバルタイ
マとして動作する。
The edge detection signal 13 is generated in synchronization with the rising edge of the PBCTL signal 1, and one clock after that, the clear means 15 is output, so that the counter 16 is cleared. Therefore, the counter 16 operates as an interval timer which is cleared in synchronization with the rising edge of the PBCTL signal 1.

またPBCTL信号1の立上り時エッジ検出信号13を出力す
るのでキャプチャレジスタ18はカウント信号40をラッチ
する。
Further, since the rising edge detection signal 13 of the PBCTL signal 1 is output, the capture register 18 latches the count signal 40.

このときカウンタ16をクリアする直前の値をラッチする
ので、キャプチャレジスタ18はPBCTL信号1の周期に等
しい値をラッチする。
At this time, since the value immediately before clearing the counter 16 is latched, the capture register 18 latches a value equal to the cycle of the PBCTL signal 1.

一方、エッジ検出信号13の発生によりCPU2は割込み処理
を開始する。割込み処理においてCPU2はPBCTL信号1の
周期の55%に等しい値をコンペアレジスタ19に書き込
む。具体的にはバスライン22を通してキャプチャ信号41
を読み出し、0.55を乗じて、バスライン22を通してコン
ペアレジスタ19に書き込む。その後割込み処理を終了す
る。
On the other hand, when the edge detection signal 13 is generated, the CPU 2 starts interrupt processing. In the interrupt processing, the CPU 2 writes a value equal to 55% of the cycle of the PBCTL signal 1 in the compare register 19. Specifically, the capture signal 41 is sent through the bus line 22.
Is read, multiplied by 0.55, and written to the compare register 19 through the bus line 22. After that, the interrupt processing ends.

PBCTL信号1の立上りからPBCTL信号1の周期の55%のと
ころでカウント信号40がコンペア信号42と一致するので
コンパレータ20は一致信号21を出力する。このときDラ
ッチ23はPBCTL信号1のレベルをラッチする。従ってデ
ューティ比40%の信号“0"のときはロウレベル、デュー
ティ比70%の信号“1"のときはハイレベルをラッチする
ことになる。CPU2はバスライン22を通してデューティ比
判別信号43を読み込むだけで、デューティ比を判別する
ことができる。デューティ比判別の為に演算をする必要
はない。
Since the count signal 40 coincides with the compare signal 42 at 55% of the cycle of the PBCTL signal 1 from the rise of the PBCTL signal 1, the comparator 20 outputs the coincidence signal 21. At this time, the D latch 23 latches the level of the PBCTL signal 1. Therefore, a low level is latched when the signal having a duty ratio of 40% is "0", and a high level is latched when the signal is "1" having a duty ratio of 70%. The CPU 2 can determine the duty ratio only by reading the duty ratio determination signal 43 through the bus line 22. It is not necessary to perform an operation for judging the duty ratio.

以後同様の処理を繰り返し、信号“0"又は信号“1"を順
次判別する。
Thereafter, similar processing is repeated to sequentially determine the signal “0” or the signal “1”.

上述したデューティ比判別回路はPBCTL信号1の周期が
変動しても正常に動作する。
The duty ratio discrimination circuit described above operates normally even if the cycle of the PBCTL signal 1 changes.

第4図はPBCTL信号1の周期がしだいに小さくなる場合
のタイミングチャートである。本発明では周期の変化に
伴ってデューティ比判別タイミングも変化するので、PB
CTL信号1の周期の大小にかかわりなくデューティ比を
判別することができる。このときたとえば周期2におけ
るデューティ比判別は正確には周期2×0.55のタイミン
グで行う必要があるが、実際には周期1×0.55のタイミ
ングで行うことになる。実用上はVTRのテープ速度が瞬
時に加減速することはないので、しばらくの間、周期1
×0.55のタイミングで判定しても問題ない。第5図はPB
CTL信号1の周期がもとの周期より長い場合(),短
い場合(),デューティ比が不正確な場合()のそ
れぞれにおいて、正しくデューティ比が判別できること
を示している。第5図,に示すように、もとの周期
の0.79倍から1.37倍まではデューティ比の判別が可能で
ある。
FIG. 4 is a timing chart when the cycle of the PBCTL signal 1 becomes gradually smaller. In the present invention, the duty ratio determination timing also changes as the cycle changes, so PB
The duty ratio can be determined regardless of the size of the cycle of the CTL signal 1. At this time, for example, the duty ratio discrimination in the cycle 2 needs to be accurately performed at the timing of the cycle 2 × 0.55, but actually, it is performed at the timing of the cycle 1 × 0.55. In practice, the VTR tape speed does not accelerate or decelerate instantly, so for a while the cycle 1
There is no problem even if it is judged at the timing of × 0.55. Figure 5 shows PB
It shows that the duty ratio can be correctly discriminated when the cycle of the CTL signal 1 is longer than the original cycle (), when it is shorter (), and when the duty ratio is inaccurate (). As shown in FIG. 5, the duty ratio can be determined from 0.79 times to 1.37 times the original cycle.

ここではデューティ比判別タイミングを毎回更新する例
を述べたが、PBCTL信号1の周期変動はゆるやかである
ので、デューティ比判別タイミングの更新処理回数を減
らしてもよい。本発明においてはCPU2の演算を必要とす
るのは判別タイミングの更新処理だけであってデューテ
ィ比判別には演算は不要である。従って判別タイミング
の更新回数を減らせばCPU2の負担が非常に小さくなる。
Here, an example in which the duty ratio determination timing is updated every time has been described, but since the cycle variation of the PBCTL signal 1 is gentle, the number of times the duty ratio determination timing is updated may be reduced. In the present invention, the calculation of the CPU 2 is required only for the update process of the determination timing, and the calculation is not necessary for the duty ratio determination. Therefore, if the number of times of updating the determination timing is reduced, the load on the CPU 2 becomes very small.

また信号“0",“1"のデューティ比が本例と異る場合に
も、コンペアレジスタ19に書き込む値を変更することに
より対応できる。たとえばテープの逆転(巻戻し)時に
は、信号“0"のデューティ比は60%、信号“1"のデュー
ティ比は30%になる。このときは60%と30%の中間の値
である45%をコンペアレジスタ19に書き込めばよい。
Further, even when the duty ratios of the signals “0” and “1” are different from those in this example, it is possible to deal with the situation by changing the value written in the compare register 19. For example, when the tape is reversed (rewound), the duty ratio of the signal "0" is 60% and the duty ratio of the signal "1" is 30%. At this time, 45%, which is an intermediate value between 60% and 30%, may be written in the compare register 19.

以上説明したように本発明のデューティ比判別回路は、
入力パルス信号の周期に応じて判定タイミングを変化さ
せるため、入力パルス信号の周期が変動してもデューテ
ィ比を判別することができる。また入力パルスのレベル
をラッチすることによりデューティ比を判別するので、
デューティ比判別のための演算が不要で、ソフトウェア
の負担が小さいという利点がある。
As described above, the duty ratio discrimination circuit of the present invention is
Since the determination timing is changed according to the cycle of the input pulse signal, the duty ratio can be determined even if the cycle of the input pulse signal changes. Since the duty ratio is determined by latching the level of the input pulse,
There is an advantage that the calculation for the duty ratio determination is unnecessary and the load on the software is small.

さらに入力パルス信号のデューティ比を変更したときも
プログラムで対応できる利点もある。
Further, there is an advantage that even when the duty ratio of the input pulse signal is changed, it can be dealt with by the program.

第6図は本発明の他の実施例のブロック図である。シフ
トレジスタ32,デューティ比判別信号44以外の構成・動
作は実施例1と同じであるから説明を省略する。
FIG. 6 is a block diagram of another embodiment of the present invention. The configurations and operations other than the shift register 32 and the duty ratio discrimination signal 44 are the same as those in the first embodiment, and thus the description thereof will be omitted.

シフトレジスタ32はPBCTL信号1と一致信号21を入力と
し、一致信号21入力時のPBCTL信号1のレベルを最下位
ビットに取り込む8ビットのシフトレジスタである。CP
U2がシフトレジスタ32の読み出し処理を実行するとき、
シフトレジスタ32の保持データをデューティ比判別信号
として出力する。
The shift register 32 is an 8-bit shift register which receives the PBCTL signal 1 and the coincidence signal 21 and takes in the level of the PBCTL signal 1 when the coincidence signal 21 is input to the least significant bit. CP
When U2 executes the read process of the shift register 32,
The data held in the shift register 32 is output as a duty ratio discrimination signal.

次に動作を説明する。デューティ比判別動作と判定タイ
ミング更新処理は実施例1と同一であるから説明を省略
する。本実施例においてはデューティ比の判別結果をD
ラッチではなく8ビットシフトレジスタ32にとりこむ。
従ってデューティ比判別信号44を毎回CPU2に読み込む必
要はなく、8周期に1回読み込めばよい。インデクス信
号は信号“0"と信号“1"を組合せたコードで表現するの
で、8周期ごとにしか読まないことによってインデクス
信号を検出し損ねることはない。インデクス信号のコー
ドが10100101である場合の例を第7図に示す。
Next, the operation will be described. The duty ratio determining operation and the determination timing updating process are the same as those in the first embodiment, and thus the description thereof will be omitted. In this embodiment, the determination result of the duty ratio is D
Put in 8-bit shift register 32 instead of latch.
Therefore, it is not necessary to read the duty ratio discrimination signal 44 into the CPU 2 every time, and it is sufficient to read it once every eight cycles. Since the index signal is expressed by a code that combines the signal "0" and the signal "1", the index signal is not missed by being read only every eight cycles. An example in which the code of the index signal is 10100101 is shown in FIG.

本実施例においてはデューティ比判別結果をシフトレジ
スタにとりこむようにしたことによって、判別結果を読
み込むソフトウェア処理を少くすることができる。
In the present embodiment, by incorporating the duty ratio discrimination result in the shift register, the software processing for reading the discrimination result can be reduced.

〔発明の効果〕〔The invention's effect〕

以上説明したように本発明はパルス信号の周期に応じた
判定タイミングでパルス信号のレベルをラッチすること
によりデューティ比を判別する。従ってパルス信号の周
期が変化してもデューティ比を判別することができる効
果がある。またデューティ比判別のためにソフトウェア
処理を必要としないという効果もある。
As described above, the present invention determines the duty ratio by latching the level of the pulse signal at the determination timing according to the cycle of the pulse signal. Therefore, there is an effect that the duty ratio can be determined even if the cycle of the pulse signal changes. In addition, there is an effect that software processing is not required for determining the duty ratio.

さらにデューティ比は変更した場合もプログラムで対応
できるため、テープの逆転などのときもデューティ比を
判別できる効果がある。
Further, even if the duty ratio is changed, it can be dealt with by the program, so that the duty ratio can be discriminated even when the tape is reversed.

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

第1図は本発明の一実施例のブロック図、第2図は本実
施例のデューティ比判別原理図、第3図は本実施例の動
作タイミングチャート、第4図は本実施例において入力
パルス信号の周期が変化する場合の動作タイミングチャ
ート、第5図は本実施例において入力パルス信号の周期
が変化する場合のデューティ比判定を示す図、第6図は
本発明の他の実施例のブロック図、第7図は本発明の第
6図実施例におけるデューティ比判別結果保持を示す
図、第8図はパルス信号によるデータ例を示す図、第9
図は従来例のブロック図、第10図は従来例の動作タイミ
ングチャートである。 1……PBCTL信号、2……CPU、12……立上りエッジ検出
回路、13……エッジ検出信号、14……ディレイ回路、15
……クリア手段、16……カウンタ、17……クロック信
号、18……キャプチャレジスタ、19……コンペアレジス
タ、20……コンパレータ、21……一致信号、22……バス
ライン、23……Dラッチ、32……シフトレジスタ、40…
…カウント値、41……キャプチャ値、42……コンペア
値、43……デューティ比判別値、44……デューティ比判
別値、102……両エッジ検出回路、105……カウンタ、10
6……クロック信号、107……キャプチャレジスタ、108
……バスライン、109……CPU、110……エッジ検出信
号、120……カウント値、121……キャプチャ値。
FIG. 1 is a block diagram of an embodiment of the present invention, FIG. 2 is a principle diagram of duty ratio discrimination of this embodiment, FIG. 3 is an operation timing chart of this embodiment, and FIG. 4 is an input pulse in this embodiment. 5 is an operation timing chart when the signal cycle changes, FIG. 5 is a diagram showing duty ratio determination when the input pulse signal cycle changes in this embodiment, and FIG. 6 is a block of another embodiment of the present invention. FIG. 7 is a diagram showing the holding of the duty ratio discrimination result in the embodiment of FIG. 6 of the present invention, FIG. 8 is a diagram showing an example of data by pulse signals, and FIG.
FIG. 10 is a block diagram of a conventional example, and FIG. 10 is an operation timing chart of the conventional example. 1 ... PBCTL signal, 2 ... CPU, 12 ... rising edge detection circuit, 13 ... edge detection signal, 14 ... delay circuit, 15
…… Clearing means, 16 …… Counter, 17 …… Clock signal, 18 …… Capture register, 19 …… Compare register, 20 …… Comparator, 21 …… Match signal, 22 …… Bus line, 23 …… D latch , 32 …… shift register, 40…
… Count value, 41 …… Capture value, 42 …… Compare value, 43 …… Duty ratio judgment value, 44 …… Duty ratio judgment value, 102 …… Both edge detection circuit, 105 …… Counter, 10
6 ... Clock signal, 107 ... Capture register, 108
... bus line, 109 ... CPU, 110 ... edge detection signal, 120 ... count value, 121 ... capture value.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】所定のクロックをカウントするカウンタ
と、入力パルスのエッジで前記カウンタの値をラッチす
るキャプチャレジスタと、キャプチャ後に前記カウンタ
の値をクリアするクリア手段と、比較値を記憶するコン
ペアレジスタと、前記カウンタと前記コンペアレジスタ
の値を比較して一致した時に一致信号を出力するコンパ
レータと、前記一致信号が発生した時の前記入力パルス
のレベルを記憶する記憶回路と、前記キャプチャレジス
タの値を読み取り所定の演算を行い前記コンペアレジス
タに比較値を設定する演算回路とを有するデューティ比
判別回路。
1. A counter for counting a predetermined clock, a capture register for latching the value of the counter at the edge of an input pulse, clear means for clearing the value of the counter after capture, and a compare register for storing a comparison value. A comparator that outputs a match signal when the values of the counter and the compare register are compared and matches, a storage circuit that stores the level of the input pulse when the match signal occurs, and a value of the capture register And an arithmetic circuit for reading a predetermined value and performing a predetermined arithmetic operation to set a comparison value in the compare register.
JP63237017A 1988-09-20 1988-09-20 Duty ratio discrimination circuit Expired - Fee Related JPH0748647B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63237017A JPH0748647B2 (en) 1988-09-20 1988-09-20 Duty ratio discrimination circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63237017A JPH0748647B2 (en) 1988-09-20 1988-09-20 Duty ratio discrimination circuit

Publications (2)

Publication Number Publication Date
JPH0284812A JPH0284812A (en) 1990-03-26
JPH0748647B2 true JPH0748647B2 (en) 1995-05-24

Family

ID=17009154

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63237017A Expired - Fee Related JPH0748647B2 (en) 1988-09-20 1988-09-20 Duty ratio discrimination circuit

Country Status (1)

Country Link
JP (1) JPH0748647B2 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2271232B (en) * 1992-10-03 1997-05-07 Motorola Inc Pulse generation/sensing arrangement for use in a microprocessor system
JP3333248B2 (en) * 1992-11-10 2002-10-15 株式会社東芝 Duty detection circuit
US5444403A (en) * 1992-12-22 1995-08-22 Kabushiki Kaisha Toshiba Duty discriminating circuit
WO2008004322A1 (en) 2006-07-07 2008-01-10 Panasonic Corporation Brushless motor drive circuit and motor having the same
CN101582732B (en) * 2009-06-10 2012-07-04 中兴通讯股份有限公司 Clock detection method and device
JP7190300B2 (en) * 2017-11-29 2022-12-15 キヤノン株式会社 Data carrier device, replacement unit for image forming device, and communication system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6326144A (en) * 1986-07-18 1988-02-03 Fujitsu Ten Ltd Digital delay detection circuit
JPS63187913A (en) * 1987-01-30 1988-08-03 Mitsubishi Electric Corp Pulse duty detecting circuit

Also Published As

Publication number Publication date
JPH0284812A (en) 1990-03-26

Similar Documents

Publication Publication Date Title
EP0166023B1 (en) Method and system for data compression and restoration
US5535362A (en) Data transfer control apparatus wherein a time value is compared to a clocked timer value with a comparison of the values causing the transfer of bus use right
JPH0635993B2 (en) Data acquisition device
EP0350929B1 (en) Variable length data processing apparatus
JPS61125641A (en) Data compression control system
US5289517A (en) Digital pulse processing device
JPH0284812A (en) Duty factor discrimination circuit
JP2600598B2 (en) Pulse width judgment circuit
JP3076044B2 (en) Error information storage method for pipeline
EP0111251B1 (en) Data transmission system
JP2789900B2 (en) State history storage device
JP2789737B2 (en) Time-varying data sampling device and sampling data reproduction method
JPS5919375B2 (en) Data buffer control method
JPS63200234A (en) Data processor
JP3068317B2 (en) Microcomputer
JPH04287241A (en) History information storage device
EP0603851A2 (en) Duty discriminating circuit
JP2804406B2 (en) Pulse measuring device
JP2892375B2 (en) Pulse input device
SU1285458A1 (en) Information input device
JP2641066B2 (en) Counter device
JP2001060162A (en) In-circuit emulator
JP2953936B2 (en) Duty discrimination circuit
JP2000165369A (en) Method for detecting forward backward protection stage number, its system, and recoding medium recording detection method of forward, backward protection stage number
JPS6125167B2 (en)

Legal Events

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