Fitxer:4-bit Successive Approximation DAC.gif

El contingut de la pàgina no s'admet en altres llengües.
De la Viquipèdia, l'enciclopèdia lliure

Fitxer original(1.218 × 962 píxels, mida del fitxer: 303 Ko, tipus MIME: image/gif, en bucle, 60 fotogrames, 1 min 0 s)

Descripció a Commons

Resum

Descripció
English: The animation shows the bitwise approximation of an analog input value within a 4-bit ADC. The simulation is based on a reference voltage of 5V and several different input voltages in the range from 0V to 5V. The animation was created using TIKZ, beamer and XeLaTeX.
Data
Font Treball propi
 \begin{frame}{Successive Approximation -- example of a 4-bit ADC}
   \noindent\begin{tikzpicture}[x=0.05\textwidth,y=0.05\textwidth]
       \useasboundingbox (-6.5,-8.5) rectangle (13.5,6.5);
       \path(0,0) node[anchor=south west,inner sep=0pt](im){\includegraphics[width=.5\textwidth]{20191120_sar}};
       \path (0,5)node[anchor=east,blue]{$clk$};
       \path (-3,-7) coordinate(origo);
       \draw [black, very thick, -latex'] (origo) -- node[anchor=north]{\small\slshape\bfseries time} ++(10.5,0);
       \draw [black, very thick, -latex'] (origo) -- node[anchor=south,rotate=90]{\small\slshape\bfseries voltage} ++(0,6);

       %\grid{-10,-10}{14,10}
       %\draw[green] (-6.5,-8.5) rectangle (13.5,6.5);
       
       \path(7.5,-1)node[anchor=north west,inner sep=2pt,rounded corners=2mm,draw=black,fill=LemonChiffon1,text width=0.30\textwidth]{%
       \scriptsize         %
       \begin{tabular}{lr}
         \multicolumn{2}{c}{Resolution:}\\
         $\SI{5}{\volt}\times\sfrac{1}{2}$ & \SI{2.5000}{\volt}\\
         $\SI{5}{\volt}\times\sfrac{1}{4}$ & \SI{1.2500}{\volt}\\
         $\SI{5}{\volt}\times\sfrac{1}{8}$ & \SI{0.6250}{\volt}\\
         $\SI{5}{\volt}\times\sfrac{1}{16}$ & \SI{0.3125}{\volt}\\
         \dots & \\
         $\SI{5}{\volt}\times\sfrac{1}{1024}$ & \SI{0.0049}{\volt}\\
       \end{tabular}};

       \edef\vin{4.0}

       \foreach[count=\v,
         evaluate=\v as \startframe using int(1+6*(\v-1)),
         evaluate=\v as \lastframe using int(\startframe+5)]
         \vin in {0,0.5,1.0,1.3,2.0,2.6,3.0,4.0,4.5,5.0}%
       {
         \only<\startframe-\lastframe>{
           \path (0,1)node[anchor=east,Chartreuse4]{\scriptsize$V_{in}=\SI{\vin}{\volt}$};

           \draw [Chartreuse4,line width=0.3mm] ($(origo)+\vin*(0,1)$) -- ++(10,0)node[pos=-0.07,anchor=east]{\scriptsize$V_{in}=\SI{\vin}{\volt}$};
         }
         \foreach[%
            count=\i,%
            evaluate=\i as \frame using int(\startframe+\i),%
            remember=\val as \lastval (initially 0),%
            evaluate=\lastval as \vcmp using 5*(\lastval+\val)/16,%
            ]%
            \val in {8,4,2,1,0}
         {
           \pgfmathbin{16+\val+\lastval}
           \edef\bitstring{\pgfmathresult}
           \pgfmathsetmacro{\keep}{ifthenelse(\vin >= \vcmp,1,0)}

           \only<\frame-\lastframe>{%
               \draw [blue,line width=0.3mm] ($(origo)+\vcmp*(0,1)+{\i-1}*(2,0)$) -- ++(2,0)
                  node[pos=0.5,anchor=south,inner sep=2pt,fill=white,opacity=.7]{\tiny$\SI{\vcmp}{\volt}$}
                  node[pos=0.5,anchor=south,inner sep=2pt]{\tiny$\SI{\vcmp}{\volt}$}
                  node[pos=0.5,anchor=north,inner sep=2pt,fill=white,opacity=.7]{\tiny 0b\StrRight{\bitstring}{4}}
                  node[pos=0.5,anchor=north,inner sep=2pt]{\tiny 0b\StrRight{\bitstring}{4}};
           }
           \only<\lastframe>{%
               \ifthenelse{\equal{\val}{0}}%
               {
                 \path (im.south west) node[anchor=north west,inner sep=2pt,blue,rounded corners=1mm,fill=yellow!60]{\small result: 0b\StrRight{\bitstring}{4}\quad $V_{in} \approx \SI{\vcmp}{\volt}$};
               }%
           }
           \only<\frame>{%
             \foreach[count=\j,evaluate=\j as \x using 0.6*(\j-1)+1.5,evaluate=\j as \k using int(\j + 1)] \bit in {3,2,1,0}
             {
               \ifthenelse{\equal{\i}{\j}}%
               {
                 \path (\x,3.6) node[anchor=south,inner sep=0pt,red]{\StrChar{\bitstring}{\k}};
               }%
               {
                 \path (\x,3.6) node[anchor=south,inner sep=0pt,blue]{\StrChar{\bitstring}{\k}};
               }
             }
             \draw[blue,line width=.3mm] (5.5,2.3) -- (6,3.5)node[anchor=south west,inner sep=0pt,blue]{\scriptsize$V_{cmp}=\SI{\vcmp}{\volt}$};
             \ifthenelse{\equal{\val}{0}}%
             {}%
             {
               \ifthenelse{\equal{\keep}{1}}%
               {
                 \path (7.0,5.2)node[anchor=south,red]{\scriptsize$V_{in} >= V_{cmp}\,\,\Rightarrow\,\,$ keep bit};
               }
               {
                 \path (7.0,5.2)node[anchor=south,red]{\scriptsize$V_{in} < V_{cmp}\,\,\Rightarrow\,\,$ drop bit};
               }
             }
           }
           \pgfmathsetmacro{\val}{ifthenelse(\vin >= \vcmp,int(\lastval+\val),int(\lastval))}
         }
       }
     \end{tikzpicture}
 \end{frame}
Autor Uwezi

Llicència

Jo, el titular dels drets d'autor d'aquest treball, el public sota la següent llicència:
w:ca:Creative Commons
reconeixement compartir igual
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
Sou lliure de:
  • compartir – copiar, distribuir i comunicar públicament l'obra
  • adaptar – fer-ne obres derivades
Amb les condicions següents:
  • reconeixement – Heu de donar la informació adequada sobre l'autor, proporcionar un enllaç a la llicència i indicar si s'han realitzat canvis. Podeu fer-ho amb qualsevol mitjà raonable, però de cap manera no suggereixi que l'autor us dóna suport o aprova l'ús que en feu.
  • compartir igual – Si modifiqueu, transformeu, o generareu amb el material, haureu de distribuir les vostres contribucions sota una llicència similar o una de compatible com l'original

Llegendes

Afegeix una explicació d'una línia del que representa aquest fitxer

Elements representats en aquest fitxer

representa l'entitat

310.008 byte

60 segon

962 píxel

1.218 píxel

Historial del fitxer

Cliqueu una data/hora per veure el fitxer tal com era aleshores.

Data/horaMiniaturaDimensionsUsuari/aComentari
actual18:05, 21 nov 2019Miniatura per a la versió del 18:05, 21 nov 20191.218 × 962 (303 Ko)UweziUser created page with UploadWizard

La pàgina següent utilitza aquest fitxer:

Ús global del fitxer

Utilització d'aquest fitxer en altres wikis: