[go: up one dir, main page]

JP2961750B2 - Microcomputer - Google Patents

Microcomputer

Info

Publication number
JP2961750B2
JP2961750B2 JP1141955A JP14195589A JP2961750B2 JP 2961750 B2 JP2961750 B2 JP 2961750B2 JP 1141955 A JP1141955 A JP 1141955A JP 14195589 A JP14195589 A JP 14195589A JP 2961750 B2 JP2961750 B2 JP 2961750B2
Authority
JP
Japan
Prior art keywords
signal
clock
circuit
input
output
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
JP1141955A
Other languages
Japanese (ja)
Other versions
JPH036677A (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
Nippon Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Electric Co Ltd filed Critical Nippon Electric Co Ltd
Priority to JP1141955A priority Critical patent/JP2961750B2/en
Publication of JPH036677A publication Critical patent/JPH036677A/en
Application granted granted Critical
Publication of JP2961750B2 publication Critical patent/JP2961750B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Microcomputers (AREA)

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明は、赤外線を用いたリモートコントロール(以
下、リモコンという)装置等に用いられるパルス幅判定
回路を内蔵したマイクロコンピュータに関する。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a microcomputer having a built-in pulse width determination circuit used in a remote control device (hereinafter, referred to as a remote control) using infrared rays.

[従来の技術] リモコン信号パルスのパルス幅は、従来、次のように
判定されたいた。
[Prior Art] The pulse width of a remote control signal pulse has conventionally been determined as follows.

赤外線で送信されてきたリモコン信号は、赤外線セン
サで電気信号に変換された後、波形整形されて長短2つ
のパルス幅を有するパルス信号としてマイクロコンピュ
ータに入力される。マイクロコンピュータはこのパルス
信号を受けて、エッジ検出回路で立上り、立下りエッジ
を検出する。別に、一定周波数のクロックでカウントを
行うカウンタを設けておき、立上りのエッジを検出した
ときのカウント値をキャプチャレジスタに取り込んだ
後、これをメモリに格納する。次に、立下りのエッジを
検出した時点のカウント値をキャプチャレジスタに取り
込み、このカウント値とメモリ内に格納してある立上り
エッジにおけるカウント値とを比較して、受信したパル
スのパルス幅の長、短を判定する。判定結果に基づきパ
ルス幅の長、短に応じて判定値“1"、“0"をメモリに格
納する。同様の動作を経て一連のパルスのパルス幅の判
定結果がメモリ内に納められる。以上の処理は、マイク
ロコンピュータにリモコン信号が入力されたときにソフ
トの割り込みを行うことによってなされる。
The remote control signal transmitted by infrared light is converted into an electric signal by an infrared sensor, and then subjected to waveform shaping and input to the microcomputer as a pulse signal having two long and short pulse widths. The microcomputer receives the pulse signal and detects a rising edge and a falling edge by an edge detection circuit. Separately, a counter that counts with a clock of a constant frequency is provided, and a count value when a rising edge is detected is taken into a capture register and then stored in a memory. Next, the count value at the time when the falling edge is detected is taken into the capture register, and this count value is compared with the count value at the rising edge stored in the memory to determine the length of the pulse width of the received pulse. , Judge short. Based on the determination result, the determination values “1” and “0” are stored in the memory in accordance with the length and shortness of the pulse width. Through the same operation, the determination result of the pulse width of the series of pulses is stored in the memory. The above processing is performed by performing a software interrupt when a remote control signal is input to the microcomputer.

[発明が解決しようとする課題] 上述した従来のパルス幅判定システムは、パルス幅を
測定する度に、ソフトの割り込み処理として、カウント
値をキャプチャしこのキャプチャ値をメモリ内へ格納
し、次のキャプチャ値を得て前回のキャプチャ値との差
をとり、この差と基準値との比較により、メモリに判定
値“1"あるいは“0"を格納するようになっているので、
ソフト上の時間がかかり、その間他のソフトによる仕事
ができないという欠点がある。
[Problem to be Solved by the Invention] Each time the pulse width is measured, the conventional pulse width determination system described above captures a count value as software interrupt processing, stores the captured value in a memory, and By obtaining the capture value, taking the difference from the previous capture value, and comparing this difference with the reference value, the judgment value “1” or “0” is stored in the memory.
There is a drawback that it takes time on software and during that time you cannot work with other software.

[課題を解決するための手段] 本発明によるマイクロコンピュータは、パルス幅判定
回路を内蔵しており、この判定回路による判定値を、従
来のクロック同期式シリアルインターフェース回路で用
いられるシフトレジスタに格納するように構成される。
[Means for Solving the Problems] A microcomputer according to the present invention has a built-in pulse width determination circuit, and stores a determination value of this determination circuit in a shift register used in a conventional clock synchronous serial interface circuit. It is configured as follows.

[実施例] 次に、本発明の実施例について図面を参照して説明す
る。
Example Next, an example of the present invention will be described with reference to the drawings.

第1図は、本発明の実施例のパルス幅判定回路とシフ
トレジスタ部分を示すブロック図である。同図におい
て、▲▼はシリアルクロック入力端子であって、
この端子にはリモコン信号受信時にパルス幅変調された
パルス信号が入力される。セレクタ3は、このパルス信
号を受け入れ、ノイズ除去回路4を通すか否かの決定に
従って、いずれかのラインにこの信号を送出する。パル
ス信号はカウントクロック制御回路13に入力される外、
立上りエッジ検出回路10および立下りエッジ検出回路5
に入力される。カウントクロック制御回路13は、シリア
ルクロック入力端子からのパルスを受け、ビット数8の
シフトレジスタ12への駆動パルスを出力する。立上りエ
ッジ検出回路10の出力は、第1のフリップフロップ11の
リセット端子に入力され、また、立下りエッジ検出回路
5の出力は第2のフリップフロップ2のクロック入力端
子に入力されるとともにカウンタ6に入力されこのカウ
ンタのカウント値を0にクリアする。カウント6はカウ
ントクロック回路7の出力クロックをカウントし、この
カウント値は比較回路9において比較用レジスタ8の設
定値と比較される。比較回路9の出力は第1のフリップ
フロップ11のセット端子に入力される。第1のフリップ
フロップ11の出力Q1は、第2のフリップフロップ2のデ
ータ入力端子に入力され、第2のフリップフロップ2の
出力Q2はセレクタ1に入力される。セレクタ1はシリア
ルイン端子SIの入力信号と第2のフリップフロップ2の
出力信号のうち一方を選択してシフトレジスタ12に入力
する回路である。シフトレジスタ12の出力はシリアルア
ウト端子SOを介して外部とり出すことができる。
FIG. 1 is a block diagram showing a pulse width determination circuit and a shift register according to an embodiment of the present invention. In the figure, ▲ ▼ is a serial clock input terminal,
A pulse signal that has been subjected to pulse width modulation when a remote control signal is received is input to this terminal. The selector 3 accepts the pulse signal and sends the signal to any one of the lines in accordance with the decision as to whether or not to pass the signal through the noise removal circuit 4. The pulse signal is input to the count clock control circuit 13,
Rising edge detection circuit 10 and falling edge detection circuit 5
Is input to The count clock control circuit 13 receives a pulse from the serial clock input terminal and outputs a drive pulse to the shift register 12 having 8 bits. The output of the rising edge detection circuit 10 is input to the reset terminal of the first flip-flop 11, the output of the falling edge detection circuit 5 is input to the clock input terminal of the second flip-flop 2, and the counter 6 And the count value of this counter is cleared to 0. The count 6 counts the output clock of the count clock circuit 7, and the count value is compared with the set value of the comparison register 8 in the comparison circuit 9. The output of the comparison circuit 9 is input to the set terminal of the first flip-flop 11. The output Q1 of the first flip-flop 11 is input to the data input terminal of the second flip-flop 2, and the output Q2 of the second flip-flop 2 is input to the selector 1. The selector 1 is a circuit that selects one of the input signal of the serial-in terminal SI and the output signal of the second flip-flop 2 and inputs the selected signal to the shift register 12. The output of the shift register 12 can be taken out through the serial out terminal SO.

次に、各部のタイミングチャートである第2図を参照
して、第1図の回路の動作を説明する。まず、セレクタ
1をフリップフロップ2の出力、およびセレクタ3をノ
イズ除去回路4に選択する。シリアルクロック入力端子
▲▼に、第2図に示すような、周期2T(この場合
の論理値を“0"とする)と周期4T(この場合の論理値を
“1"とする)のパルスからなるリモコン信号が入力さ
れ、この信号は、セレクタ3を介してノイズ除去回路4
に入力される。ノイズ除去回路4は、一定のサンプリン
グクロックで信号をサンプリングしn回以上レベルが同
じだとそのレベルを出力し、n回未満だと前のレベルを
保持する。立下りエッジ検出回路5は、リモコン信号の
立下りエッジを検出すると、カウンタ6のカウント値を
クリアする。カウンタ6は、カウントクロック回路7か
ら供給されるクロックで新たに0からカウントし始め
る。比較用レジスタ8には、リモコン信号の“0"値の周
期2Tと、“1"値の周期4Tとの中間値3Tが入力されてい
る。次の立下りエッジまでの周期が“0"値の2Tの場合
は、比較回路9から一致信号は出力されない。第1のフ
リップフロップ11は、立上りエッジ検出回路10から出力
されるリモコン信号の立上りエッジにより、リセットさ
れその出力を0に保持する。
Next, the operation of the circuit of FIG. 1 will be described with reference to FIG. 2, which is a timing chart of each unit. First, the selector 1 selects the output of the flip-flop 2 and the selector 3 selects the noise removal circuit 4. As shown in FIG. 2, the serial clock input terminal ▲ ▼ receives a pulse having a period 2T (the logical value in this case is “0”) and a pulse having a period 4T (the logical value in this case is “1”). Remote controller signal is input to the noise reduction circuit 4 via the selector 3.
Is input to The noise elimination circuit 4 samples the signal with a constant sampling clock and outputs the level when the level is the same n times or more, and holds the previous level when the level is less than n times. When the falling edge detection circuit 5 detects the falling edge of the remote control signal, it clears the count value of the counter 6. The counter 6 starts counting from 0 newly with the clock supplied from the count clock circuit 7. The comparison register 8 receives an intermediate value 3T between a “2” cycle of “0” value and a 4T cycle of “1” value of the remote control signal. When the cycle until the next falling edge is 2T of “0” value, no match signal is output from the comparison circuit 9. The first flip-flop 11 is reset by the rising edge of the remote control signal output from the rising edge detection circuit 10 and holds its output at 0.

次の立下りエッジまでの周期が“1"値の4Tの場合は、
比較回路9から一致信号が出力され、第1のフリップフ
ロップ11をセットする。フリップフロップ11は、その次
の立上りエッジ信号が来るまでの間、その出力Q1を第2
図に示すように“1"に保持する。第1のフリップフロッ
プ11の出力Q1は、第2のフリップフロップ2の入力にな
り、リモコン信号の立下りエッジ時に第2のフリップフ
ロップ2はこれをラッチし、第2図に示すようにこれを
出力Q2として出力する。この第2のフリップフロップ2
の出力Q2は、セレクタ1を介してシフトレジスタ12に入
力される。リモコン信号受信時には、カウントクロック
制御回路13は、リモコン信号を受け入れこれによってシ
フトレジスタ12を駆動する。即ち、出力Q2は、リモコン
信号の立上りエッジでシフトレジスタにラッチされ、ま
た、立上りエッジの度に右へシフトされる。このように
して、リモコン信号が、第2図に示すように、011010の
とき、シフトレジスタ12の値は、0011010となり、最初
の0の値を除けば、パルス幅の長短で入って来たリモコ
ン信号は、ディジタル値“0"、“1"に完全に変換され
る。シフトレジスタに8ビットのデータが入力される
と、カウントクロック制御回路13はCPUに制御パルスを
発して割り込み要求を行う。
If the cycle until the next falling edge is 4T with a “1” value,
The match signal is output from the comparison circuit 9 and the first flip-flop 11 is set. The flip-flop 11 outputs its output Q1 until the next rising edge signal comes.
It is held at "1" as shown in the figure. The output Q1 of the first flip-flop 11 becomes the input of the second flip-flop 2, and at the falling edge of the remote control signal, the second flip-flop 2 latches this, and as shown in FIG. Output as output Q2. This second flip-flop 2
Is input to the shift register 12 via the selector 1. When receiving the remote control signal, the count clock control circuit 13 drives the shift register 12 by receiving the remote control signal. That is, the output Q2 is latched in the shift register at the rising edge of the remote control signal, and is shifted to the right at each rising edge. In this way, when the remote control signal is 011010 as shown in FIG. 2, the value of the shift register 12 becomes 0011010. The signal is completely converted to digital values "0" and "1". When 8-bit data is input to the shift register, the count clock control circuit 13 issues a control pulse to the CPU and issues an interrupt request.

また、立下りエッジから次のエッジまでの周期が4T以
上に長い場合はカウンタ6からオーバーフロー信号OVF
が出力され、入力信号がリモコン信号でないことが判定
される。
When the period from the falling edge to the next edge is longer than 4T, the counter 6 outputs the overflow signal OVF.
Is output, and it is determined that the input signal is not a remote control signal.

なお、この回路が通常のクロック同期式シリアルイン
ターフェース回路として用いられるときには、シリアル
クロック入力端子▲▼にはシリアルクロックが入
力されシリアルイン端子SIに入力されたシリアル入力信
号は、シリアルクロックによってシフトレジスタ12に取
り込まれた後、シリアルアウト端子SOから出力される。
When this circuit is used as a normal clock synchronous serial interface circuit, the serial clock is input to the serial clock input terminal ▲ ▼, and the serial input signal input to the serial in terminal SI is shifted by the serial clock to the shift register 12. Is output from the serial out terminal SO.

[発明の効果] 以上説明したように、本発明によるマイクロコンピュ
ータは、パルス入力からパルス幅の判定、判定値のシフ
トレジスタへの格納までのソフトの介在なしに全てハー
ド上で行なうことができるので、パルス幅判定中であっ
ても、ソフトによる仕事を自由に遂行することができ
る。
[Effects of the Invention] As described above, the microcomputer according to the present invention can perform all processes from pulse input to determination of pulse width and storage of the determination value in the shift register on hardware without software. Even when the pulse width is being determined, the software work can be freely performed.

また、パルス幅の判定を行わないときは、クロック同
期式シリアルインターフェースとして動作させることが
できるようにしてあるので、パルス幅を判定するために
付加する回路を最小限に済ますことができる。
When the pulse width is not determined, the circuit can be operated as a clock synchronous serial interface, so that a circuit added for determining the pulse width can be minimized.

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

第1図は、本発明の一実施例のブロック図、第2図は、
第1図の各部の信号波形を示すタイミングチャートであ
る。 1……セレクタ、2……第2のフリップフロップ、3…
…セレクタ、4……ノイズ除去回路、5……立下りエッ
ジ検出回路、6……カウンタ、7……カウントクロック
回路、8……比較用レジスタ、9……比較回路、10……
立上りエッジ検出回路、11……第1のフリップフロッ
プ、12……シフトレジスタ、13……カウントクロック制
御回路、▲▼……シリアルクロック入力端子、SI
……シリアルイン端子、SO……シリアルアウト端子。
FIG. 1 is a block diagram of one embodiment of the present invention, and FIG.
FIG. 2 is a timing chart showing signal waveforms at various parts in FIG. 1 ... selector, 2 ... second flip-flop, 3 ...
... selector, 4 ... noise removal circuit, 5 ... falling edge detection circuit, 6 ... counter, 7 ... count clock circuit, 8 ... comparison register, 9 ... comparison circuit, 10 ...
Rising edge detection circuit, 11 first flip-flop, 12 shift register, 13 count clock control circuit, ▲ ▼ serial clock input terminal, SI
…… Serial in terminal, SO …… Serial out terminal.

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】シリアルクロックまたはパルス幅変調がな
されたパルス信号が入力されるシリアルクロック入力端
子と、前記パルス信号をディジタル信号に変換するパル
ス幅判定回路と、シリアルクロック入力端子からの信号
を受けクロックを出力するカウントクロック制御回路
と、シリアル入力信号と前記パルス幅判定回路の出力と
が入力されそれらの信号のうちいずれかを選択して出力
するセレクタと、前記カウントクロック制御回路の出力
するクロックによって前記セレクタの出力信号を取り込
むシフトレジスタとを具備するマイクロコンピュータ。
A serial clock input terminal to which a serial clock or a pulse signal subjected to pulse width modulation is input, a pulse width determination circuit for converting the pulse signal into a digital signal, and a signal from the serial clock input terminal. A count clock control circuit that outputs a clock, a selector that receives a serial input signal and an output of the pulse width determination circuit, selects and outputs any of the signals, and a clock that the count clock control circuit outputs And a shift register for receiving an output signal of the selector.
JP1141955A 1989-06-02 1989-06-02 Microcomputer Expired - Fee Related JP2961750B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1141955A JP2961750B2 (en) 1989-06-02 1989-06-02 Microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1141955A JP2961750B2 (en) 1989-06-02 1989-06-02 Microcomputer

Publications (2)

Publication Number Publication Date
JPH036677A JPH036677A (en) 1991-01-14
JP2961750B2 true JP2961750B2 (en) 1999-10-12

Family

ID=15304017

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1141955A Expired - Fee Related JP2961750B2 (en) 1989-06-02 1989-06-02 Microcomputer

Country Status (1)

Country Link
JP (1) JP2961750B2 (en)

Also Published As

Publication number Publication date
JPH036677A (en) 1991-01-14

Similar Documents

Publication Publication Date Title
JPH0686093A (en) Apparatus for detection of odd-numbered/ even-numbered field of image signal
JP2961750B2 (en) Microcomputer
JP2702773B2 (en) Data monitoring device
KR890004415B1 (en) Received data processing method of infrared signal
JP4320414B2 (en) Code determination apparatus, method thereof, and program
SU1631509A1 (en) Multicycle recirculating time-to-number converter
US5278718A (en) Circuit for generating a disk change signal
JPH0745786Y2 (en) Full level detection circuit
KR940008661B1 (en) Data slicer for caption image device
JP2598902B2 (en) Synchronous signal noise eliminator
JPH04354220A (en) Start bit detection circuit
JPH0338786B2 (en)
JPH07212413A (en) Asynchronous data receiving circuit
JP2824080B2 (en) Period measurement circuit
JP2580756B2 (en) Noise removal circuit for laser scanning light detection signal
JPS58182352A (en) Digital data reception circuit
JP2923979B2 (en) Frequency detection circuit
JP3102830B2 (en) Measurement data output method and measurement data output circuit
JPH0262138A (en) Data fetching circuit
KR960010912B1 (en) Asic circuit for digital clock loss detection
JPH04336724A (en) Serial receiver
KR940009815B1 (en) Frequency detecting apparatus and method using directport of microcomputer
JPH01314451A (en) Phase jitter detecting circuit
JPS6229965Y2 (en)
JPH0721838B2 (en) Measuring device

Legal Events

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