commit e9ef55be6c3917f5f9eb17dd663b49e57d9206fe Author: spirkelmann Date: Sun Jan 5 14:01:17 2020 +0100 started with presentation diff --git a/images/Breadboard-Pinout.png b/images/Breadboard-Pinout.png new file mode 100644 index 0000000..ee2f9f2 Binary files /dev/null and b/images/Breadboard-Pinout.png differ diff --git a/images/Breadboard.jpg b/images/Breadboard.jpg new file mode 100644 index 0000000..e9b73fc Binary files /dev/null and b/images/Breadboard.jpg differ diff --git a/images/iR.pdf b/images/iR.pdf new file mode 100644 index 0000000..a1bac0f Binary files /dev/null and b/images/iR.pdf differ diff --git a/images/iR.pdf_tex b/images/iR.pdf_tex new file mode 100644 index 0000000..7b674bf --- /dev/null +++ b/images/iR.pdf_tex @@ -0,0 +1,54 @@ +%% Creator: Inkscape inkscape 0.91, www.inkscape.org +%% PDF/EPS/PS + LaTeX output extension by Johan Engelen, 2010 +%% Accompanies image file 'iR.pdf' (pdf, eps, ps) +%% +%% To include the image in your LaTeX document, write +%% \input{.pdf_tex} +%% instead of +%% \includegraphics{.pdf} +%% To scale the image, write +%% \def\svgwidth{} +%% \input{.pdf_tex} +%% instead of +%% \includegraphics[width=]{.pdf} +%% +%% Images with a different path to the parent latex file can +%% be accessed with the `import' package (which may need to be +%% installed) using +%% \usepackage{import} +%% in the preamble, and then including the image with +%% \import{}{.pdf_tex} +%% Alternatively, one can specify +%% \graphicspath{{/}} +%% +%% For more information, please see info/svg-inkscape on CTAN: +%% http://tug.ctan.org/tex-archive/info/svg-inkscape +%% +\begingroup% + \makeatletter% + \providecommand\color[2][]{% + \errmessage{(Inkscape) Color is used for the text in Inkscape, but the package 'color.sty' is not loaded}% + \renewcommand\color[2][]{}% + }% + \providecommand\transparent[1]{% + \errmessage{(Inkscape) Transparency is used (non-zero) for the text in Inkscape, but the package 'transparent.sty' is not loaded}% + \renewcommand\transparent[1]{}% + }% + \providecommand\rotatebox[2]{#2}% + \ifx\svgwidth\undefined% + \setlength{\unitlength}{99.79101296bp}% + \ifx\svgscale\undefined% + \relax% + \else% + \setlength{\unitlength}{\unitlength * \real{\svgscale}}% + \fi% + \else% + \setlength{\unitlength}{\svgwidth}% + \fi% + \global\let\svgwidth\undefined% + \global\let\svgscale\undefined% + \makeatother% + \begin{picture}(1,0.90241433)% + \put(0,0){\includegraphics[width=\unitlength,page=1]{iR.pdf}}% + \end{picture}% +\endgroup% diff --git a/images/iR.svg b/images/iR.svg new file mode 100644 index 0000000..4d3347c --- /dev/null +++ b/images/iR.svg @@ -0,0 +1,138 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/presentation.pdf b/presentation.pdf new file mode 100644 index 0000000..debbda1 Binary files /dev/null and b/presentation.pdf differ diff --git a/presentation.tex b/presentation.tex new file mode 100644 index 0000000..ca01081 --- /dev/null +++ b/presentation.tex @@ -0,0 +1,492 @@ +\documentclass{beamer} +% +% Choose how your presentation looks. +% +% For more themes, color themes and font themes, see: +% http://deic.uab.es/~iblanes/beamer_gallery/index_by_theme.html +% +\mode +{ + \usetheme{Singapore} % or try Darmstadt, Madrid, Warsaw, ... + \usecolortheme[RGB={3,138,94}]{structure} + \usefonttheme{structurebold} % or try serif, structurebold, ... + \setbeamertemplate{navigation symbols}{} + \setbeamertemplate{headline}{} + %\setbeamertemplate{caption}[numbered] + \setbeamertemplate{footline}[frame number] +} + +\usepackage[english]{babel} +\usepackage[utf8x]{inputenc} +\usepackage{fancyvrb} +\usepackage{tcolorbox,listings} +\usepackage{textpos} +\usepackage{setspace} +\usepackage{circuitikz} +\usetikzlibrary{positioning} + +% Default fixed font does not support bold face +\DeclareFixedFont{\ttb}{T1}{ascii}{m}{n}{7} % for bold +\DeclareFixedFont{\ttm}{T1}{ascii}{m}{n}{7} % for normal + +% Custom colors +\usepackage{color} +\definecolor{deepblue}{rgb}{0,0,0.5} +\definecolor{deepred}{rgb}{0.6,0,0} +\definecolor{deepgreen}{rgb}{0,0.5,0} +\definecolor{lightblue}{rgb}{0.6,0.8,1.0} +\definecolor{teal}{rgb}{0.45,0.85,1.0} + + +\fvset{frame=single,framesep=1mm,fontfamily=courier,fontsize=\scriptsize,framerule=.3mm,numbersep=1mm,commandchars=\\\{\}} +\usepackage{color} + +\tcbuselibrary{listings,skins,breakable} + + +\lstdefinestyle{commandline}{ + basicstyle=\ttfamily\scriptsize, + numbers=none, + keywordstyle=\color{blue}, + morekeywords={{git add}}, + %numberstyle=\tiny, + numbersep=2pt, + moredelim=**[is][\color{darkgreen}]{_green_}{_green_}, + moredelim=**[is][\color{red}]{_red_}{_red_}, + moredelim=**[is][\color{blue}]{_blue_}{_blue_}, + } + +% Python style for highlighting +\newcommand\pythonstyle{ +\lstset{ +language=Python, +basicstyle=\ttfamily\color{white}\tiny, +otherkeywords={self}, % Add keywords here +keywordstyle=\ttfamily\color{lightblue}, +commentstyle=\ttfamily\color{teal}, +emph={MyClass,__init__}, % Custom highlighting +emphstyle=\ttfamily\color{deepred}, % Custom highlighting style +stringstyle=\ttfamily\color{red}, +frame=tb, % Any extra options here +backgroundcolor = \color{black}, +showstringspaces=false % +}} + +\newtcblisting{ConsoleVerbatim}{ + arc=0mm, + top=-2mm, + bottom=-2mm, + left=0mm, + right=0mm, + width=\textwidth, + boxrule=0.5pt, + colupper=white, + colback=black, + spartan, + listing only, + listing options={style=commandline}, + breakable +} + +% Python environment +\lstnewenvironment{python}[1][] +{ +\pythonstyle +\lstset{#1} +} +{} + +\lstdefinestyle{commandline}{ + basicstyle=\ttfamily\tiny, + numbers=none, + keywordstyle=\color{blue}, + morekeywords={{git add}}, + %numberstyle=\tiny, + numbersep=2pt, + moredelim=**[is][\color{darkgreen}]{_green_}{_green_}, + moredelim=**[is][\color{red}]{_red_}{_red_}, + moredelim=**[is][\color{blue}]{_blue_}{_blue_}, + } +\newtcblisting{ConsoleVerbatimTiny}{ + arc=0mm, + top=-2mm, + bottom=-2mm, + left=0mm, + right=0mm, + width=\textwidth, + boxrule=0.5pt, + colupper=white, + colback=black, + spartan, + listing only, + listing options={style=commandline}, + breakable +} + +\newenvironment{reference}[2]{ % + \begin{textblock*}{\textwidth}(#1,#2) % + \rule{10cm}{0.5pt}\\ + \tiny\bgroup\color{black}}{\egroup % for the emulated + \end{textblock*}} + +\usepackage{hyperref} + + +\definecolor{darkgreen}{rgb}{0.0,0.5,0.0} + +\title[LoRa]{Breadboard logic} +\date{January 13th, 2020} + +\AfterPreamble{\hypersetup{ + urlcolor=blue, +}} + +\begin{document} + +\begin{frame} + \titlepage +\end{frame} + +% Uncomment these lines for an automatically generated outline. +\begin{frame}{Outline} + \tableofcontents +\end{frame} + + + +\section{Boolean logic} +\begin{frame}{Basic logic operation} +\begin{itemize} + \item Two states \textbf{TRUE} and \textbf{FALSE} + (also written as \textbf{1} and \textbf{0}) + \item Boolean logic describes logical operations + + \begin{minipage}{0.5\textwidth} + \item \textbf{NOT} + \begin{tabular}{c|c} + A & Y\\ + \hline + 0 & 1 \\ + 1 & 0 + \end{tabular} + \item \textbf{AND} + \begin{tabular}{cc|c} + A & B & Y\\ + \hline + 0 & 0 & 0 \\ + 1 & 0 & 0 \\ + 0 & 1 & 0 \\ + 1 & 1 & 1 \\ + \end{tabular} + \item \textbf{OR} + \begin{tabular}{cc|c} + A & B & Y\\ + \hline + 0 & 0 & 0 \\ + 1 & 0 & 1 \\ + 0 & 1 & 1 \\ + 1 & 1 & 1 \\ + \end{tabular} + \end{minipage}% + \begin{minipage}{0.5\textwidth} + \item \textbf{XOR} + \begin{tabular}{cc|c} + A & B & Y\\ + \hline + 0 & 0 & 0 \\ + 1 & 0 & 1 \\ + 0 & 1 & 1 \\ + 1 & 1 & 0 \\ + \end{tabular} + \item \textbf{NAND} + \begin{tabular}{cc|c} + A & B & Y\\ + \hline + 0 & 0 & 1 \\ + 1 & 0 & 1 \\ + 0 & 1 & 1 \\ + 1 & 1 & 0 \\ + \end{tabular} + \end{minipage} + \item In electronics boolean states are represented by different voltage levels, e.g.~\textbf{FALSE} = 0 V, \textbf{TRUE} = 5 V +\end{itemize} +\end{frame} + +\begin{frame}{Basic gate functionality with push buttons} +\begin{minipage}{0.3\textwidth} +% AND gate + \ctikzset{bipoles/resistor/height=.2} +\textbf{AND gate}\\ +\begin{circuitikz} + \draw (0,0) node[vcc](VCC){5 V}; + \draw (0,-3.5) node[pushbuttonshape,rotate=90](A) {\textbf{A}}; + \draw (0,-4.5) node[pushbuttonshape,rotate=90](B) {\textbf{B}}; + \draw (0,-1) node[](Y) {}; + \draw (0, -6) node[ground](GND) {}; + + \draw (VCC) to[R] (Y) to[empty led,name=OUT] (A.east) (A.west) -- (B.east) (B.west) -- (GND); + \node[left] at (OUT.south) {\textbf{Y}}; +\end{circuitikz} +\end{minipage}% +\begin{minipage}{0.3\textwidth} +\textbf{OR gate}\\ +\begin{circuitikz} + \draw (0,0) node[vcc](VCC){5 V}; + + \draw (-1, -3) node (TL) {}; + \draw (1, -3) node (TR) {}; + \draw ($(TL)!0.5!(TR)$) node (INT1) {}; + \draw (-1, -5) node (BL) {}; + \draw (1, -5) node (BR) {}; + \draw ($(BL)!0.5!(BR)$) node (INT2) {}; + + \node (Y) at ($(VCC)!0.5!(INT1)$) {}; + + \draw (0, -6) node[ground](GND) {}; + + \draw ($(TL)!0.5!(BL)$) node[pushbuttonshape,rotate=90](A) {\textbf{A}}; + \draw ($(TR)!0.5!(BR)$) node[pushbuttonshape,rotate=90](B) {\textbf{B}}; + + \draw (VCC) to [R] (Y) to[empty led, name=OUT] (INT1.center); + \draw (INT1.center) -- (TL.center); + \draw (INT1.center) -- (TR.center); + \draw (TL.center) -- (A) -- (BL.center); + \draw (TR.center) -- (B) -- (BR.center); + \draw (BR.center) -- (INT2.center); + \draw (BL.center) -- (INT2.center); + \draw (INT2.center) -- (GND); + + \node[left] at (OUT.south) {\textbf{Y}}; +\end{circuitikz} +\end{minipage} +\begin{minipage}{0.3\textwidth} + \textbf{NOT gate\\ (inverter)}\\ + \begin{circuitikz} + \draw (0,0) node[vcc](VCC){5 V}; + + \draw (-1, -3) node (TL) {}; + \draw (1, -3) node (TR) {}; + \draw ($(TL)!0.5!(TR)$) node (INT1) {}; + \draw (-1, -5) node (BL) {}; + \draw (1, -5) node (BR) {}; + \draw ($(BL)!0.5!(BR)$) node (INT2) {}; + + \draw (0, -6) node[ground](GND) {}; + + \draw ($(TL)!0.5!(BL)$) node[pushbuttonshape,rotate=90](A) {\textbf{A}}; + \draw ($(TR)!0.5!(BR)$) node[emptylediodeshape, rotate=-90](B) {}; + + \draw (VCC) to[R] (INT1.center); + \draw (INT1.center) -- (TL.center); + \draw (INT1.center) -- (TR.center); + \draw (TL.center) -- (A) -- (BL.center); + \draw (TR.center) -- (B) -- (BR.center); + \draw (BR.center) -- (INT2.center); + \draw (BL.center) -- (INT2.center); + \draw (INT2.center) -- (GND); + + \node[left] at (B.south) {\textbf{Y}}; + \end{circuitikz} +\end{minipage} +\end{frame} + +\begin{frame}{Breadboard} + \vspace{1cm} + \begin{overlayarea}{\textwidth}{\textheight} + \begin{flushleft} +\includegraphics[scale=0.45]{images/Breadboard.jpg}\\ +\includegraphics<2>[scale=0.5]{images/Breadboard-Pinout.png} + \end{flushleft} + \end{overlayarea} +\end{frame} + +\begin{frame}{Basic gates with transistors} + \begin{overlayarea}{\textwidth}{\textheight} +\textbf{AND gate}\\ +\begin{minipage}{0.4\textwidth} +\only<1>{ + \begin{circuitikz} + \draw (0,0) node[vcc](VCC){5 V}; + \draw (0,-3.5) node[pushbuttonshape,rotate=90](A) {\textbf{A}}; + \draw (0,-4.5) node[pushbuttonshape,rotate=90](B) {\textbf{B}}; + \draw (0,-1) node[](Y) {}; + \draw (0, -6) node[ground](GND) {}; + + \draw (VCC) to[R] (Y) to[empty led,name=OUT] (A.east) (A.west) -- (B.east) (B.west) -- (GND); + \node[left] at (OUT.south) {\textbf{Y}}; + \end{circuitikz} +} +\only<2>{ + \begin{circuitikz} + \draw (0,0) node[vcc](VCC){5 V}; + \draw (-3, -3) node (A) {}; + \draw (-3, -4.5) node (B) {}; + \draw (0,-3) node[npn](P1) {}; + \draw (0,-4.5) node[npn](P2) {}; + \draw (0, -5.5) node[ground](GND) {}; + + \draw (A) to[R,o-] (P1.B); + \draw (B) to[R,o-] (P2.B); + \draw (VCC) to[R] (0,-1.75) to[empty led, name=OUT] (P1.C) (P1.E) -- (P2.C) (P2.E) -- (GND); + \node[left] at (A) {\textbf{A}}; + \node[left] at (B) {\textbf{B}}; + \node[right] at (OUT.nw) {\textbf{Y}}; + \end{circuitikz} +} +\only<3->{ + \begin{circuitikz} + \draw (0,0) node[vcc](VCC){5 V}; + \draw (-3, -3) node (A) {}; + \draw (-3, -4.5) node (B) {}; + \draw (2, -1.75) node (Y) {}; + \draw (0,-3) node[npn](P1) {}; + \draw (0,-4.5) node[npn](P2) {}; + \draw (0, -5.5) node[ground](GND) {}; + + \draw (A) to[R,o-] (P1.B); + \draw (B) to[R,o-] (P2.B); + \draw (VCC) to[R] (0,-1.75) -- (P1.C) (P1.E) -- (P2.C) (P2.E) -- (GND); + \draw (0,-1.75) to[short,-o] (Y); + \node[left] at (A) {\textbf{A}}; + \node[left] at (B) {\textbf{B}}; + \node[right] at (Y) {\textbf{Y}}; + \end{circuitikz} +} +\end{minipage}% +\begin{minipage}{0.4\textwidth} + \vspace{3cm} + \only<4>{ + {Symbol}: + \begin{circuitikz} + \draw (0,0) node[and port] (AND) {}; + \draw (AND.in 1) ++ (-1,0) node (A) {}; + \draw (AND.in 2) ++ (-1,0) node (B) {}; + \draw (AND.out) ++ (1,0) node (Y) {}; + \draw (AND.in 1) to[short,-o] (A); + \draw (AND.in 2) to[short,-o] (B); + \draw (AND.out) to[short,-o] (Y); + + \node[left] at (A) {\textbf{A}}; + \node[left] at (B) {\textbf{B}}; + \node[right] at (Y) {\textbf{Y}}; + + \end{circuitikz} +} +\end{minipage} +\end{overlayarea} +\end{frame} +\begin{frame}{Basic gates with transistors} +\begin{minipage}{0.5\textwidth} + \textbf{OR gate}\\ + \begin{circuitikz} + \draw (0,0) node[vcc](VCC){5 V}; + + \draw (-1, -3) node (TL) {}; + \draw (1, -3) node (TR) {}; + \draw ($(TL)!0.5!(TR)$) node (INT1) {}; + \draw (-1, -5.5) node (BL) {}; + \draw (1, -5.5) node (BR) {}; + \draw ($(BL)!0.5!(BR)$) node (INT2) {}; + + \node (Y) at ($(VCC)!0.5!(INT1)$) {}; + + \draw (0, -6) node[ground](GND) {}; + + \draw ($(TL)!0.3!(BL)$) node[npn](P1) {}; + \draw ([xshift=-3cm]P1) node[] (A) {}; + + \draw ($(TR)!0.7!(BR)$) node[npn](P2) {}; + \draw ([xshift=-5cm]P2) node (B) {}; + + \draw (VCC) to [R] (Y) to[empty led, name=OUT] (INT1.center); + \draw (INT1.center) -- (TL.center); + \draw (INT1.center) -- (TR.center); + \draw (TL.center) -- (P1.C) (P1.E) -- (BL.center); + \draw (TR.center) -- (P2.C) (P2.E) -- (BR.center); + \draw (BR.center) -- (INT2.center); + \draw (BL.center) -- (INT2.center); + \draw (INT2.center) -- (GND); + \draw (A) to[R,o-] (P1.B); + \draw (B) to[R,o-] (P2.B); + + \node[left] at (A) {\textbf{A}}; + \node[left] at (B) {\textbf{B}}; + \node[left] at (OUT.south) {\textbf{Y}}; + \end{circuitikz} +\end{minipage} +\end{frame} + +\begin{frame} + +\begin{minipage}{0.5\textwidth} + \textbf{NOT gate\\ (inverter)}\\ + \begin{circuitikz} + \draw (0,0) node[vcc](VCC){5 V}; + + \draw (-1, -3) node (TL) {}; + \draw (1, -3) node (TR) {}; + \draw ($(TL)!0.5!(TR)$) node (INT1) {}; + \draw (-1, -5) node (BL) {}; + \draw (1, -5) node (BR) {}; + \draw ($(BL)!0.5!(BR)$) node (INT2) {}; + + \draw (0, -6) node[ground](GND) {}; + + \draw ($(TL)!0.5!(BL)$) node[npn](P1) {}; + \draw ([xshift=-3cm]P1) node[] (A) {}; + + \draw ($(TR)!0.5!(BR)$) node[emptylediodeshape, rotate=-90](B) {}; + + \draw (VCC) to[R] (INT1.center); + \draw (INT1.center) -- (TL.center); + \draw (INT1.center) -- (TR.center); + \draw (TL.center) -- (P1.C) (P1.E) -- (BL.center); + \draw (TR.center) -- (B) -- (BR.center); + \draw (BR.center) -- (INT2.center); + \draw (BL.center) -- (INT2.center); + \draw (INT2.center) -- (GND); + + \draw (A) to[R,o-] (P1.B); + \node[left] at (A) {\textbf{A}}; + \node[left] at (B.south) {\textbf{Y}}; + \end{circuitikz} +\end{minipage} +\end{frame} + +\begin{frame}{Building some gates with other gates} + content... +\end{frame} + +\section{What can we do with logic gates} +\begin{frame}{Binary addition} + Adding two bits\\ + can be implemented with one AND gate and one XOR gate +\end{frame} + +\begin{frame}{Full Adder} + content... +\end{frame} + +\begin{frame}{Building a N-bit adder} + Ripple carry adder +\end{frame} + +\begin{frame}{Memory} + S-R-Latch +\end{frame} + +\begin{frame}{Gated latch} + content... +\end{frame} + +\begin{frame}{D latch} + content... +\end{frame} + +\section{Latches and Flip-Flops} + +\begin{frame}{Building a N-bit shift register} + content... +\end{frame} + +\end{document}