JP2509464Y2 - D / A conversion circuit - Google Patents

D / A conversion circuit

Info

Publication number
JP2509464Y2
JP2509464Y2 JP1986194750U JP19475086U JP2509464Y2 JP 2509464 Y2 JP2509464 Y2 JP 2509464Y2 JP 1986194750 U JP1986194750 U JP 1986194750U JP 19475086 U JP19475086 U JP 19475086U JP 2509464 Y2 JP2509464 Y2 JP 2509464Y2
Authority
JP
Japan
Prior art keywords
shift register
data
shift
output
circuit
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 - Lifetime
Application number
JP1986194750U
Other languages
Japanese (ja)
Other versions
JPS6399434U (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.)
Sanyo Electric Co Ltd
Original Assignee
Sanyo 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 Sanyo Electric Co Ltd filed Critical Sanyo Electric Co Ltd
Priority to JP1986194750U priority Critical patent/JP2509464Y2/en
Publication of JPS6399434U publication Critical patent/JPS6399434U/ja
Application granted granted Critical
Publication of JP2509464Y2 publication Critical patent/JP2509464Y2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Analogue/Digital Conversion (AREA)

Description

【考案の詳細な説明】 (イ)産業上の利用分野 本考案は、D/A変換回路に関し、特に、ワンチップマ
イクロコンピュータ(以下マイコンと言う)に内蔵され
る簡易型のD/A変換回路に関する。
[Detailed Description of the Invention] (a) Field of Industrial Application The present invention relates to a D / A conversion circuit, and in particular, a simple D / A conversion circuit incorporated in a one-chip microcomputer (hereinafter referred to as a microcomputer). Regarding

(ロ)従来の技術 近年マイコンの高機能化が進み、ワンチップ内にシリ
アルI/O回路、A/D変換回路、あるいは、D/A変換回路が
設けられるに至った。
(B) Conventional technology In recent years, as microcomputers have become more sophisticated, serial I / O circuits, A / D conversion circuits, or D / A conversion circuits have been installed in one chip.

従来、マイコンに内蔵されるD/A変換回路は、一般的
なR−2R型のラダー抵抗回路網を用いている。R−2R型
のラダー抵抗回路網は、特開昭60-105323号公報に示さ
れる如く、2Rの抵抗の一端にディジタルデータの各ビッ
トに対応するインバータの出力を接続したものである。
Conventionally, a general R-2R type ladder resistor network is used for a D / A conversion circuit built in a microcomputer. The R-2R type ladder resistor network is constructed by connecting the output of an inverter corresponding to each bit of digital data to one end of a 2R resistor, as disclosed in Japanese Patent Laid-Open No. 60-105323.

一方、特開昭60-51028号公報に示される如く、ディジ
タルデータに応じたデューティのパルスを積分すること
によってアナログ信号を得るPWM型のD/A変換回路も考え
られる。
On the other hand, as disclosed in Japanese Patent Laid-Open No. 60-51028, a PWM type D / A conversion circuit for obtaining an analog signal by integrating a pulse having a duty corresponding to digital data is also conceivable.

(ハ)考案が解決しようとする問題点 しかしながら、R−2R型のラダー抵抗回路網を用いた
D/A変換回路あるいはPWM型のD/A変換回路をマイコンに
内蔵するためには、その構成素子数が増大し、チップ面
積を大きくせざるを得ない。
(C) Problems to be solved by the invention However, the R-2R type ladder resistor network was used.
In order to incorporate a D / A conversion circuit or a PWM type D / A conversion circuit in a microcomputer, the number of constituent elements increases and the chip area must be increased.

また、D/A変換にそれほどの精度を必要としない場合
には、従来のD/A変換回路を内蔵したマイクロコンピュ
ータを使用することは不経済である。
In addition, it is uneconomical to use a conventional microcomputer having a built-in D / A conversion circuit when the D / A conversion does not require such high precision.

(ニ)問題点を解決するための手段 本考案は上述した点に鑑みて創作されたものであり、
データバスにパラレル入力が接続されたシフトレジスタ
と、動作の開始を指示する制御信号により、前記シフト
レジスタのシフト動作を制御するシフトクロックをシフ
トレジスタの段数と等しい数だけ計数し、前記シフトク
ロックの印加を停止すると共にシフトレジスタのシフト
動作終了を示す終了信号を出力するシフトレジスタ制御
手段と、前記シフトレジスタから送出されるデータが印
加された積分回路と、前記データバスと接続され、前記
終了信号に基いて前記シフトレジスタに所定データをプ
リセットするデータ設定手段とを備えることにより、構
成素子数が少なく簡単なD/A変換回路が得られる。
(D) Means for solving the problems The present invention was created in view of the above points,
A shift register having a parallel input connected to the data bus and a control signal for instructing the start of the operation count the number of shift clocks for controlling the shift operation of the shift register by the number equal to the number of stages of the shift register. Shift register control means for stopping the application and outputting an end signal indicating the end of the shift operation of the shift register, an integrating circuit to which the data sent from the shift register is applied, the data bus, and the end signal By providing the shift register with data setting means for presetting predetermined data based on the above, a simple D / A conversion circuit with a small number of constituent elements can be obtained.

(ホ)作用 上述の手段によれば、シフトレジスタ及びシフトレジ
スタ制御手段は、マイコンに内蔵されたシリアル入出力
回路を使用することが可能となり、シフトレジスタにデ
ータをプリセットするデータ設定手段を設け、所定デー
タをシフトレジスタにプリセットしてシリアル出力動作
を行うことにより、そのデータが印加された積分回路に
よってアナログ信号が得られるのである。
(E) Operation According to the above means, the shift register and the shift register control means can use the serial input / output circuit built in the microcomputer, and the shift register is provided with the data setting means for presetting data. By presetting predetermined data in the shift register and performing a serial output operation, an analog signal is obtained by the integrating circuit to which the data is applied.

(ヘ)実施例 第1図は本考案の実施例を示すブロック図である。図
に於いて、(1)は4ビットのデータバス、(2)はシ
フトレジスタ、(3)はD−FF、(4)は出力バッフ
ァ、(5)は入力バッファ、(6)はシフト制御回路、
(7)は積分回路、(8)はデータ設定手段である。シ
フトレジスタ(2)は4ビットで構成され、そのパラレ
ル入力の各ビットはデータバス(1)に接続される。シ
フトレジスタ(2)の出力は、データをシフトクロック
SCLの半周期分遅延させるためのD−FF(3)に印加さ
れ、D−FF(3)の出力が出力バッファ(4)を介して
シリアル出力端子(9)からシリアルに出力される。ま
た、シフトレジスタ(2)のデータ入力Dには、シリア
ル入力端子(10)から入力バッファ(5)を介してデー
タが印加される。シフトレジスタ(2)のシフト動作
は、シフト制御回路から印加されるシフトクロックSCL
によって制御され、D−FF(3)の動作は、インバータ
(11)によって反転されたシフトクロック▲▼に
よって制御される。シフト制御回路(6)は、シフト動
作の開始を指示するスタート信号STARTがリセット入力
に印加されたカウンタ(12)及びR−SFF(13)と、シ
フトクロックSCLを出力するANDゲート(14)から構成さ
れる。カウンタ(12)はシフトクロックSCLをシフトレ
ジスタ(2)の構成段数と等しい数、即ち「4」個計数
するカウンタであり、出力はR−SFF(13)のセット入
力Sに接続される。ANDゲート(14)は、R−SFF(13)
の出力によって制御され、タイミングパルスIPをシフ
トクロックSCLとして出力する。
(F) Embodiment FIG. 1 is a block diagram showing an embodiment of the present invention. In the figure, (1) is a 4-bit data bus, (2) is a shift register, (3) is D-FF, (4) is an output buffer, (5) is an input buffer, and (6) is shift control. circuit,
(7) is an integrating circuit, and (8) is a data setting means. The shift register (2) is composed of 4 bits, and each bit of its parallel input is connected to the data bus (1). The output of the shift register (2) shifts the data to the shift clock.
It is applied to D-FF (3) for delaying by a half cycle of SCL, and the output of D-FF (3) is serially output from the serial output terminal (9) via the output buffer (4). Data is applied to the data input D of the shift register (2) from the serial input terminal (10) via the input buffer (5). The shift operation of the shift register (2) is performed by the shift clock SCL applied from the shift control circuit.
And the operation of the D-FF (3) is controlled by the shift clock (5) inverted by the inverter (11). The shift control circuit (6) includes a counter (12) and a R-SFF (13) to which a start signal START for instructing the start of the shift operation is applied to the reset input, and an AND gate (14) for outputting the shift clock SCL Composed. The counter (12) is a counter that counts the shift clock SCL by the same number as the number of stages of the shift register (2), that is, "4", and its output is connected to the set input S of the R-SFF (13). AND gate (14) is R-SFF (13)
The timing pulse IP is output as the shift clock SCL.

これら、シフトレジスタ(2)及びシフト制御回路
(6)は、マイコン(15)内に設けられたシリアル入出
力機能を構成しており、シリアル出力端子(9)、シリ
アル入力端子(10)、及びシフトクロック端子(16)に
よって外部とデータの送受が行え得る。本実施例は、こ
のシリアル入出力機能を用いてD/A変換を行うものであ
り、シリアル出力端子(9)に抵抗R及びコンデンサC
等で構成された積分回路(7)を接続し、更に、データ
バス(1)にデータ設定手段(8)を設けたものであ
る。データ設定手段(8)は、アナログ信号に変換すべ
きディジタルデータから、積分回路(7)で積分される
パルス列を作成し、シフトレジスタ(2)にプリセット
するための手段であり、マイコン(15)のプログラムに
よって構成することができる。
These shift register (2) and shift control circuit (6) constitute a serial input / output function provided in the microcomputer (15), and include a serial output terminal (9), a serial input terminal (10), and The shift clock terminal (16) can be used to exchange data with the outside. In this embodiment, D / A conversion is performed by using this serial input / output function, and the resistor R and the capacitor C are connected to the serial output terminal (9).
An integrating circuit (7) composed of the above components is connected, and further a data setting means (8) is provided on the data bus (1). The data setting means (8) is means for creating a pulse train integrated by the integrating circuit (7) from digital data to be converted into an analog signal and presetting it in the shift register (2), and the microcomputer (15). It can be configured by the program.

第2図は、ダータ設定手段(8)で取り扱われるディ
ジタルデータとプリセットされるデータの関係を示す図
であり、ディジタルデータが「1」ステップする毎にプ
リセットされるデータの“1"が1ビット増加あるいは減
少する。
FIG. 2 is a diagram showing the relationship between the digital data handled by the data setting means (8) and the preset data. Every time the digital data is "1" step, "1" of the preset data is 1 bit. Increase or decrease.

第3図は第1図に示された実施例の動作を示すタイミ
ング図である。本実施例に於けるタイミングパルスIP
は、マイコン(15)のサイクルタイムの64倍の周期を有
するパルスが使用され、命令の実行時間より十分長いタ
イミングパルスとなっている。
FIG. 3 is a timing diagram showing the operation of the embodiment shown in FIG. Timing pulse IP in this embodiment
Uses a pulse having a cycle that is 64 times the cycle time of the microcomputer (15), which is a timing pulse that is sufficiently longer than the instruction execution time.

先ず、所定の命令、例えばD/A変換のスタート命令の
実行により、スタート信号STARTを発生し、カウンタ(1
2)及びR−SFF(13)をリセットし、カウンタ(12)を
計数可能状態とする。更に、データ設定手段(8)の動
作により第2図に示されたデータが、データバス(1)
を介してシフトレジスタ(2)に送出され、書き込みパ
ルスLOADによりシフトレジスタ(2)にプリセットされ
る。R−SFF(13)がリセットされることにより、ANDゲ
ート(14)からはサイクルタイムの64倍のシフトクロッ
クSCLが出力されこのシフトクロックSCLにより、プリセ
ットされたデータD−FF(3)でシフトクロックSCLの
半周期遅延されて積分回路(7)に印加される。カウン
タ(12)がシフトクロックSCLを4個計数すると、その
出力がデータの転送終了を示す終了信号ENDとして出力
され、更に、R−SFF(13)がセットされる。これによ
り、シフトクロックSCLがANDゲート(14)に於いて遮断
され、シフトレジスタ(2)の動作が停止する。一方、
終了信号ENDによりマイコン(15)に割り込み要求が為
され、割り込み処理に於いて、データ設定手段(8)が
動作され、再びシフトレジスタ(2)にデータがプリセ
ットされる。そして、スタート信号STARTを発生するこ
とにより再びデータの転送が実行される。このとき、前
回と同一のデータを繰り返えし出力する場合には、シリ
アル出力端子(9)とシリアル入力端子(10)とを接続
しておくことによりプリセット動作をしなくともスター
ト信号STARTの発生のみで良い。
First, a start command START is generated by executing a predetermined command, for example, a D / A conversion start command, and a counter (1
2) and R-SFF (13) are reset, and the counter (12) is made ready for counting. Further, the data shown in FIG. 2 is transferred to the data bus (1) by the operation of the data setting means (8).
Is sent to the shift register (2) via the and is preset in the shift register (2) by the write pulse LOAD. When the R-SFF (13) is reset, the AND gate (14) outputs a shift clock SCL which is 64 times the cycle time, and the shift clock SCL shifts the preset data D-FF (3). It is delayed by a half cycle of the clock SCL and applied to the integrating circuit (7). When the counter (12) counts four shift clocks SCL, its output is output as an end signal END indicating the end of data transfer, and R-SFF (13) is set. As a result, the shift clock SCL is cut off in the AND gate (14), and the operation of the shift register (2) is stopped. on the other hand,
An interrupt request is issued to the microcomputer (15) by the end signal END, the data setting means (8) is operated in the interrupt process, and data is preset in the shift register (2) again. Then, the data transfer is executed again by generating the start signal START. At this time, when the same data as the previous time is repeatedly output, the serial output terminal (9) and the serial input terminal (10) are connected to each other, so that the start signal START It only needs to occur.

また、第3図に示された動作は4ビットのデータを出
力する場合であるが、8ビットのデータを4ビットのシ
フトレジスタ(2)で送出する場合には、第4図に示さ
れた8ビットデータを4ビットづつ2回に分けて送出す
ることによって9段階のアナログ信号が得られる。
Further, the operation shown in FIG. 3 is for outputting 4-bit data, but when 8-bit data is sent out by the 4-bit shift register (2), it is shown in FIG. An analog signal of 9 stages can be obtained by transmitting the 8-bit data by dividing the data into 4-bit data twice.

このように、第2図あるいは第4図に示されたデータ
を積分すると印加されたデータのデューティに応じたア
ナログ信号が得られるもので、PWM型のD/A変換と同様の
D/A変換回路が実現できる。
In this way, when the data shown in FIG. 2 or 4 is integrated, an analog signal corresponding to the duty of the applied data is obtained, which is similar to PWM type D / A conversion.
A D / A conversion circuit can be realized.

(ト)考案の効果 上述の如く本考案によれば、シリアル入出力機能を有
するマイコンを使用して簡単なD/A変換回路が構成でき
るものであり、そのための構成素子数の増加も極くわず
かである。従って、それほど精度を必要としないD/A変
換回路を容易にマイコンに内蔵可能となり、経済的であ
る。
(G) Effect of the Invention According to the present invention as described above, a simple D / A conversion circuit can be constructed by using a microcomputer having a serial input / output function, and the number of constituent elements for that purpose is extremely large. Few. Therefore, a D / A conversion circuit which does not require so much accuracy can be easily incorporated in the microcomputer, which is economical.

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

第1図は本考案の実施例を示すブロック図、第2図は積
分されるパルス例を作成するデータを示す図、第3図は
第1図に示された実施例の動作を示すタイミング図、第
4図は8ビットのデータを示す図である。 (1)……データバス、(2)……シフトレジスタ、
(3)……D−FF、(4)……出力バッファ、(5)…
…入力バッファ、(6)……シフト制御回路、(7)…
…積分回路、(8)……データ設定手段。
FIG. 1 is a block diagram showing an embodiment of the present invention, FIG. 2 is a diagram showing data for creating an integrated pulse example, and FIG. 3 is a timing diagram showing an operation of the embodiment shown in FIG. , FIG. 4 is a diagram showing 8-bit data. (1) …… Data bus, (2) …… Shift register,
(3) ... D-FF, (4) ... output buffer, (5) ...
... Input buffer, (6) ... Shift control circuit, (7) ...
… Integrator circuit, (8) …… Data setting means.

Claims (1)

(57)【実用新案登録請求の範囲】(57) [Scope of utility model registration request] 【請求項1】データバスにパラレル入力が接続されたシ
フトレジスタと、動作の開始を指示する制御信号により
リセットされ前記シフトレジスタをシフト動作させるシ
フトクロックを前記シフトレジスタの段数と等しい数だ
け計数した後に前記シフトレジスタのシフト動作の終了
を示す終了信号を出力するカウンタと、前記制御信号が
印加されることにより第1論理レベルを出力し且つ前記
終了信号が印加されることにより第2論理レベルを出力
する論理レベル出力回路と、該論理レベル出力回路の出
力が第1論理レベルとなっている間前記シフトレジスタ
への前記シフトクロックの供給を許可するゲート回路
と、前記シフトレジスタからシリアル出力されたデータ
を前記ゲート回路を通過したシフトクロックに同期して
保持する保持回路と、前記データバスと接続され、前記
終了信号が割り込み要求信号として割り込み処理される
ことにより前記シフトレジスタに所定のデータをプリセ
ットするデータ設定手段と、をワンチップマイクロコン
ピュータに内蔵し、前記保持回路から出力されるデータ
を積分回路で積分することにより,D/A変換されたアナロ
グ値を得ることを特徴とするD/A変換回路。
1. A shift register having a parallel input connected to a data bus and a shift clock reset by a control signal for instructing the start of operation to shift the shift register are counted by a number equal to the number of stages of the shift register. A counter that outputs an end signal that indicates the end of the shift operation of the shift register later, a first logic level that is output when the control signal is applied, and a second logic level that is output when the end signal is applied. A logic level output circuit for outputting, a gate circuit for permitting supply of the shift clock to the shift register while the output of the logic level output circuit is at the first logic level, and serial output from the shift register A holding circuit that holds data in synchronization with the shift clock that has passed through the gate circuit; A data setting means that is connected to the data bus and presets predetermined data in the shift register by interrupt processing of the end signal as an interrupt request signal is built in a one-chip microcomputer, and output from the holding circuit. A D / A conversion circuit, which obtains a D / A-converted analog value by integrating the stored data with an integration circuit.
JP1986194750U 1986-12-18 1986-12-18 D / A conversion circuit Expired - Lifetime JP2509464Y2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1986194750U JP2509464Y2 (en) 1986-12-18 1986-12-18 D / A conversion circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1986194750U JP2509464Y2 (en) 1986-12-18 1986-12-18 D / A conversion circuit

Publications (2)

Publication Number Publication Date
JPS6399434U JPS6399434U (en) 1988-06-28
JP2509464Y2 true JP2509464Y2 (en) 1996-09-04

Family

ID=31152011

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1986194750U Expired - Lifetime JP2509464Y2 (en) 1986-12-18 1986-12-18 D / A conversion circuit

Country Status (1)

Country Link
JP (1) JP2509464Y2 (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS50137665A (en) * 1974-04-22 1975-10-31
JPS56117424A (en) * 1980-02-21 1981-09-14 M Syst Giken:Kk Time-division type d-a converter
JPS5883393A (en) * 1981-11-09 1983-05-19 Yokogawa Hokushin Electric Corp Shift register

Also Published As

Publication number Publication date
JPS6399434U (en) 1988-06-28

Similar Documents

Publication Publication Date Title
JPH04336308A (en) Single-chip microcomputer
JP2509464Y2 (en) D / A conversion circuit
JP3486718B2 (en) Single chip microcomputer
JP2574909B2 (en) Microcomputer
JPH0568751B2 (en)
JPS63155250A (en) Serial data output circuit
JPS6314497Y2 (en)
JPH08111641A (en) Comparator, a/d converter, pwm signal generator, power source device and power source controller
JP2638855B2 (en) Motor speed control device
SU1437995A2 (en) Ring counter
JP2648003B2 (en) Timer counter
JPS63141415A (en) Parallel serial conversion circuit
JPS6128423Y2 (en)
JPH0427730B2 (en)
KR100206987B1 (en) Multifunction timer
JPS6068167A (en) Dc power source device for arc welding
SU1322458A1 (en) Successive approximation register
JPH04207628A (en) Semiconductor device
JPS63274215A (en) Analog/digital converter
JPS62224112A (en) Multi-function timer
JPH01112823A (en) A/d converter circuit
JPS6399948U (en)
JPH0555883A (en) Timer circuit
JPH04288727A (en) A/d converter
JPH03247118A (en) Counter circuit