diff --git a/bibs/t-2.bib b/bibs/t-2.bib index 9fbb1ff..eda0ed1 100644 --- a/bibs/t-2.bib +++ b/bibs/t-2.bib @@ -62,3 +62,10 @@ month={06}, pages={77-78} } +@online{tc74hc74, + title={TC74HC74AP/AF}, + author={TOSHIBA Semiconductor}, + year={2014}, + month={03}, + url={https://akizukidenshi.com/goodsaffix/TC74HC74AP_datasheet_ja_20140301.pdf} +} diff --git a/out/report_t-2-opt.pdf b/out/report_t-2-opt.pdf new file mode 100644 index 0000000..48b4932 Binary files /dev/null and b/out/report_t-2-opt.pdf differ diff --git a/out/report_t-2.pdf b/out/report_t-2.pdf index bdbe263..793c62f 100644 Binary files a/out/report_t-2.pdf and b/out/report_t-2.pdf differ diff --git a/out/report_t-2.synctex.gz b/out/report_t-2.synctex.gz index 5b2358b..5b33d1b 100644 Binary files a/out/report_t-2.synctex.gz and b/out/report_t-2.synctex.gz differ diff --git a/report_t-2.tex b/report_t-2.tex index 17e4f13..8ee07e2 100644 --- a/report_t-2.tex +++ b/report_t-2.tex @@ -1,4 +1,4 @@ -\documentclass[japanese,xelatex,a4paper,10.5pt,ja=standard,draft]{bxjsarticle} +\documentclass[japanese,xelatex,a4paper,10.5pt,ja=standard]{bxjsarticle} \usepackage{tex/preamble} \usepackage{tex/experiment-title} @@ -53,6 +53,12 @@ \section{まとめ} 今回の実験で以下の事実を確認した: + + \begin{itemize} + \item{各種論理ゲートは組み合わせることで多種多様な動作をする回路を構築可能である} + \item{ブール代数の諸法則・諸定理で論理回路の規模・複雑性を調整することができる} + \item{順序回路の動作の記述には状態遷移図・表が有効である} + \end{itemize} \printbibliography[title={参考文献}]{} \end{document} diff --git a/sections/t-2/exp-result.tex b/sections/t-2/exp-result.tex index f9de018..133df0c 100644 --- a/sections/t-2/exp-result.tex +++ b/sections/t-2/exp-result.tex @@ -64,6 +64,8 @@ \includegraphics[width=4cm]{./assets/t-2/result/nand-4/state-1111.jpg} \subcaption{$a = 1, \ b = 1, \ c = 1, \ d = 1$} \end{minipage} + \caption{HD14012BP 4 Inputs NAND Gate ($x = \overline{a \cdot b \cdot c \cdot d}$)} + \label{fig:a1-2-res} \end{figure} \subsubsection{観測された真理値表} @@ -537,19 +539,19 @@ \centering \begin{minipage}[h]{0.45\textwidth} \centering - \includegraphics[width=6cm]{./assets/t-2/result/signal-timing/first-second-bit.jpg} + \includegraphics[width=7cm]{./assets/t-2/result/signal-timing/first-second-bit.jpg} \subcaption{First and Second Bits} \end{minipage} \begin{minipage}[h]{0.45\textwidth} \centering - \includegraphics[width=6cm]{./assets/t-2/result/signal-timing/third-fourth-bit.jpg} + \includegraphics[width=7cm]{./assets/t-2/result/signal-timing/third-fourth-bit.jpg} \subcaption{Third and Forth Bits} \end{minipage} \caption{Response Signals of Counter Output when State Transitions from 0 to 1} \label{fig:aa-res} \end{figure} -各出力がTC74HC74のHレベルの入力電圧に達っするまでの時間を応答時間とし, +各出力がTC74HC74のHレベルの入力電圧に到達するまでの時間を応答時間とし, それぞれの応答時間の概算は\cref{tab:aa-res}となった. \begin{table}[H] diff --git a/sections/t-2/reflection.tex b/sections/t-2/reflection.tex index c2646a4..96d3e6a 100644 --- a/sections/t-2/reflection.tex +++ b/sections/t-2/reflection.tex @@ -93,14 +93,12 @@ NANDゲートはANDゲートの否定なので, 結果は理屈に沿ってい \end{split} \end{equation} -\Cref{equ:a1-4-de-morganed}より, - -\Cref{tab:a1-4-res-tt}の真理値表は\cref{tab:a1-2-res-tt}のものと一致している. 論理式の等価は真理値表の一致を意味するので, \cref{equ:a1-4-de-morganed}で示した論理式の真理値表も全て一致する. +\Cref{tab:a1-4-res-tt}の真理値表は\cref{tab:a1-2-res-tt}のものと一致している, よってこれら2つの論理式は等価である. \subsection{課題 2-1} -デコーダ回路とはある意味を持つコードを別の対応するコードへの写像を取る回路のことである. +デコーダ回路とはある意味を持つ小さなコードを別の対応するより大きなコードへの写像を取る回路のことである. 今回の場合は4ビットの二進数から7セグメントLEDの点灯パターンへの写像を論理回路で実装している. 7セグメントLEDデコーダのTC4511はそれぞれの出力が論理式の出力となってる. @@ -137,14 +135,15 @@ NANDゲートはANDゲートの否定なので, 結果は理屈に沿ってい B &= (\bar{a} \cdot b \cdot \bar{c}) + (a \cdot \bar{b} \cdot c) \\ C &= B + (a \cdot b \cdot \bar{c}) \\ D &= \overline{(\bar{a} \cdot b \cdot \bar{c}) + (a \cdot b \cdot c)} \\ - E &= 1 \\ + E &= d \\ F &= \overline{a \cdot \bar{b} \cdot c} \\ G &= \overline{\bar{a} \cdot \bar{b} \cdot c} \end{split} \end{equation} -これら論理式にカルノー図を適応したが, もとが十分簡略化されているためか, あまり有用ではなかった. -かわりに, 複数式の共通する項を1つのユニットとして共有して使用することにした. +Eセグメントには省略していたdの値を1との論理積として戻した. +これら論理式にカルノー図を適応したが, もとが十分簡略化されていたためか, あまり有用ではなかった. +かわりに, 複数式に共通する項を1つのユニットとして共有して使用することにした. 共通項は\cref{equ:a2-2b-common}とした. @@ -180,6 +179,8 @@ NANDゲートはANDゲートの否定なので, 結果は理屈に沿ってい \text{EN} = d \cdot (b + c) \end{equation} +この論理式の出力でNch MOSFETを駆動させ, 7セグメントLEDのコモンカソードを制御することで一括で消灯させることにした. + これら論理式から回路を制作すると\cref{fig:a2-2b-cd}となった. \begin{figure}[tbh] @@ -242,23 +243,105 @@ NANDゲートはANDゲートの否定なので, 結果は理屈に沿ってい \draw (G.in 3) ++(-0.5,0) node[left]{c} to [short, o-] (G.in 3); \draw (G.out) to [short, -o] ++(0.5,0) node[right]{G}; - \draw (G.out) ++(0,-2) node[above]{$\text{7seg}_\text{GND}$} to [short, o-] ++(0,-1) node[nigfete,anchor=D](Q){} (Q.S) -- ++(0,-1.3) node[ground]{} (Q.G) to [short, -*] ++(-1,0) coordinate (Qin) to [R, l={$330 \ \Omega$}] ++(0,-2) node[ground]{}; + \draw (-1.5, -2) node[left]{d} to [short, o-o] ++(3,0) node[right]{E}; + + \draw (G.out) ++(1,-2) node[above]{Common Cathode} to [short, o-] ++(0,-1) node[nigfete,anchor=D](Q){} (Q.S) -- ++(0,-1.3) node[ground]{} (Q.G) to [short, -*] ++(-1,0) coordinate (Qin) to [R, l={$330 \ \Omega$}] ++(0,-2) node[ground]{}; \draw (Qin) -- ++(-1,0) node[and port, anchor=out](ENAnd){}; \draw (ENAnd.in 1) to [short, -o] ++(-0.5,0) node[left]{d}; \draw (ENAnd.in 2) -- ++(-1,0) node[or port, anchor=out](ENOr){}; \draw (ENOr.in 1) to [short, -o] ++(-0.5,0) node[left]{b}; \draw (ENOr.in 2) to [short, -o] ++(-0.5,0) node[left]{c}; + + \ctikzset{resistors/scale=0.5} + \draw (-7,-4) node[dipchip, num pins=14, no topmark, external pins width=0.0, hide numbers](LED){} (LED) node[bare7seg]{}; + \node [left, font=\tiny] at (LED.bpin 14) {A}; + \node [left, font=\tiny] at (LED.bpin 13) {B}; + \node [left, font=\tiny] at (LED.bpin 12) {C}; + \node [left, font=\tiny] at (LED.bpin 11) {D}; + \node [left, font=\tiny] at (LED.bpin 10) {E}; + \node [left, font=\tiny] at (LED.bpin 9) {F}; + \node [left, font=\tiny] at (LED.bpin 8) {G}; + \node [above, font=\tiny] at (LED.s) {Cathode}; + \draw (LED.bpin 14) to[R] ++(1.5,0) to [short,-o] ++(0.5,0) node[right]{A}; + \draw (LED.bpin 13) to[R] ++(1.5,0) to [short,-o] ++(0.5,0) node[right]{B}; + \draw (LED.bpin 12) to[R] ++(1.5,0) to [short,-o] ++(0.5,0) node[right]{C}; + \draw (LED.bpin 11) to[R] ++(1.5,0) to [short,-o] ++(0.5,0) node[right]{D}; + \draw (LED.bpin 10) to[R] ++(1.5,0) to [short,-o] ++(0.5,0) node[right]{E}; + \draw (LED.bpin 9) to[R] ++(1.5,0) to [short,-o] ++(0.5,0) node[right]{F}; + \draw (LED.bpin 8) to[R] ++(1.5,0) to [short,-o] ++(0.5,0) node[right]{G}; + \draw (LED.s) to [short,-o] ++(0,-1) node[right]{Common Cathode}; + + \draw[dash pattern=on 4pt off 4pt, thick] (LED.ne) ++(0.1, 0.1) rectangle ($(LED.se) + (1.4,-0.1)$); + \draw (LED.se) ++(0.7,-0.1) node[below]{$330 \ \Omega$}; \end{circuitikz} \caption{Circuit Diagram of 7 Segment Hexadecimal Decoder} \label{fig:a2-2b-cd} \end{figure} +\subsection{課題 3-1} + +今回の実験では\cref{fig:a3-1-stg}の状態遷移を行うNOR構成のRSフリップフロップを作成した. + +\begin{figure}[tbh] + \centering + \begin{tikzpicture}[shorten >=1pt, node distance=2cm, auto] + \node [state] (Q0) {$Q_0$}; + \node [state] (Q1) [right of=Q0] {$Q_1$}; + + \path[->] (Q0) edge [bend left] node[above] {$01/1$} (Q1); + \path[->] (Q1) edge [bend left] node[below] {$10/0$} (Q0); + \path[->] (Q0) edge [loop left] node[left] {$00/0$} () (Q1) edge [loop right] node[right] {$00/1$} (); + \end{tikzpicture} + \caption{ + \parbox[t]{8cm}{State Transition Graph of RS Flipflop, the Edge Labels Show Input R, Input S, and Output Q from Left} + } + \label{fig:a3-1-stg} +\end{figure} + +この構成ではRとS共に1が入力された時が禁止状態となる. +禁止状態では, 両方のNORゲートに1つ以上のHレベルの入力がかかり, 双方出力が0となりフリップフロップとしての機能を喪失する. +どちらかの入力がLレベルになるまでこの機能は回復しない. + \subsection{課題 3-3} +今回の実験で作成したカウンタは二進数のビットごとの否定を出力するものとなった. +これは初期状態では全ての出力$Q$がLレベルで, 次の状態で入力Dに印加されるのは全て否定出力$\bar{Q}$のHレベルとなるためである. +この回路は複数のDフリップフロップの出力が次のフリップフロップのクロック入力へ数珠接続した非同期のカウンタとなる. \subsection{課題 3-4} +最下位のDフリップフロップのクロックをパルスさせるには?の論理ゲートの出力をNANDゲートの入力関係無しにボタンからのオン・オフでトグルさせる必要がある. +手元にあるゲートの中でこのクロックをパルスさせることが出来たのはANDゲートであったが, NANDゲートの出力がLレベルになるカウンタ出力の組み合わせで状態の遷移が停止してしまった. + +これはANDゲートの出力をHレベルにするには2つの入力がHレベルである必要があるが, NANDゲートの出力がLレベルになってしまった以上, ボタンの出力のみでANDゲートの出力を変えることが出来なくなってしまったことに起因する. + +このカウンタを一巡させるには1つのHレベル入力のみで出力をパルスさせ, かつ両方がHレベルのときには出力をLレベルにすることが出来る論理ゲートが必要である. +その論理ゲートこそXOR(排他的論理和)である. この論理ゲートの真理値表は\cref{tab:xor-gate-tt}で, 一方の入力がHレベルである時だけ出力をHレベルにすることが出来る\supercite{digital-circuit:xor}. + +\begin{table}[H] + \centering + \caption{Truth Table of XOR Gate} + \label{tab:xor-gate-tt} + \begin{tabular}{ccc} + \hline + a & b & x \\ + \hline + 0 & 0 & 0 \\ + 1 & 0 & 1 \\ + 0 & 1 & 1 \\ + 1 & 1 & 0 \\ + \hline + \end{tabular} +\end{table} + \subsection{応用課題 A} +\Cref{fig:aa-res}と\cref{tab:aa-res}より, 信号は最下位ビットから順番に立ち上がっている様子が分かる. +しかし, $2^2$のビットは$2^3$のビットに遅れてTC74HC74のHレベルの入力電圧である3.15 Vに到達した. +これにはIC内部や, 入力端子の寄生容量が関係していると思われる\supercite{tc74hc74}. +これら遅延は非同期カウンタの性質上避けられない性質で, クロックとほぼ同時に状態が遷移する同期式のカウンタならこの遅延を少なくすることができる. + +このことから, この回路で入力できる最大周波数の理論値は$\frac{1}{80 \ \text{ns}} = 12.5 \ \text{MHz}$となる. +実際, ファンクションジェネレータで16 MHz付近の周波数をクロックに入力すると動作が不安定になった. diff --git a/sections/t-2/theory.tex b/sections/t-2/theory.tex index 2eb8ca3..95217d5 100644 --- a/sections/t-2/theory.tex +++ b/sections/t-2/theory.tex @@ -161,7 +161,7 @@ 順序回路の動作を説明するには状態遷移図や状態遷移表が有効である. 状態遷移図は各状態をノード, 入力/出力の順で表記された状態の遷移をエッジとする有向グラフとして表現される. -状態遷移表は入力と現状態が次にどの状態と出力をするのかを表にまとめたものである\supercite{digital-logic:state-transition}. +状態遷移表は入力と現状態が次にどの状態と出力をするのかを表にまとめたものである\supercite{digital-circuit:state-transition}. 前述の例を状態遷移図と状態遷移表で表現するとそれぞれ\cref{fig:state-transition-graph-example}と\cref{tab:state-tarnsition-table-example}となる. \begin{table}[!ht]