added sections for t-2

This commit is contained in:
2026-06-23 02:54:03 +09:00
parent 6ded2e9f31
commit 49287f2692
9 changed files with 466 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
(A, B, C, D): (a, b, c, d, e, f, g)
(0, 1, 0, 1): (1, 1, 1, 0, 1, 1, 1) // 0x0A
(1, 1, 0, 1): (0, 0, 1, 1, 1, 1, 1) // 0x0b
(0, 0, 1, 1): (1, 0, 0, 1, 1, 1, 0) // 0x0C
(1, 0, 1, 1): (0, 1, 1, 1, 1, 0, 1) // 0x0d
(0, 1, 1, 1): (1, 0, 0, 1, 1, 1, 1) // 0x0E
(1, 1, 1, 1): (1, 0, 0, 0, 1, 1, 1) // 0x0F
Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.
Binary file not shown.
+56
View File
@@ -0,0 +1,56 @@
\documentclass[japanese,xelatex,a4paper,10.5pt,ja=standard]{bxjsarticle}
\usepackage{tex/preamble}
\usepackage{tex/experiment-title}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{array}
\usepackage{multirow}
\usepackage{subcaption}
\usepackage{pgfmath}
\usepackage{pgffor}
\usepackage{tex/depD-bib}
\usepackage{tex/depD-format}
\usetikzlibrary{automata}
\reportauthor{柴田健琉}
\reporttitle{LEDの回路}
\reportdate{2026年}{06月}{20日}
\turnindate{2026年}{06月}{30日}
\schoolyear{2026}
\grade{3}
\department{電子制御工学科}
\subject{電子制御工学実験1}
\reportid{T-2}
\expgroup{-}
\seatingnum{15}
\addExperimentDate{2026年 06月 02日}
\addExperimentDate{2026年 06月 16日}
\addExperimentDate{2026年 06月 23日}
\addbibresource{./bibs/t-2.bib}
\begin{document}
\experimentTitle
\section{実験目的}
今回の実験ではディジタル回路の基礎と応用について学ぶために行った.
\input{./sections/t-2/theory}
\resetrefcounter
\input{./sections/t-2/exp-detail}
\resetrefcounter
\input{./sections/t-2/exp-result}
\resetrefcounter
\input{./sections/t-2/reflection}
\resetrefcounter
\section{まとめ}
今回の実験で以下の事実を確認した:
\end{document}
+212
View File
@@ -0,0 +1,212 @@
\section{実験手順・条件}
\subsection{実験器具}
\begin{itemize}
\item{ブレッドボード}
\item{直流安定化電源}
\item{タクトスイッチ x4}
\item{LED x4}
\item{7セグメント LED}
\item{カーボン抵抗器 $330 \Omega$ or $470 \Omega$ x12}
\item{ジャンパーワイヤ}
\item{ANDゲートIC TC74HC08}
\item{NANDゲートIC HD14012BP}
\item{ORゲートIC TC74HC32}
\item{NOTゲートIC TC74HC04}
\item{7セグメントドライバIC TC4511}
\item{DフリップフロップIC TC74HC74 x2}
\item{Nch MOSFET}
\end{itemize}
\subsection{課題1-1}
ANDゲートあるいはORゲートの動作を確認する.
2つのボタンを入力とし, 出力を7セグメントLEDのドットに表示させる回路を作成する.
\subsection{課題1-2}
4入力NANDゲートの動作を確認する.
4つのボタンを入力とし, 出力を7セグメントLEDのドットに表示させる回路を作成する.
\subsection{課題1-3}
\cref{fig:a1-3-cd}に示す組み合わせ回路を作成し動作を確認する.
4つのボタンを入力とし, 出力を7セグメントLEDのドットに表示させる回路を作成する.
\begin{figure}[tbh]
\centering
\begin{circuitikz}
\ctikzset{logic ports=ieee}
\node (A) at (0,2) {$A_{\text{IN}}$};
\node (B) at (0,1) {$B_{\text{IN}}$};
\node (C) at (0,0) {$C_{\text{IN}}$};
\node (D) at (0,-1) {$D_{\text{IN}}$};
\draw (2,1.5) node[and port](a){};
\draw (2,-0.5) node[and port](b){};
\draw (4.5,0.5) node[and port](c){};
\draw (A) -| (a.in 1) (B) -| (a.in 2);
\draw (C) -| (b.in 1) (D) -| (b.in 2);
\draw (a.out) -| (c.in 1) (b.out) -| (c.in 2);
\draw (c.out) -- ++(0.5,0) node[right] {$D_p$};
\end{circuitikz}
\caption{Circuit Diagram of Assignment 1-3}
\label{fig:a1-3-cd}
\end{figure}
\subsection{課題1-4}
\cref{fig:a1-4-cd}に示す組み合わせ回路を作成し動作を確認する.
4つのボタンを入力とし, 出力を7セグメントLEDのドットに表示させる回路を作成する.
\begin{figure}[tbh]
\centering
\begin{circuitikz}
\ctikzset{logic ports=ieee}
\node (A) at (0,2) {$A_{\text{IN}}$};
\node (B) at (0,1) {$B_{\text{IN}}$};
\node (C) at (0,0) {$C_{\text{IN}}$};
\node (D) at (0,-1) {$D_{\text{IN}}$};
\draw (2,1.5) node[and port](a){};
\draw (2,-0.5) node[and port](b){};
\draw (4.5,0.5) node[and port](c){};
\draw (6.5,0.5) node[not port](d){};
\draw (A) -| (a.in 1) (B) -| (a.in 2);
\draw (C) -| (b.in 1) (D) -| (b.in 2);
\draw (a.out) -| (c.in 1) (b.out) -| (c.in 2);
\draw (c.out) -- (d.in);
\draw (d.out) -- ++(0.5,0) node[right] {$D_p$};
\end{circuitikz}
\caption{Circuit Diagram of Assignment 1-4}
\label{fig:a1-4-cd}
\end{figure}
\subsection{課題2-1}
7セグメントドライバICを用いて1桁のBDCデコーダを作成する.
\subsection{課題2-2B}
論理ゲートを複数個使用し, 0-9以外の数の表現を実現する回路を作成する.
なお, 既存の0-9に対応するBDCコードが入力された際にはセグメントを点灯させないこと.
\subsection{課題3-1}
論理ゲートを組み合わせてRSフリップフロップを作成し, 動作を確認する.
\subsection{課題3-2}
DフリップフロップICを用いて\cref{fig:a3-2-cd}の回路を作成し, 動作を確認する.
\begin{figure}[tbh]
\centering
\begin{circuitikz}
\ctikzset{logic ports=ieee}
\ctikzset{flipflops/scale=0.75}
\node [flipflop D] at (0,0) (Df){};
\draw (-2.5,2) node[vcc]{$V_{DD}$} -- ++(0,-0.5) to[normal open switch] ++(0,-1.5) coordinate(x) to[leDo, l={$D_p$}] ++(0,-2) to[R={$330 \Omega$}] ++(0,-2) node[ground]{};
\draw (x) to[short,o-] ++(1,0) |- (Df.pin 3);
\draw (Df.pin 4) -- ++(0.5,0) -- ++(0,2) -- ++(-2.5,0) |- (Df.pin 1);
\draw (Df.pin 6) -- ++(1.5,0) to[leDo, l={$D_A$}] ++(0,-2.5) to[R={$330 \Omega$}] ++(0,-2) node[ground]{};
\end{circuitikz}
\caption{Circuit Diagram of Assignment 3-2}
\label{fig:a3-2-cd}
\end{figure}
\subsection{課題3-3}\label{sec:a3-3}
DフリップフロップICを2個用いて\cref{fig:a3-3-cd}の順列回路を作成し, 動作を確認する.
\begin{figure}[tbh]
\centering
\begin{circuitikz}[scale=0.9]
\ctikzset{logic ports=ieee}
\ctikzset{flipflops/scale=0.75}
\ctikzset{resistors/scale=0.75}
\ctikzset{diodes/scale=0.75}
%\ctikzset{multipoles/flipflop/font=\tiny}
\ctikzset{multipoles/flipflop/pin spacing=0.5}
\node [flipflop D] at (0,0) (Df0){};
\node [flipflop D] at (3,0) (Df1){};
\node [flipflop D] at (6,0) (Df2){};
\node [flipflop D] at (9,0) (Df3){};
\draw (-2,2) node[vcc]{$V_{DD}$} to[normal open switch, -*] ++(0,-2) coordinate (x) to[leDo, l_={$D_p$}] ++(0,-1.5) to[R, l_={$330 \Omega$}] ++(0,-1.5) node[ground]{};
\draw (x) -- ++(0.75,0) |- (Df0.pin 3);
\draw (Df0.pin 4) -- ++(0.25,0) -- ++(0,2) -- ++(-2.25,0) |- (Df0.pin 1);
\draw (Df1.pin 4) -- ++(0.25,0) -- ++(0,2) -- ++(-2.25,0) |- (Df1.pin 1);
\draw (Df2.pin 4) -- ++(0.25,0) -- ++(0,2) -- ++(-2.25,0) |- (Df2.pin 1);
\draw (Df3.pin 4) -- ++(0.25,0) -- ++(0,2) -- ++(-2.25,0) |- (Df3.pin 1);
\draw (Df0.pin 6) -- ++(0.75,0) to[short,-*] ++(0,-0.75) coordinate (ck1) to[leDo, l_={$D_A$}] ++(0,-1.25) to[R, l_={$330 \Omega$}] ++(0,-1.5) node[ground]{};
\draw (ck1) -| (Df1.pin 3);
\draw (Df1.pin 6) -- ++(0.75,0) to[short,-*] ++(0,-0.75) coordinate (ck2) to[leDo, l_={$D_B$}] ++(0,-1.25) to[R, l_={$330 \Omega$}] ++(0,-1.5) node[ground]{};
\draw (ck2) -| (Df2.pin 3);
\draw (Df2.pin 6) -- ++(0.75,0) to[short,-*] ++(0,-0.75) coordinate (ck3) to[leDo, l_={$D_C$}] ++(0,-1.25) to[R, l_={$330 \Omega$}] ++(0,-1.5) node[ground]{};
\draw (ck3) -| (Df3.pin 3);
\draw (Df3.pin 6) -- ++(0.75,0) -- ++(0,-0.75) to[leDo, l_={$D_D$}] ++(0,-1.25) to[R, l_={$330 \Omega$}] ++(0,-1.5) node[ground]{};
\end{circuitikz}
\caption{Circuit Diagram of Assignment 3-3}
\label{fig:a3-3-cd}
\end{figure}
\subsection{課題3-4}
\cref{fig:a3-4-cd}の順序回路を組み, 動作を確認する. ? に適切な論理ゲートを使用する.
\begin{figure}[tbh]
\centering
\begin{circuitikz}[scale=0.9]
\ctikzset{logic ports=ieee}
\ctikzset{logic ports/scale=0.75}
\ctikzset{flipflops/scale=0.75}
\ctikzset{resistors/scale=0.75}
\ctikzset{diodes/scale=0.75}
%\ctikzset{multipoles/flipflop/font=\tiny}
\ctikzset{multipoles/flipflop/pin spacing=0.5}
\node [flipflop D] at (0,0) (Df0){};
\node [flipflop D] at (3,0) (Df1){};
\node [flipflop D] at (6,0) (Df2){};
\node [flipflop D] at (9,0) (Df3){};
\node [european blank port] at ($(Df0.pin 3) - (0.25,0)$) (ckGate) {?};
\node [nand port, number inputs=4, rotate=180] at ($(Df0) + (0,4)$) (nandGate) {};
\draw (nandGate.out) -| (ckGate.in 1);
\draw (-3.5,2) node[vcc]{$V_{DD}$} to[normal open switch, -*] ++(0,-2) coordinate (x) to[leDo, l_={$D_p$}] ++(0,-1.5) to[R, l_={$330 \Omega$}] ++(0,-1.5) node[ground]{};
\draw (x) -- ++(0.75,0) |- (ckGate.in 2) (ckGate.out) -- (Df0.pin 3);
\draw (Df0.pin 4) -- ++(0.25,0) -- ++(0,2) -- ++(-2.25,0) |- (Df0.pin 1);
\draw (Df1.pin 4) -- ++(0.25,0) -- ++(0,2) -- ++(-2.25,0) |- (Df1.pin 1);
\draw (Df2.pin 4) -- ++(0.25,0) -- ++(0,2) -- ++(-2.25,0) |- (Df2.pin 1);
\draw (Df3.pin 4) -- ++(0.25,0) -- ++(0,2) -- ++(-2.25,0) |- (Df3.pin 1);
\draw (Df0.pin 6) to[short,-*] ++(0.75,0) coordinate (AIN) to[short,-*] ++(0,-0.75) coordinate (ck1) to[leDo, l_={$D_A$}] ++(0,-1.25) to[R, l_={$330 \Omega$}] ++(0,-1.5) node[ground]{};
\draw (ck1) -| (Df1.pin 3);
\draw (AIN) |- (nandGate.in 1);
\draw (Df1.pin 6) to[short,-*] ++(0.75,0) coordinate (BIN) to[short,-*] ++(0,-0.75) coordinate (ck2) to[leDo, l_={$D_B$}] ++(0,-1.25) to[R, l_={$330 \Omega$}] ++(0,-1.5) node[ground]{};
\draw (ck2) -| (Df2.pin 3);
\draw ($(BIN) + (0,2)$) node[not port, rotate=90](n1){} (BIN) -- (n1.in) (n1.out) |- (nandGate.in 2);
\draw (Df2.pin 6) to[short,-*] ++(0.75,0) coordinate (CIN) to[short,-*] ++(0,-0.75) coordinate (ck3) to[leDo, l_={$D_C$}] ++(0,-1.25) to[R, l_={$330 \Omega$}] ++(0,-1.5) node[ground]{};
\draw (ck3) -| (Df3.pin 3);
\draw ($(CIN) + (0,2)$) node[not port, rotate=90](n2){} (CIN) -- (n2.in) (n2.out) |- (nandGate.in 3);
\draw (Df3.pin 6) to[short,-*] ++(0.75,0) coordinate (DIN) -- ++(0,-0.75) to[leDo, l_={$D_D$}] ++(0,-1.25) to[R, l_={$330 \Omega$}] ++(0,-1.5) node[ground]{};
\draw (DIN) |- (nandGate.in 4);
\end{circuitikz}
\caption{Circuit Diagram of Assignment 3-4}
\label{fig:a3-4-cd}
\end{figure}
\subsection{応用課題 A}
\Cref{sec:a3-3}で作成した4ビットカウンタにおいて, 最下位ビットのDフリップフロップのCKにパルスを印加した瞬間のそれぞれのビット出力の応答波形を観察する.
+188
View File
@@ -0,0 +1,188 @@
\section{理論}
\subsection{ディジタル}
ディジタルとは最小単位が存在する物理量であり, 連続的で最小単位が存在しないアナログと対になる.
この最小単位というのは時間や電圧などの刻み幅を決めるもので分解能ともいう. 分解能を高くすれば, 真の値と観測値の誤差が小さくなる.
ディジタルには「誰が測っても同じになる」ことと「多少ノイズが混じっても大丈夫」という長所があり, 逆に「最小単位より小さいものは測れない」という短所がある.
ディジタルにより, 現実世界の様々な現象をある一定の精度で数値的に解析・再現することが出来るようになった.
\begin{figure}[tbh]
\centering
\begin{minipage}[h]{0.45\textwidth}
\centering
\includegraphics[width=0.9\textwidth]{./assets/t-2/analog-example.png}
\subcaption{Analog}
\end{minipage}
\begin{minipage}[h]{0.45\textwidth}
\centering
\includegraphics[width=0.9\textwidth]{./assets/t-2/digitize-example.png}
\subcaption{Digital}
\end{minipage}
\caption{Example of Analog and Digital Signal}
\end{figure}
\subsection{二進数}
二進数とは0と1などの二種類の記号を用いた数の表記法である.
これにより電気のオン・オフなど回路で扱いやすい形で様々な数を表すことが出来るようになった.
そして, ディジタルの登場により, コンピュータが発展していった.
\subsection{ブール代数}
ブール代数とは二値化された数に対し, 演算子や法則を定義した数学の分野である.
ブール代数では基本的な演算子は論理和, 論理積, 論理否定である.
これらの演算子の演算結果は\cref{tab:truth-table-basic}のような真理値表でまとめることが出来る.
\begin{table}[!ht]
\caption{Truth Tables of Basic Logic Operations}
\label{tab:truth-table-basic}
\begin{minipage}[h]{0.33\textwidth}
\centering
\subcaption{Logical And ($x = a \cdot b$)}
\begin{tabular}{ccc}
\hline
a \textbackslash \ b & 0 & 1 \\ \hline
0 & 0 & 0 \\
1 & 0 & 1 \\
\hline
\end{tabular}
\end{minipage}
\begin{minipage}[h]{0.33\textwidth}
\centering
\subcaption{Logical Or ($x = a + b$)}
\begin{tabular}{ccc}
\hline
a \textbackslash \ b & 0 & 1 \\ \hline
0 & 0 & 1 \\
1 & 1 & 1 \\
\hline
\end{tabular}
\end{minipage}
\begin{minipage}[h]{0.33\textwidth}
\centering
\subcaption{Logical Not ($x = \bar{a}$)}
\begin{tabular}{cc}
\hline
a & $\bar{\text{a}}$ \\ \hline
0 & 1 \\
1 & 0 \\
\hline
\end{tabular}
\end{minipage}
\end{table}
これら演算子に対する法則を\cref{equ:laws-of-boolean}に示す.
\begin{equation}
\label{equ:laws-of-boolean}
\begin{aligned}
a + a &= a &\ \text{(Idempotent Law)} \\
a \cdot a &= a &\ \text{(Idempotent Law)} \\
a + 1 &= 1 &\ \text{(Identity Law)} \\
a \cdot 0 &= 0 &\ \text{(Identity Law)} \\
a + (a \cdot b) &= a &\ \text{(Absorption Law)} \\
a \cdot (a + b) &= a &\ \text{(Absorption Law)} \\
(a + b) + c &= a + (b + c) &\ \text{(Associative Law)} \\
(a \cdot b) \cdot c &= a \cdot (b \cdot c) &\ \text{(Associative Law)} \\
\bar{\bar{a}} &= a &\ \text{(Double Negation)}
\end{aligned}
\end{equation}
ブール代数の代表的な定理としてド・モルガンの定理がある.
この定理は「あるブール式の各変数を否定し, 式の中の論理積と論理和を入れ替えた式は, 全体を否定した式と同じ値をとる」というもので\cref{equ:deMorgan}のような式で表現される.
\begin{equation}\label{equ:deMorgan}
\overline{f(x_1, x_2, \dotsc, +, \cdot)} = f(\overline{x_1}, \overline{x_2}, \dotsc, \cdot{}, +)
\end{equation}
\subsection{論理ゲート}
論理ゲートは論理演算を電気回路で表現したもので, 回路記号は\cref{fig:logic-gate-symbols}で表される.
\begin{figure}[tbh]
\centering
\begin{circuitikz}
\ctikzset{logic ports=ieee}
\node [and port] at (0,2) {};
\node [nand port] at (0,0) {};
\node [or port] at (3,2) {};
\node [nor port] at (3,0) {};
\node [not port] at (6,1) {};
\node at (0,1) {AND Gate};
\node at (0,-1) {NAND Gate};
\node at (3,1) {OR Gate};
\node at (3,-1) {NOR Gate};
\node at (6,0) {NOT Gate};
\end{circuitikz}
\caption{Symbols of Logic Gates}
\label{fig:logic-gate-symbols}
\end{figure}
図中のNANDゲートやNORゲートはそれぞれANDゲートとORゲートの結果の論理否定を出力する.
これら論理ゲートを複数個まとめてパッケージしたICが論理ゲートICと呼ばれている.
\subsection{組み合わせ回路}
複雑な条件を扱う論理回路は論理ゲート1つだけでは実現できない. 論理ゲートを複数種類・複数個組み合わせて作られた回路を組み合わせ回路という.
組み合わせ回路を作成するにあたり, 論理式の簡略化はコストや実装空間の制限上必須である.
この簡略化で用いられる方法の1つがカルノー図である.
カルノー図は論理式の結果を特定の条件に対応する行と列に写したもので, $x = (\bar{a} \cdot b \cdot c) + (a \cdot b \cdot \bar{c}) + (a \cdot \bar{b} \cdot \bar{c})$のカルノー図は\cref{fig:karnaugh-map-example}となる.
\begin{figure}[tbh]
\centering
\begin{tabular}{|c|c|c|}
\hline
& $\bar{c}$ & $c$ \\ \hline
$\bar{a} \ \bar{b}$ & & \\ \hline
$\bar{a} \ b$ & & 1 \\ \hline
$a \ b$ & 1 & \\ \hline
$a \ \bar{b}$ & 1 & \\
\hline
\end{tabular}
\caption{Karnaugh Map of $x = (\bar{a} \cdot b \cdot c) + (a \cdot b \cdot \bar{c}) + (a \cdot \bar{b} \cdot \bar{c})$}
\label{fig:karnaugh-map-example}
\end{figure}
カルノー図から隣接する1のセルを「くくる」と論理式を簡略化することが出来る.
今回の例では$a \cdot b \cdot \bar{c}$のセルと$a \cdot \bar{b} \cdot \bar{c}$のセルでは$b$の値によらず1になっているので, くくって $x = (a \cdot \bar{c}) + (\bar{a} \cdot b \cdot c)$を得る.
\subsection{順序回路}
論理回路には現在の状態と入力によって次の状態へ変化する回路が存在する. これらの回路は順序回路と呼ばれている.
例えば, ある状態Aで入力が0の時, 出力を1にし状態Bへ, 入力が1の時, 出力を0にし状態Cへ遷移するというような回路のことである.
順序回路の動作を説明するには状態遷移図や状態遷移表が有効である.
状態遷移図は各状態をノード, 入力/出力の順で表記された状態の遷移をエッジとする有向グラフとして表現される.
状態遷移表は入力と現状態が次にどの状態と出力をするのかを表にまとめたものである.
前述の例を状態遷移図と状態遷移表で表現するとそれぞれ\cref{fig:state-transition-graph-example}\cref{tab:state-tarnsition-table-example}となる.
\begin{table}[!ht]
\begin{minipage}[h]{0.45\textwidth}
\centering
\begin{tikzpicture}[shorten >=1pt, node distance=2cm, auto]
\node [state] (A) {$A$};
\node [state] (B) [above right of=A] {$B$};
\node [state] (C) [below right of=A] {$C$};
\path[->] (A) edge node {$0/1$} (B) edge node {$1/0$} (C);
\end{tikzpicture}
\captionof{figure}{Example of State Transition Graph}
\label{fig:state-transition-graph-example}
\end{minipage}
\begin{minipage}[h]{0.45\textwidth}
\centering
\captionof{table}{Example of State Transition Table}
\label{tab:state-tarnsition-table-example}
\begin{tabular}{cccc}
\hline
State & Input & Next State & Output \\ \hline
A & 0 & B & 1 \\
A & 1 & C & 0 \\
\hline
\end{tabular}
\end{minipage}
\end{table}
+2
View File
@@ -14,6 +14,8 @@
\Crefname{figure}{Fig.}{Fig.}
\crefname{table}{Table}{Tables}
\Crefname{table}{Table}{Tables}
\crefname{section}{section}{sections}
\Crefname{section}{Section}{Sections}
\crefname{equation}{Eq.}{Eq.}
\Crefname{equation}{Eq.}{Eq.}
\creflabelformat{equation}{(#1)}