<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7313231459909421467</id><updated>2024-09-01T02:57:40.054-07:00</updated><title type='text'>AVR tutorial in C</title><subtitle type='html'>avr tutorial and avr projects with all testing.......... &#xa;we are using avr studio ............</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://anibhaskar.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7313231459909421467/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://anibhaskar.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12437203074866629318</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>21</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7313231459909421467.post-2595559890406042650</id><published>2014-01-06T20:53:00.001-08:00</published><updated>2014-01-06T20:53:45.542-08:00</updated><title type='text'>Real men don&#39;t use backups, they post their stuff on a public ftp server and let the rest of the world make copies.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://anibhaskar.blogspot.com/feeds/2595559890406042650/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://anibhaskar.blogspot.com/2014/01/real-men-dont-use-backups-they-post.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7313231459909421467/posts/default/2595559890406042650'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7313231459909421467/posts/default/2595559890406042650'/><link rel='alternate' type='text/html' href='http://anibhaskar.blogspot.com/2014/01/real-men-dont-use-backups-they-post.html' title='Real men don&#39;t use backups, they post their stuff on a public ftp server and let the rest of the world make copies.'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12437203074866629318</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7313231459909421467.post-8424293855658109205</id><published>2013-12-09T21:23:00.001-08:00</published><updated>2013-12-09T21:23:46.941-08:00</updated><title type='text'>RFID interface with Raspberry Pi </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b&gt;Simple python script for rfid interface with raspberry pi&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
import serial&lt;br /&gt;
&lt;br /&gt;
ser = serial.Serial(&#39;/dev/ttyAMA0&#39;, 9600, timeout=1)&lt;br /&gt;
&lt;br /&gt;
while True:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; string = ser.read(12)&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if len(string) == 0:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print &quot;Please insert a tag&quot;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; else:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string = string[1:11]&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if string == &#39;650033A2E5&#39;:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print &quot;hello bhakasr&quot;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; elif string == &#39;650033758D&#39;:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print &quot;Hi&quot;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; elif string == &#39;6500337221&#39;:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print &quot;Why so serious....&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print &quot;go home you are drunk&quot;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://anibhaskar.blogspot.com/feeds/8424293855658109205/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://anibhaskar.blogspot.com/2013/12/rfid-interface-with-raspberry-pi.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7313231459909421467/posts/default/8424293855658109205'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7313231459909421467/posts/default/8424293855658109205'/><link rel='alternate' type='text/html' href='http://anibhaskar.blogspot.com/2013/12/rfid-interface-with-raspberry-pi.html' title='RFID interface with Raspberry Pi '/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12437203074866629318</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7313231459909421467.post-156589325508812348</id><published>2013-07-22T01:42:00.000-07:00</published><updated>2013-07-22T01:44:09.878-07:00</updated><title type='text'>Toradex</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcrcLCVrqk1NnPwqI9JithsDHZ43U6oJY-V4_vPYXUy54hVO_iyfLn-b-_GKH8tjJfiPGS5EsKFdAuiJ4OUw5zJdNXx3Zjm5q3SFl8PkzBLxjJM6dH79OIIEd9WMYPXWyGwXGyqYr347Q/s1600/toradex.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcrcLCVrqk1NnPwqI9JithsDHZ43U6oJY-V4_vPYXUy54hVO_iyfLn-b-_GKH8tjJfiPGS5EsKFdAuiJ4OUw5zJdNXx3Zjm5q3SFl8PkzBLxjJM6dH79OIIEd9WMYPXWyGwXGyqYr347Q/s1600/toradex.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://anibhaskar.blogspot.com/feeds/156589325508812348/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://anibhaskar.blogspot.com/2013/07/toradex.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7313231459909421467/posts/default/156589325508812348'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7313231459909421467/posts/default/156589325508812348'/><link rel='alternate' type='text/html' href='http://anibhaskar.blogspot.com/2013/07/toradex.html' title='Toradex'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12437203074866629318</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcrcLCVrqk1NnPwqI9JithsDHZ43U6oJY-V4_vPYXUy54hVO_iyfLn-b-_GKH8tjJfiPGS5EsKFdAuiJ4OUw5zJdNXx3Zjm5q3SFl8PkzBLxjJM6dH79OIIEd9WMYPXWyGwXGyqYr347Q/s72-c/toradex.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7313231459909421467.post-2349122943762741512</id><published>2013-05-31T02:35:00.000-07:00</published><updated>2013-05-31T02:35:14.497-07:00</updated><title type='text'>Image Processing (Image Crop and Zoom) </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
clc;&lt;br /&gt;
close all;&lt;br /&gt;
clear all;&lt;br /&gt;
workspace; % Display workspace panel.&lt;br /&gt;
% Read in standard MATLAB demo image.&lt;br /&gt;
%%% select a image&lt;br /&gt;
global filename path;&lt;br /&gt;
[filename,path] = uigetfile(&#39;D:\*.jpg,*.JPG,*.jpeg,*.JPEG&#39;);&lt;br /&gt;
&lt;br /&gt;
tmp = strcat(path, &#39;\&#39;, filename);&lt;br /&gt;
IMG = imread(tmp);&lt;br /&gt;
figure,imshow(IMG);&lt;br /&gt;
&lt;br /&gt;
Image =IMG;&lt;br /&gt;
subplot(2, 2, 1);&lt;br /&gt;
imshow(Image, []);&lt;br /&gt;
title(&#39;Original Image&#39;);&lt;br /&gt;
set(gcf, &#39;Position&#39;, get(0,&#39;Screensize&#39;)); % Maximize figure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
croppedImage = imcrop(Image);&lt;br /&gt;
% Restore title that got blown away.&lt;br /&gt;
title(&#39;Original cropped Image&#39;);&lt;br /&gt;
subplot(2, 2, 2);&lt;br /&gt;
imshow(croppedImage, []);&lt;br /&gt;
title(&#39;Original Image&#39;);&lt;br /&gt;
&lt;br /&gt;
% Write croppe image out to disk.&lt;br /&gt;
imwrite(croppedImage, &#39;cropped_Image.bmp&#39;);&lt;br /&gt;
&lt;br /&gt;
% Read it back in again to test it.&lt;br /&gt;
recalledImage = imread(&#39;cropped_Image.bmp&#39;);&lt;br /&gt;
subplot(2, 2, 3);&lt;br /&gt;
imshow(recalledImage, []);&lt;br /&gt;
title(&#39;Cropped Image recaled from disk&#39;);&lt;br /&gt;
&lt;br /&gt;
% Resize it to 1024 by 1024 and display it.&lt;br /&gt;
croppedImage = imresize (croppedImage, [1024 1024]);&lt;br /&gt;
subplot(2, 2, 4);&lt;br /&gt;
imshow(croppedImage, []);&lt;br /&gt;
title(&#39;Cropped Image sized to 1024 by 1024&#39;);&lt;br /&gt;
%uiwait(msgbox(&#39;See - it worked fine!&#39;));&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://anibhaskar.blogspot.com/feeds/2349122943762741512/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://anibhaskar.blogspot.com/2013/05/image-processing-image-crop-and-zoom.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7313231459909421467/posts/default/2349122943762741512'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7313231459909421467/posts/default/2349122943762741512'/><link rel='alternate' type='text/html' href='http://anibhaskar.blogspot.com/2013/05/image-processing-image-crop-and-zoom.html' title='Image Processing (Image Crop and Zoom) '/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12437203074866629318</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7313231459909421467.post-248653302755678343</id><published>2013-04-22T03:35:00.002-07:00</published><updated>2013-04-22T06:09:45.873-07:00</updated><title type='text'>Magnetic Levitation Using Opamp</title><content type='html'>&lt;h2&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt; Magnetic Levitation Using Op-amp&lt;/span&gt;&lt;/h2&gt;
&lt;br /&gt;
This
is a simple magnetic
levitator
which suspends objects a set distance below an electromagnet. The
physics behind it is to simply provide a magnetic force which equal and
opposite to the gravitational force on the object. The two forces
cancel and the object remains suspended. Practically this is done by a
circuit which reduces
electromagnet force when an object gets to close, and increases it
when the object is out of range.&lt;br /&gt;
&lt;img alt=&quot;http://uzzors2k.4hv.org/projectfiles/magneticlevitator/Magnetic%20Levitator%20circuit.GIF&quot; class=&quot;decoded&quot; src=&quot;http://uzzors2k.4hv.org/projectfiles/magneticlevitator/Magnetic%20Levitator%20circuit.GIF&quot; height=&quot;571&quot; style=&quot;cursor: -moz-zoom-in;&quot; width=&quot;843&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
This
circuit works by comparing the
signals from the sensors with the first op-amp and sending out a
voltage proportional to the
difference or &quot;error&quot;. The error signal is then sent through
a
compensation network which acts a high-pass filter, allowing quick
changes in error to pass easier than slow changes. This is required to
stabilize the control loop, and without it objects would just
flutter close to the electromagnet due to the system being unstable.&lt;br /&gt;
&lt;br /&gt;
The top
detector is a reference detector and the bottom one senses when an
object is in levitating position. The object detector must be level
with the IR LED. The reference detector must see the IR diode at all
times, even when levitating an
object. The electromagnet should have maximum
15 ohms of resistance, any more and it will not be able to lift
anything. Too little resistance and the transistor will have problems
regulating electromagnet current and will also dissipate more heat.
When constructing an electromagnet there are
two things to remember. Magnetic force is proportional to the number of
turns and current. So when using copper wire the magnetic force is
roughly proportional to the square of the power dissipated in it, for
all practical use. In my coil I used 70 meters of 0.45mm magnet wire.
The coil
can be wound on almost any
ferrous metal rod if you&#39;re not concerned with efficiency. Remember
that keeping the surface area of the&amp;nbsp;face small will keep the
object
centered better. Constructing the circuit correctly is easiest if built
in two parts; part 1 with the detectors and first op-amp to
make sure the output swings when an object is put in the beam, and
then part 2 with the rest. This way it will be much easier to
troubleshoot.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.youtube.com/watch?v=wZE533TFO3w&quot;&gt;https://www.youtube.com/watch?v=wZE533TFO3w&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://anibhaskar.blogspot.com/feeds/248653302755678343/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://anibhaskar.blogspot.com/2013/04/magnetic-levitation-using-opamp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7313231459909421467/posts/default/248653302755678343'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7313231459909421467/posts/default/248653302755678343'/><link rel='alternate' type='text/html' href='http://anibhaskar.blogspot.com/2013/04/magnetic-levitation-using-opamp.html' title='Magnetic Levitation Using Opamp'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12437203074866629318</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7313231459909421467.post-4888236038393129968</id><published>2013-04-10T21:44:00.000-07:00</published><updated>2013-04-10T21:44:50.444-07:00</updated><title type='text'>Transistor Circuits &amp; Transistor Behavior </title><content type='html'>&lt;a href=&quot;http://www.challenge.toradex.com/projects/10014-wireless-power-transmission&quot;&gt;http://www.challenge.toradex.com/projects/10014-wireless-power-transmission&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h1&gt;
&lt;br /&gt;
Transistor Circuits
&lt;/h1&gt;
&lt;br /&gt;
&lt;h2&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7313231459909421467&quot; name=&quot;SECTION00041000000000000000&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7313231459909421467&quot; name=&quot;sec:ebersmoll&quot;&gt;&lt;/a&gt;
&lt;br /&gt;
Transistor Behavior
&lt;/h2&gt;
The Ebers-Moll equation describes the relationship between the
collector current &lt;img align=&quot;MIDDLE&quot; alt=&quot;$I_C$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img74.gif&quot; height=&quot;30&quot; width=&quot;20&quot; /&gt; and the voltage drop from base to emitter
&lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{BE}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img75.gif&quot; height=&quot;30&quot; width=&quot;32&quot; /&gt; by
&lt;br /&gt;
&lt;br /&gt;
&lt;div align=&quot;RIGHT&quot;&gt;
&lt;table align=&quot;CENTER&quot; style=&quot;width: 100%px;&quot;&gt;
&lt;tbody&gt;
&lt;tr valign=&quot;MIDDLE&quot;&gt;&lt;td align=&quot;CENTER&quot; nowrap=&quot;nowrap&quot;&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7313231459909421467&quot; name=&quot;eq:E-M&quot;&gt;&lt;/a&gt;&lt;img alt=&quot;\begin{displaymath}
I_C = I_o (e^{\frac{eV_{BE}}{kT}} - 1)
\end{displaymath}&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img76.gif&quot; height=&quot;29&quot; width=&quot;132&quot; /&gt;&lt;/td&gt;
&lt;td align=&quot;RIGHT&quot; width=&quot;10&quot;&gt;(3)&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
where &lt;img align=&quot;MIDDLE&quot; alt=&quot;$I_o$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img77.gif&quot; height=&quot;30&quot; width=&quot;17&quot; /&gt; is the reverse leakage current from the emitter to the
base, 
&lt;img align=&quot;MIDDLE&quot; alt=&quot;$e = 1.6 \times 10^{-19}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img78.gif&quot; height=&quot;34&quot; width=&quot;112&quot; /&gt;&amp;nbsp;C is the elementary unit of charge, 
&lt;img align=&quot;MIDDLE&quot; alt=&quot;$k
= 1.38 \times 10^{-23}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img79.gif&quot; height=&quot;34&quot; width=&quot;122&quot; /&gt;&amp;nbsp;J/K is the Boltzmann constant, and &lt;img align=&quot;BOTTOM&quot; alt=&quot;$T$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img80.gif&quot; height=&quot;15&quot; width=&quot;15&quot; /&gt; is the
absolute temperature (in Kelvin). With typical doping levels, the
leakage current arising from the ``intrinsic&#39;&#39; behavior of the pure
semiconductor is very small, and the second term (-&lt;img align=&quot;MIDDLE&quot; alt=&quot;$I_o$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img77.gif&quot; height=&quot;30&quot; width=&quot;17&quot; /&gt;) is
negligible, giving a simple exponential dependence of &lt;img align=&quot;MIDDLE&quot; alt=&quot;$I_C$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img74.gif&quot; height=&quot;30&quot; width=&quot;20&quot; /&gt; on
&lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{BE}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img75.gif&quot; height=&quot;30&quot; width=&quot;32&quot; /&gt;. 



&lt;br /&gt;
&lt;h3&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7313231459909421467&quot; name=&quot;SECTION00041100000000000000&quot;&gt;
Assignment&lt;/a&gt;
&lt;/h3&gt;
&lt;div align=&quot;CENTER&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7313231459909421467&quot; name=&quot;fig:ebersmoll&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7313231459909421467&quot; name=&quot;1127&quot;&gt;&lt;/a&gt;

&lt;table&gt;
&lt;caption align=&quot;BOTTOM&quot;&gt;&lt;b&gt;Figure 13:&lt;/b&gt;
A circuit for measuring the current
voltage relationship of an npn junction transistor (for testing the
Ebers-Moll equation).&lt;/caption&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;div align=&quot;CENTER&quot;&gt;
&lt;img align=&quot;BOTTOM&quot; alt=&quot;\includegraphics{lab3-ebersmoll.eps}&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img81.gif&quot; height=&quot;253&quot; width=&quot;337&quot; /&gt;

&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Construct the circuit of Figure&amp;nbsp;&lt;a href=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/node4.html#fig:ebersmoll&quot;&gt;13&lt;/a&gt;. The
5&amp;nbsp;k&lt;img align=&quot;BOTTOM&quot; alt=&quot;$\Omega $&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img3.gif&quot; height=&quot;15&quot; width=&quot;15&quot; /&gt; potentiometer acts as a variable voltage divider allowing
you to vary the voltage across the base emitter junction. The
Ebers-Moll equation suggests an exponential dependence of the current
flowing from the collector to the emitter on &lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{BE}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img75.gif&quot; height=&quot;30&quot; width=&quot;32&quot; /&gt;. Measure the
voltage drops across the 100&amp;nbsp;&lt;img align=&quot;BOTTOM&quot; alt=&quot;$\Omega $&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img3.gif&quot; height=&quot;15&quot; width=&quot;15&quot; /&gt; and 1&amp;nbsp;k&lt;img align=&quot;BOTTOM&quot; alt=&quot;$\Omega $&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img3.gif&quot; height=&quot;15&quot; width=&quot;15&quot; /&gt; resistors to
deduce &lt;img align=&quot;MIDDLE&quot; alt=&quot;$I_C$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img74.gif&quot; height=&quot;30&quot; width=&quot;20&quot; /&gt; and &lt;img align=&quot;MIDDLE&quot; alt=&quot;$I_E$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img82.gif&quot; height=&quot;30&quot; width=&quot;20&quot; /&gt; for various values of &lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{BE}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img75.gif&quot; height=&quot;30&quot; width=&quot;32&quot; /&gt;. Note that
&lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{BE}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img75.gif&quot; height=&quot;30&quot; width=&quot;32&quot; /&gt; is &lt;i&gt;not&lt;/i&gt; the voltage drop from the base to ground in
this circuit. Start with small values of &lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{BE}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img75.gif&quot; height=&quot;30&quot; width=&quot;32&quot; /&gt;, and do not allow
&lt;img align=&quot;MIDDLE&quot; alt=&quot;$I_C$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img74.gif&quot; height=&quot;30&quot; width=&quot;20&quot; /&gt; or &lt;img align=&quot;MIDDLE&quot; alt=&quot;$I_E$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img82.gif&quot; height=&quot;30&quot; width=&quot;20&quot; /&gt; to exceed 5&amp;nbsp;mA.


&lt;/li&gt;
&lt;li&gt;Using your data, produce a graph of &lt;img align=&quot;MIDDLE&quot; alt=&quot;$ln(I_C)$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img83.gif&quot; height=&quot;32&quot; width=&quot;48&quot; /&gt; vs. &lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{BE}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img75.gif&quot; height=&quot;30&quot; width=&quot;32&quot; /&gt;, and
compare it with the behavior predicted by the Ebers-Moll equation.


&lt;/li&gt;
&lt;li&gt;Use the Ebers-Moll equation and your data to determine values of
the leakage current &lt;img align=&quot;MIDDLE&quot; alt=&quot;$I_o$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img77.gif&quot; height=&quot;30&quot; width=&quot;17&quot; /&gt; and the temperature of your
transistor. Comment on whether you think the Ebers-Moll equation is a
good model.


&lt;/li&gt;
&lt;li&gt;Also use your data to determine an approximate value of 
&lt;img align=&quot;MIDDLE&quot; alt=&quot;$\beta =
\frac{I_C}{I_B}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img84.gif&quot; height=&quot;36&quot; width=&quot;53&quot; /&gt; for your transistor. The base current is simply 
&lt;img align=&quot;MIDDLE&quot; alt=&quot;$I_B
= I_E - I_C$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img85.gif&quot; height=&quot;30&quot; width=&quot;97&quot; /&gt;.
&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;h2&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7313231459909421467&quot; name=&quot;SECTION00042000000000000000&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7313231459909421467&quot; name=&quot;sec:switch&quot;&gt;&lt;/a&gt;
&lt;br /&gt;
Transistor Switch
&lt;/h2&gt;
&lt;br /&gt;
&lt;div align=&quot;CENTER&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7313231459909421467&quot; name=&quot;fig:switch&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7313231459909421467&quot; name=&quot;1128&quot;&gt;&lt;/a&gt;

&lt;table&gt;
&lt;caption align=&quot;BOTTOM&quot;&gt;&lt;b&gt;Figure 14:&lt;/b&gt;
Transistor switch circuit.&lt;/caption&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;div align=&quot;CENTER&quot;&gt;
&lt;img align=&quot;BOTTOM&quot; alt=&quot;\includegraphics{lab3-switch.eps}&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img86.gif&quot; height=&quot;194&quot; width=&quot;175&quot; /&gt;

&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
The circuit shown in Figure&amp;nbsp;&lt;a href=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/node4.html#fig:switch&quot;&gt;14&lt;/a&gt; implements a transistor
as a switch controlling power delivered to the ``load&#39;&#39; &lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_C$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img87.gif&quot; height=&quot;30&quot; width=&quot;25&quot; /&gt;. 
With a proper choice of &lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_B$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img88.gif&quot; height=&quot;30&quot; width=&quot;26&quot; /&gt;, closing the mechanical switch drives a
large enough base current that the current flowing through the
collector resistor forces the voltage of the collector below 
that of the base. That is, the collector current produces a voltage
drop across &lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_C$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img87.gif&quot; height=&quot;30&quot; width=&quot;25&quot; /&gt; of about 5&amp;nbsp;V. The collector voltage
is very close to the emitter (ground in this case), and the right
branch of the circuit behaves as if the collector is grounded. In this
state, called &lt;b&gt;saturation&lt;/b&gt;, increasing the base current can
produce no further increase in the collector current, because &lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_C$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img87.gif&quot; height=&quot;30&quot; width=&quot;25&quot; /&gt;,
not the transistor, is limiting the current. The Ebers-Moll equation 
and the rough rule 
&lt;img align=&quot;MIDDLE&quot; alt=&quot;$I_C = \beta I_B$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img89.gif&quot; height=&quot;31&quot; width=&quot;70&quot; /&gt; do not apply here.  Opening 
the switch brings &lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{BE}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img75.gif&quot; height=&quot;30&quot; width=&quot;32&quot; /&gt; below 0.6&amp;nbsp;V, and the transistor shuts off
power to the load.

&lt;br /&gt;
In designing the circuit, let us assume that &lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_C =
1$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img90.gif&quot; height=&quot;30&quot; width=&quot;56&quot; /&gt;&amp;nbsp;k&lt;img align=&quot;BOTTOM&quot; alt=&quot;$\Omega $&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img3.gif&quot; height=&quot;15&quot; width=&quot;15&quot; /&gt;. (Perhaps we know that this is the resistance of the load
we would like to switch, or perhaps we want to limit the collector
current to 
&lt;img align=&quot;MIDDLE&quot; alt=&quot;$5\textrm{V}/1\textrm{k}\Omega = 5$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img91.gif&quot; height=&quot;32&quot; width=&quot;91&quot; /&gt;&amp;nbsp;mA.)  Within these
constraints, we need to choose an appropriate value of &lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_B$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img88.gif&quot; height=&quot;30&quot; width=&quot;26&quot; /&gt; to
produce the behavior outlined above.  Assuming &lt;img align=&quot;MIDDLE&quot; alt=&quot;$\beta = 100$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img92.gif&quot; height=&quot;31&quot; width=&quot;60&quot; /&gt; for the
transistor, we need a base current of at least 0.05&amp;nbsp;mA to saturate the
transistor and drive maximal current through &lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_C$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img87.gif&quot; height=&quot;30&quot; width=&quot;25&quot; /&gt;. The maximal value
of &lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_B$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img88.gif&quot; height=&quot;30&quot; width=&quot;26&quot; /&gt; is then 
&lt;img align=&quot;MIDDLE&quot; alt=&quot;$5\textrm{V}/0.05\textrm{mA} =
100$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img93.gif&quot; height=&quot;32&quot; width=&quot;133&quot; /&gt;&amp;nbsp;k&lt;img align=&quot;BOTTOM&quot; alt=&quot;$\Omega $&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img3.gif&quot; height=&quot;15&quot; width=&quot;15&quot; /&gt;. However, it is important to be conservative, because
we cannot depend on a particular &lt;img align=&quot;MIDDLE&quot; alt=&quot;$\beta$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img94.gif&quot; height=&quot;31&quot; width=&quot;13&quot; /&gt; value. A transistor operating
in saturation is not sensitive to excess base current, so we can
safely use a base resistor much smaller than our upper limit.

&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7313231459909421467&quot; name=&quot;SECTION00042100000000000000&quot;&gt;
Assignment&lt;/a&gt;
&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Construct the circuit of Figure&amp;nbsp;&lt;a href=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/node4.html#fig:switch&quot;&gt;14&lt;/a&gt; using &lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_C =
1$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img90.gif&quot; height=&quot;30&quot; width=&quot;56&quot; /&gt;&amp;nbsp;k&lt;img align=&quot;BOTTOM&quot; alt=&quot;$\Omega $&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img3.gif&quot; height=&quot;15&quot; width=&quot;15&quot; /&gt; and &lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_B = 10$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img95.gif&quot; height=&quot;30&quot; width=&quot;64&quot; /&gt;&amp;nbsp;k&lt;img align=&quot;BOTTOM&quot; alt=&quot;$\Omega $&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img3.gif&quot; height=&quot;15&quot; width=&quot;15&quot; /&gt;. 


&lt;/li&gt;
&lt;li&gt;Verify that the circuit behaves as advertised in the above design
discussion. That is, measure the voltage drops across &lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_B$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img88.gif&quot; height=&quot;30&quot; width=&quot;26&quot; /&gt; and &lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_C$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img87.gif&quot; height=&quot;30&quot; width=&quot;25&quot; /&gt;
with the switch in ``on&#39;&#39; and ``off&#39;&#39; positions. Also measure the
voltage difference between the collector and emitter in these two
states. Comment on your observations.
&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;h2&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7313231459909421467&quot; name=&quot;SECTION00043000000000000000&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7313231459909421467&quot; name=&quot;sec:NOT&quot;&gt;&lt;/a&gt;
&lt;br /&gt;
Logical NOT Gate
&lt;/h2&gt;
&lt;br /&gt;
&lt;div align=&quot;CENTER&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7313231459909421467&quot; name=&quot;fig:inverter&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7313231459909421467&quot; name=&quot;1129&quot;&gt;&lt;/a&gt;

&lt;table&gt;
&lt;caption align=&quot;BOTTOM&quot;&gt;&lt;b&gt;Figure 15:&lt;/b&gt;
Logical inverter (NOT gate) circuit.&lt;/caption&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;div align=&quot;CENTER&quot;&gt;
&lt;img align=&quot;BOTTOM&quot; alt=&quot;\includegraphics{lab3-inverter.eps}&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img96.gif&quot; height=&quot;222&quot; width=&quot;217&quot; /&gt;

&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
The circuit of Figure&amp;nbsp;&lt;a href=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/node4.html#fig:inverter&quot;&gt;15&lt;/a&gt; is identical in form to the
switch circuit of Section&amp;nbsp;&lt;a href=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/node4.html#sec:switch&quot;&gt;3.2&lt;/a&gt;, except that we consider
the behavior of the circuit as a logic gate with input and output
terminals labelled with &lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{in}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img10.gif&quot; height=&quot;30&quot; width=&quot;24&quot; /&gt; and &lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{out}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img9.gif&quot; height=&quot;30&quot; width=&quot;30&quot; /&gt; in the figure. When
&lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{in}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img10.gif&quot; height=&quot;30&quot; width=&quot;24&quot; /&gt; is above about 0.6&amp;nbsp;V, the base current turns on, significant
current flows through &lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_C$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img87.gif&quot; height=&quot;30&quot; width=&quot;25&quot; /&gt;, and &lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{out}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img9.gif&quot; height=&quot;30&quot; width=&quot;30&quot; /&gt; drops. Conversely, when
&lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{in}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img10.gif&quot; height=&quot;30&quot; width=&quot;24&quot; /&gt; drops below 0.6&amp;nbsp;V, the base and collector currents are zero,
the voltage drop across &lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_C$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img87.gif&quot; height=&quot;30&quot; width=&quot;25&quot; /&gt; is zero, and &lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{out}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img9.gif&quot; height=&quot;30&quot; width=&quot;30&quot; /&gt; is 5&amp;nbsp;V. Hence,
this circuit inverts its input, at least in the crude sense that when
&lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{in}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img10.gif&quot; height=&quot;30&quot; width=&quot;24&quot; /&gt; is high, &lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{out}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img9.gif&quot; height=&quot;30&quot; width=&quot;30&quot; /&gt; is low and vice versa.

&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7313231459909421467&quot; name=&quot;SECTION00043100000000000000&quot;&gt;
Assignment&lt;/a&gt;
&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Construct the circuit of Figure&amp;nbsp;&lt;a href=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/node4.html#fig:inverter&quot;&gt;15&lt;/a&gt; using &lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_C =
1$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img90.gif&quot; height=&quot;30&quot; width=&quot;56&quot; /&gt;&amp;nbsp;k&lt;img align=&quot;BOTTOM&quot; alt=&quot;$\Omega $&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img3.gif&quot; height=&quot;15&quot; width=&quot;15&quot; /&gt;. Produce a graph of &lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{out}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img9.gif&quot; height=&quot;30&quot; width=&quot;30&quot; /&gt; vs. &lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{in}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img10.gif&quot; height=&quot;30&quot; width=&quot;24&quot; /&gt; covering
values of &lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{in}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img10.gif&quot; height=&quot;30&quot; width=&quot;24&quot; /&gt; in the range 0-5&amp;nbsp;V for both &lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_B = 10$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img95.gif&quot; height=&quot;30&quot; width=&quot;64&quot; /&gt;&amp;nbsp;k&lt;img align=&quot;BOTTOM&quot; alt=&quot;$\Omega $&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img3.gif&quot; height=&quot;15&quot; width=&quot;15&quot; /&gt;
and &lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_B = 100$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img97.gif&quot; height=&quot;30&quot; width=&quot;72&quot; /&gt;&amp;nbsp;k&lt;img align=&quot;BOTTOM&quot; alt=&quot;$\Omega $&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img3.gif&quot; height=&quot;15&quot; width=&quot;15&quot; /&gt;.


&lt;/li&gt;
&lt;li&gt;The TTL (Transistor-Transistor Logic) digital logic standard
assigns voltages in the range 0-0.8&amp;nbsp;V the value 0 or ``false&#39;&#39; and
voltages in the range 2.0-5&amp;nbsp;V the value 1 or ``true.&#39;&#39;  Drive the
circuit with a square pulse signal alternating between 0&amp;nbsp;V and 5&amp;nbsp;V
(not between -2.5&amp;nbsp;V and +2,5&amp;nbsp;V). You will need to use the DC offset
knob on the function generator to produce this signal. Based on this
observation and your graph of the transfer function of the circuit,
comment on the extent to which this device behaves like a logical
inverter, or NOT gate, with the truth table:



&lt;div align=&quot;CENTER&quot;&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;3&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td align=&quot;CENTER&quot; colspan=&quot;2&quot;&gt;&lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{in}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img10.gif&quot; height=&quot;30&quot; width=&quot;24&quot; /&gt;&lt;/td&gt;
&lt;td align=&quot;CENTER&quot; colspan=&quot;2&quot;&gt;&lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{out}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img9.gif&quot; height=&quot;30&quot; width=&quot;30&quot; /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;CENTER&quot;&gt;0-0.8&amp;nbsp;V&lt;/td&gt;
&lt;td align=&quot;CENTER&quot;&gt;``false&#39;&#39;&lt;/td&gt;
&lt;td align=&quot;CENTER&quot;&gt;2.4-5&amp;nbsp;V&lt;/td&gt;
&lt;td align=&quot;CENTER&quot;&gt;``true&#39;&#39;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;CENTER&quot;&gt;2.0-5&amp;nbsp;V&lt;/td&gt;
&lt;td align=&quot;CENTER&quot;&gt;``true&#39;&#39;&lt;/td&gt;
&lt;td align=&quot;CENTER&quot;&gt;0-0.4&amp;nbsp;V&lt;/td&gt;
&lt;td align=&quot;CENTER&quot;&gt;``false&#39;&#39;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
Which of the two values of &lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_B$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img88.gif&quot; height=&quot;30&quot; width=&quot;26&quot; /&gt; is better for this application? Explain.

&lt;br /&gt;

&lt;/li&gt;
&lt;li&gt;Construct Spice simulations for comparison with your
measurements. You will need to include the following &lt;tt&gt;.MODEL&lt;/tt&gt; 
statement for a generic npn bipolar junction transistor (with &lt;img align=&quot;MIDDLE&quot; alt=&quot;$\beta = 100$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img92.gif&quot; height=&quot;31&quot; width=&quot;60&quot; /&gt;) in your circuit file. &lt;pre&gt;.MODEL Qnpn NPN(BF=100)
&lt;/pre&gt;
You can then specify transistors with statements of the form&lt;pre&gt;[Name] [C] [B] [E] Qnpn
&lt;/pre&gt;
where the &lt;tt&gt;[C]&lt;/tt&gt;, &lt;tt&gt;[B]&lt;/tt&gt;, and &lt;tt&gt;[E]&lt;/tt&gt; entries
identify the collector, base, and emitter nodes, respectively.
&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;h2&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7313231459909421467&quot; name=&quot;SECTION00044000000000000000&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7313231459909421467&quot; name=&quot;sec:ceamp&quot;&gt;&lt;/a&gt;
&lt;br /&gt;
Common Emitter Amplifier
&lt;/h2&gt;
Transistors are used in amplifiers that amplify voltage and
current. Our first amplifier is a voltage amplifier called a
&lt;b&gt;common emitter amplifier&lt;/b&gt; for which a change in input voltage
&lt;img align=&quot;MIDDLE&quot; alt=&quot;$\Delta V_{in}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img98.gif&quot; height=&quot;30&quot; width=&quot;38&quot; /&gt; leads to a change in output voltage 
&lt;img align=&quot;MIDDLE&quot; alt=&quot;$\Delta V_{out}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img99.gif&quot; height=&quot;30&quot; width=&quot;44&quot; /&gt;
linearly proportional to &lt;img align=&quot;MIDDLE&quot; alt=&quot;$\Delta V_{in}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img98.gif&quot; height=&quot;30&quot; width=&quot;38&quot; /&gt;, 
&lt;br /&gt;
&lt;div align=&quot;RIGHT&quot;&gt;
&lt;table align=&quot;CENTER&quot; style=&quot;width: 100%px;&quot;&gt;
&lt;tbody&gt;
&lt;tr valign=&quot;MIDDLE&quot;&gt;&lt;td align=&quot;CENTER&quot; nowrap=&quot;nowrap&quot;&gt;&lt;img alt=&quot;\begin{displaymath}
\Delta V_{out} = A_v \Delta V_{in}
\end{displaymath}&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img100.gif&quot; height=&quot;27&quot; width=&quot;117&quot; /&gt;&lt;/td&gt;
&lt;td align=&quot;RIGHT&quot; width=&quot;10&quot;&gt;(4)&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
where &lt;img align=&quot;MIDDLE&quot; alt=&quot;$A_v$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img101.gif&quot; height=&quot;30&quot; width=&quot;22&quot; /&gt; is a constant called the &lt;b&gt;voltage gain&lt;/b&gt;. 



&lt;br /&gt;
&lt;h3&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7313231459909421467&quot; name=&quot;SECTION00044100000000000000&quot;&gt;
The basic circuit&lt;/a&gt;
&lt;/h3&gt;
&lt;br /&gt;
&lt;div align=&quot;CENTER&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7313231459909421467&quot; name=&quot;fig:ceamp1&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7313231459909421467&quot; name=&quot;1132&quot;&gt;&lt;/a&gt;

&lt;table&gt;
&lt;caption align=&quot;BOTTOM&quot;&gt;&lt;b&gt;Figure 16:&lt;/b&gt;
Common emitter amplifier.&lt;/caption&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;div align=&quot;CENTER&quot;&gt;
&lt;img align=&quot;BOTTOM&quot; alt=&quot;\includegraphics{lab3-ceamp1.eps}&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img102.gif&quot; height=&quot;257&quot; width=&quot;221&quot; /&gt;

&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
Consider the circuit of Figure&amp;nbsp;&lt;a href=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/node4.html#fig:ceamp1&quot;&gt;16&lt;/a&gt;. The values of the
resistors &lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_1$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img103.gif&quot; height=&quot;30&quot; width=&quot;22&quot; /&gt;, &lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_2$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img104.gif&quot; height=&quot;30&quot; width=&quot;22&quot; /&gt;, &lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_C$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img87.gif&quot; height=&quot;30&quot; width=&quot;25&quot; /&gt;, and &lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_E$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img105.gif&quot; height=&quot;30&quot; width=&quot;25&quot; /&gt; are chosen so that &lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{out}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img9.gif&quot; height=&quot;30&quot; width=&quot;30&quot; /&gt;
is about 7.5&amp;nbsp;V (centered in the 0-15&amp;nbsp;V range) and &lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{in}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img10.gif&quot; height=&quot;30&quot; width=&quot;24&quot; /&gt; is about
0.6&amp;nbsp;V above the emitter, ensuring that a current always flows from the
collector to the emitter, regardless of whether we are exciting the
circuit. This is called the &lt;b&gt;quiescent state&lt;/b&gt;, or the
&lt;b&gt;DC operating point&lt;/b&gt;, of the circuit. 

&lt;br /&gt;
If we apply a change in voltage &lt;img align=&quot;MIDDLE&quot; alt=&quot;$\Delta V_{in}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img98.gif&quot; height=&quot;30&quot; width=&quot;38&quot; /&gt; to the input, 
this change is mirrored by the emitter. To see this, remember that the 
transistor is ``on&#39;&#39; and so the emitter voltage stays about 0.6&amp;nbsp;V
below the base. We have 
&lt;img align=&quot;MIDDLE&quot; alt=&quot;$\Delta V_E = \Delta V_{in}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img106.gif&quot; height=&quot;30&quot; width=&quot;93&quot; /&gt;, leading to a
change in the emitter current 
&lt;img align=&quot;MIDDLE&quot; alt=&quot;$\Delta i_E = \Delta V_{in}/R_E$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img107.gif&quot; height=&quot;32&quot; width=&quot;120&quot; /&gt;. The
collector and emitter currents are approximately equal, since 
&lt;img align=&quot;MIDDLE&quot; alt=&quot;$\beta
\approx 100$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img108.gif&quot; height=&quot;31&quot; width=&quot;60&quot; /&gt;, so we find
&lt;br /&gt;
&lt;br /&gt;
&lt;div align=&quot;RIGHT&quot;&gt;
&lt;table align=&quot;CENTER&quot; style=&quot;width: 100%px;&quot;&gt;
&lt;tbody&gt;
&lt;tr valign=&quot;MIDDLE&quot;&gt;&lt;td align=&quot;CENTER&quot; nowrap=&quot;nowrap&quot;&gt;&lt;img alt=&quot;\begin{displaymath}
\Delta V_{out} \approx -\Delta i_E R_C = \frac{R_C}{R_E} \Delta V_{in}
\end{displaymath}&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img109.gif&quot; height=&quot;42&quot; width=&quot;210&quot; /&gt;&lt;/td&gt;
&lt;td align=&quot;RIGHT&quot; width=&quot;10&quot;&gt;(5)&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
giving a voltage gain of 
&lt;br /&gt;
&lt;div align=&quot;RIGHT&quot;&gt;
&lt;table align=&quot;CENTER&quot; style=&quot;width: 100%px;&quot;&gt;
&lt;tbody&gt;
&lt;tr valign=&quot;MIDDLE&quot;&gt;&lt;td align=&quot;CENTER&quot; nowrap=&quot;nowrap&quot;&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7313231459909421467&quot; name=&quot;eq:cegain&quot;&gt;&lt;/a&gt;&lt;img alt=&quot;\begin{displaymath}
A_v = -\frac{R_C}{R_E}.
\end{displaymath}&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img110.gif&quot; height=&quot;42&quot; width=&quot;82&quot; /&gt;&lt;/td&gt;
&lt;td align=&quot;RIGHT&quot; width=&quot;10&quot;&gt;(6)&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
The minus sign comes in, because an increase in current through &lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_C$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img87.gif&quot; height=&quot;30&quot; width=&quot;25&quot; /&gt;
lowers the collector voltage. 



&lt;br /&gt;
&lt;h3&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7313231459909421467&quot; name=&quot;SECTION00044200000000000000&quot;&gt;
&lt;img align=&quot;MIDDLE&quot; alt=&quot;$\beta$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img94.gif&quot; height=&quot;31&quot; width=&quot;13&quot; /&gt; independent behavior&lt;/a&gt;
&lt;/h3&gt;
Note that the behavior of the circuit does not depend on the &lt;img align=&quot;MIDDLE&quot; alt=&quot;$\beta$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img94.gif&quot; height=&quot;31&quot; width=&quot;13&quot; /&gt;
value of the transistor. That is, we rely on the fact that the
exponential dependence of &lt;img align=&quot;MIDDLE&quot; alt=&quot;$i_C$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img111.gif&quot; height=&quot;29&quot; width=&quot;18&quot; /&gt; on &lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{BE}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img75.gif&quot; height=&quot;30&quot; width=&quot;32&quot; /&gt; ensures that the
transistor can supply (more than) enough current to follow changes
in the base voltage. An important design consideration is that we must
not saturate the transistor.



&lt;br /&gt;
&lt;h3&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7313231459909421467&quot; name=&quot;SECTION00044300000000000000&quot;&gt;
Why not &lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_E = 0$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img112.gif&quot; height=&quot;30&quot; width=&quot;56&quot; /&gt;?&lt;/a&gt;
&lt;/h3&gt;
Equation&amp;nbsp;&lt;a href=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/node4.html#eq:cegain&quot;&gt;6&lt;/a&gt; might inspire the question ``What happens if
we remove the emitter resistor &lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_E$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img105.gif&quot; height=&quot;30&quot; width=&quot;25&quot; /&gt;? Do we get infinite gain?&#39;&#39; It
turns out that we get maximal gain, but that the intrinsic dynamic
resistance 
&lt;img align=&quot;MIDDLE&quot; alt=&quot;$r_e = \frac{dV_{BE}}{dI_E}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img113.gif&quot; height=&quot;37&quot; width=&quot;72&quot; /&gt; of the emitter-base junction,
looking at the base from the emitter, limits the gain to a finite
value. Using the Ebers-Moll equation (Equation&amp;nbsp;&lt;a href=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/node4.html#eq:E-M&quot;&gt;3&lt;/a&gt;), we find
&lt;br /&gt;
&lt;div align=&quot;RIGHT&quot;&gt;
&lt;table align=&quot;CENTER&quot; style=&quot;width: 100%px;&quot;&gt;
&lt;tbody&gt;
&lt;tr valign=&quot;MIDDLE&quot;&gt;&lt;td align=&quot;CENTER&quot; nowrap=&quot;nowrap&quot;&gt;&lt;img alt=&quot;\begin{displaymath}
r_e = \frac{kT/e}{I_E} \approx \frac{kT/e}{I_C}.
\end{displaymath}&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img114.gif&quot; height=&quot;44&quot; width=&quot;141&quot; /&gt;&lt;/td&gt;
&lt;td align=&quot;RIGHT&quot; width=&quot;10&quot;&gt;(7)&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
At room temperature this gives something like 
&lt;img align=&quot;MIDDLE&quot; alt=&quot;$r_e \approx 25/I_C$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img115.gif&quot; height=&quot;32&quot; width=&quot;81&quot; /&gt; for
&lt;img align=&quot;MIDDLE&quot; alt=&quot;$I_C$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img74.gif&quot; height=&quot;30&quot; width=&quot;20&quot; /&gt; in mA and &lt;img align=&quot;MIDDLE&quot; alt=&quot;$r_e$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img116.gif&quot; height=&quot;29&quot; width=&quot;16&quot; /&gt; in &lt;img align=&quot;BOTTOM&quot; alt=&quot;$\Omega $&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img3.gif&quot; height=&quot;15&quot; width=&quot;15&quot; /&gt;. In fact, you measured a value of
&lt;img align=&quot;MIDDLE&quot; alt=&quot;$kT/e$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img117.gif&quot; height=&quot;32&quot; width=&quot;39&quot; /&gt; for your transistor in Section&amp;nbsp;&lt;a href=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/node4.html#sec:ebersmoll&quot;&gt;3.1&lt;/a&gt;. If &lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_E = 0$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img112.gif&quot; height=&quot;30&quot; width=&quot;56&quot; /&gt;, then the voltage gain becomes 
&lt;br /&gt;
&lt;div align=&quot;RIGHT&quot;&gt;
&lt;table align=&quot;CENTER&quot; style=&quot;width: 100%px;&quot;&gt;
&lt;tbody&gt;
&lt;tr valign=&quot;MIDDLE&quot;&gt;&lt;td align=&quot;CENTER&quot; nowrap=&quot;nowrap&quot;&gt;&lt;img alt=&quot;\begin{displaymath}
A_v = -\frac{R_C}{r_e} \approx -\frac{I_C R_C}{kT/e}
\end{displaymath}&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img118.gif&quot; height=&quot;44&quot; width=&quot;156&quot; /&gt;&lt;/td&gt;
&lt;td align=&quot;RIGHT&quot; width=&quot;10&quot;&gt;(8)&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
which introduces two unwanted visitors - dependence on both
temperature and collector current. The first leads to temperature
instability, and the second leads to nonlinear gain. We avoid these
problems by using a large enough emitter resistor &lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_E$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img105.gif&quot; height=&quot;30&quot; width=&quot;25&quot; /&gt; that the
emitter voltage is insensitive to changes in the intrinsic emitter
resistance &lt;img align=&quot;MIDDLE&quot; alt=&quot;$r_e$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img116.gif&quot; height=&quot;29&quot; width=&quot;16&quot; /&gt;. 



&lt;br /&gt;
&lt;h3&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7313231459909421467&quot; name=&quot;SECTION00044400000000000000&quot;&gt;
A refined circuit&lt;/a&gt;
&lt;/h3&gt;
&lt;br /&gt;
&lt;div align=&quot;CENTER&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7313231459909421467&quot; name=&quot;fig:ceamp2&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7313231459909421467&quot; name=&quot;1134&quot;&gt;&lt;/a&gt;

&lt;table&gt;
&lt;caption align=&quot;BOTTOM&quot;&gt;&lt;b&gt;Figure 17:&lt;/b&gt;
AC common emitter amplifier with capacitive
coupling on the input and output.&lt;/caption&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;div align=&quot;CENTER&quot;&gt;
&lt;img align=&quot;BOTTOM&quot; alt=&quot;\includegraphics{lab3-ceamp2.eps}&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img119.gif&quot; height=&quot;257&quot; width=&quot;299&quot; /&gt;

&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
The circuit of Figure&amp;nbsp;&lt;a href=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/node4.html#fig:ceamp2&quot;&gt;17&lt;/a&gt; includes some refinements over
that of Figure&amp;nbsp;&lt;a href=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/node4.html#fig:ceamp1&quot;&gt;16&lt;/a&gt;. If we only wish to amplify time
dependent signals, we couple the input and output signals to the
circuit with capacitors &lt;img align=&quot;MIDDLE&quot; alt=&quot;$C_1$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img120.gif&quot; height=&quot;30&quot; width=&quot;21&quot; /&gt; and &lt;img align=&quot;MIDDLE&quot; alt=&quot;$C_2$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img121.gif&quot; height=&quot;30&quot; width=&quot;21&quot; /&gt;. This capacitive coupling removes
DC components from the input and output that might interfere with 
the DC operating point of the amplifier. These coupling capacitors
form high pass filters with the input and output impedances. Their
values should be chosen so as to transmit signals of interest. The
capacitor labeled &lt;img align=&quot;MIDDLE&quot; alt=&quot;$C_E$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img122.gif&quot; height=&quot;30&quot; width=&quot;25&quot; /&gt; is chosen to bypass the emitter resistor at
signal frequencies. You will investigate the effect this has on the
gain. The bypass capacitor has no effect on the DC behavior of the
circuit.

&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7313231459909421467&quot; name=&quot;SECTION00044500000000000000&quot;&gt;
Assignment&lt;/a&gt;
&lt;/h3&gt;
&lt;i&gt;Note : In making measurements, use the &lt;img align=&quot;MIDDLE&quot; alt=&quot;$\times10$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img47.gif&quot; height=&quot;29&quot; width=&quot;32&quot; /&gt; setting
(high impedance) on your oscilloscope probes to minimize loading
effects. Remember to compensate your probes.&lt;/i&gt;

&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Design the circuit of Figure&amp;nbsp;&lt;a href=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/node4.html#fig:ceamp1&quot;&gt;16&lt;/a&gt; for a
quiescent collector/emitter current of about 1&amp;nbsp;mA.&lt;a href=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/footnode.html#foot982&quot; name=&quot;tex2html22&quot;&gt;&lt;sup&gt;5&lt;/sup&gt;&lt;/a&gt;Choose &lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_C$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img87.gif&quot; height=&quot;30&quot; width=&quot;25&quot; /&gt; to center the output voltage at 7.5&amp;nbsp;V. Choose 
&lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_E
\approx 20 r_e$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img123.gif&quot; height=&quot;30&quot; width=&quot;78&quot; /&gt; to limit the effects of the variability of &lt;img align=&quot;MIDDLE&quot; alt=&quot;$r_e$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img116.gif&quot; height=&quot;29&quot; width=&quot;16&quot; /&gt; on
the gain to 5%. &lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_E$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img105.gif&quot; height=&quot;30&quot; width=&quot;25&quot; /&gt; together with the quiescent &lt;img align=&quot;MIDDLE&quot; alt=&quot;$i_C$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img111.gif&quot; height=&quot;29&quot; width=&quot;18&quot; /&gt; set the
emitter voltage. Choose &lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_1$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img103.gif&quot; height=&quot;30&quot; width=&quot;22&quot; /&gt; and &lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_2$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img104.gif&quot; height=&quot;30&quot; width=&quot;22&quot; /&gt; to place the base 0.6&amp;nbsp;V above
the emitter. This sets their ratio. Then, choose their absolute values
to strike a balance between the following two competing concerns. First,
we would like the input impedance of the circuit to be as large as
possible. Second, the impedance &lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_1$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img103.gif&quot; height=&quot;30&quot; width=&quot;22&quot; /&gt; and &lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_2$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img104.gif&quot; height=&quot;30&quot; width=&quot;22&quot; /&gt; present at the base
should be much smaller than the input impedance at the base. This
ensures that the impedance of the ``input source&#39;&#39; is small compared
to that of the load it drives. Stated another way, this ensures that
enough current flows through &lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_1$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img103.gif&quot; height=&quot;30&quot; width=&quot;22&quot; /&gt; and &lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_2$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img104.gif&quot; height=&quot;30&quot; width=&quot;22&quot; /&gt; to provide needed changes
in base current.


The impedance that &lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_1$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img103.gif&quot; height=&quot;30&quot; width=&quot;22&quot; /&gt; and &lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_2$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img104.gif&quot; height=&quot;30&quot; width=&quot;22&quot; /&gt; present at the base can be
determined by deactivating the voltage source and determining their
resistance between the base and ground (ignoring the transistor for
the moment). The input impedance of the base looks like &lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_E$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img105.gif&quot; height=&quot;30&quot; width=&quot;25&quot; /&gt; viewed
through the base emitter junction. A small change in base current
&lt;img align=&quot;MIDDLE&quot; alt=&quot;$\Delta i_B$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img124.gif&quot; height=&quot;30&quot; width=&quot;32&quot; /&gt; produces a large change in the emitter current 
&lt;img align=&quot;MIDDLE&quot; alt=&quot;$\Delta
i_E \approx \beta \Delta i_B$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img125.gif&quot; height=&quot;31&quot; width=&quot;94&quot; /&gt; corresponding to a change in emitter
voltage 
&lt;img align=&quot;MIDDLE&quot; alt=&quot;$\Delta V_E = \beta \Delta i_b R_E$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img126.gif&quot; height=&quot;31&quot; width=&quot;116&quot; /&gt;. Hence, looking into the
base has in input impedance 
&lt;img align=&quot;MIDDLE&quot; alt=&quot;$\approx \beta R_E$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img127.gif&quot; height=&quot;31&quot; width=&quot;53&quot; /&gt;.

&lt;br /&gt;

&lt;/li&gt;
&lt;li&gt;Calculate the input and output impedances (in the Thevenin
sense) of your amplifier. Here&#39;s a hint for calculating the output
impedance. The impedance looking into the collector is &lt;i&gt;huge&lt;/i&gt;,
because the collector draws a fixed current for a given value of
&lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{BE}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img75.gif&quot; height=&quot;30&quot; width=&quot;32&quot; /&gt;. The transistor acts to maintain this current by changing the
collector voltage by large amounts if necessary. This last sentence
implies a very large collector impedance.


&lt;/li&gt;
&lt;li&gt;Check your design work by measuring the DC operating voltages of
the base and emitter. Are the voltages and quiescent currents what you
expect them to be?


&lt;/li&gt;
&lt;li&gt;Add coupling capacitors &lt;img align=&quot;MIDDLE&quot; alt=&quot;$C_1$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img120.gif&quot; height=&quot;30&quot; width=&quot;21&quot; /&gt; and &lt;img align=&quot;MIDDLE&quot; alt=&quot;$C_2$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img121.gif&quot; height=&quot;30&quot; width=&quot;21&quot; /&gt; shown in
Figure&amp;nbsp;&lt;a href=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/node4.html#fig:ceamp2&quot;&gt;17&lt;/a&gt;. Using your input and output impedances,
choose values such that the 3&amp;nbsp;dB point of the circuit is 100&amp;nbsp;Hz. Note
that these two high pass filters working together yield a lower
3&amp;nbsp;dB point for the circuit than they give individually. Measure the
gain as a function of frequency, producing a graph of your results,
and find the 3dB point of the circuit experimentally.


&lt;/li&gt;
&lt;li&gt;Add the emitter bypass capacitor &lt;img align=&quot;MIDDLE&quot; alt=&quot;$C_E$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img122.gif&quot; height=&quot;30&quot; width=&quot;25&quot; /&gt; to the circuit, and
observe the effects this has on the gain of the circuit as a function
of frequency. That is, produce a gain vs. frequency graph to compare
with your graph without the bypass capacitor.&lt;a href=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/footnode.html#foot986&quot; name=&quot;tex2html23&quot;&gt;&lt;sup&gt;6&lt;/sup&gt;&lt;/a&gt;

&lt;/li&gt;
&lt;li&gt;Check the linearity of your amplifier, both with and
without the emitter bypass capacitor, by driving it with a triangle
wave form. Any distortion in the output wave form reveals nonlinear
gain.
&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;h2&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7313231459909421467&quot; name=&quot;SECTION00045000000000000000&quot;&gt;
Common Collector Amplifier / Emitter Follower&lt;/a&gt;
&lt;/h2&gt;
Our second amplifier circuit is a current amplifier called an
&lt;b&gt;emitter follower&lt;/b&gt; with a linear voltage gain &lt;img align=&quot;MIDDLE&quot; alt=&quot;$A_v$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img101.gif&quot; height=&quot;30&quot; width=&quot;22&quot; /&gt; of
approximately one. The output impedance of the circuit is much smaller
than the input impedance, while the voltage level is unchanged.
Hence, instead of amplifying voltage, this circuit amplifies the
current (and power) of the input signal.



&lt;br /&gt;
&lt;h3&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7313231459909421467&quot; name=&quot;SECTION00045100000000000000&quot;&gt;
Design considerations&lt;/a&gt;
&lt;/h3&gt;
&lt;br /&gt;
&lt;div align=&quot;CENTER&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7313231459909421467&quot; name=&quot;fig:efamp&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7313231459909421467&quot; name=&quot;1135&quot;&gt;&lt;/a&gt;

&lt;table&gt;
&lt;caption align=&quot;BOTTOM&quot;&gt;&lt;b&gt;Figure 18:&lt;/b&gt;
AC emitter follower circuit with capacitive
coupling on the input and output.&lt;/caption&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;div align=&quot;CENTER&quot;&gt;
&lt;img align=&quot;BOTTOM&quot; alt=&quot;\includegraphics{lab3-efamp.eps}&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img129.gif&quot; height=&quot;257&quot; width=&quot;299&quot; /&gt;

&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
Consider the circuit of Figure&amp;nbsp;&lt;a href=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/node4.html#fig:efamp&quot;&gt;18&lt;/a&gt;. After working with the
common emitter amplifier you are likely to have developed some 
intuition about how to choose values for the resistors
and capacitors in this circuit. As with the common emitter amplifier,
the DC operating point of the circuit will keep the transistor
activated. Changes in base voltage are mirrored at the emitter,
because the emitter stays about 0.6&amp;nbsp;V below the base when the
transistor is ``on&#39;&#39; and not saturated. Hence 
&lt;img align=&quot;MIDDLE&quot; alt=&quot;$\Delta V_{out} = \Delta
V_{in}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img130.gif&quot; height=&quot;30&quot; width=&quot;101&quot; /&gt; and &lt;img align=&quot;MIDDLE&quot; alt=&quot;$A_v \approx 1$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img131.gif&quot; height=&quot;30&quot; width=&quot;53&quot; /&gt;. &lt;a href=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/footnode.html#foot999&quot; name=&quot;tex2html25&quot;&gt;&lt;sup&gt;7&lt;/sup&gt;&lt;/a&gt; The value
of the emitter resistor &lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_E$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img105.gif&quot; height=&quot;30&quot; width=&quot;25&quot; /&gt; is chosen to center the DC output
voltage at 7.5&amp;nbsp;V for the desired quiescent collector/emitter
current. The ratio &lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_1 / R_2$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img132.gif&quot; height=&quot;32&quot; width=&quot;49&quot; /&gt; is set to place the base 0.6&amp;nbsp;V above
the emitter, and the absolute values are set in the same way as for
the the common emitter amplifier (see Section&amp;nbsp;&lt;a href=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/node4.html#sec:ceamp&quot;&gt;3.4&lt;/a&gt;). 

&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7313231459909421467&quot; name=&quot;SECTION00045200000000000000&quot;&gt;
Assignment&lt;/a&gt;
&lt;/h3&gt;
&lt;i&gt;Note : In making measurements, use the &lt;img align=&quot;MIDDLE&quot; alt=&quot;$\times10$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img47.gif&quot; height=&quot;29&quot; width=&quot;32&quot; /&gt; setting
(high impedance) on your oscilloscope probes to minimize loading
effects. Remember to compensate your probes.&lt;/i&gt;

&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Construct the circuit of Figure&amp;nbsp;&lt;a href=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/node4.html#fig:efamp&quot;&gt;18&lt;/a&gt;. The first
design step is to decide on a quiescent collector/emitter
current. Without a specific load in mind, an arbitrary choice of 
&lt;img align=&quot;MIDDLE&quot; alt=&quot;$i_C
\approx i_E = 1$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img133.gif&quot; height=&quot;29&quot; width=&quot;87&quot; /&gt;&amp;nbsp;mA will get you started. Choose coupling capacitors
that give a 3&amp;nbsp;dB point for the circuit of 100&amp;nbsp;Hz. Note that these
two high pass filters working together yield a lower
3&amp;nbsp;dB point for the circuit than they give individually.


&lt;/li&gt;
&lt;li&gt;Check your design work by measuring the DC operating voltages of
the base and emitter. Are the voltages and quiescent currents what you
expect them to be?


&lt;/li&gt;
&lt;li&gt;Determine the input impedance by placing a resistor in series
with the source and measuring the drop in output voltage. (Think
voltage divider.)


&lt;/li&gt;
&lt;li&gt;Determine the output impedance by measuring the &lt;i&gt;upper&lt;/i&gt;
3&amp;nbsp;dB point of the circuit using the capacitor &lt;img align=&quot;MIDDLE&quot; alt=&quot;$C_2$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img121.gif&quot; height=&quot;30&quot; width=&quot;21&quot; /&gt; as the load (in
parallel with &lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_E$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img105.gif&quot; height=&quot;30&quot; width=&quot;25&quot; /&gt;) rather than as a coupling capacitor.
&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7313231459909421467&quot; name=&quot;SECTION00046000000000000000&quot;&gt;
Schmitt Trigger&lt;/a&gt;
&lt;/h2&gt;
Typical ``real world&#39;&#39; signals consist of a superposition of a
``noise&#39;&#39; signal and a signal or signals of interest. For example, the
signal at the bottom of Figure&amp;nbsp;&lt;a href=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/node4.html#fig:schmittgr&quot;&gt;19&lt;/a&gt; shows a
superposition of slow variations of large magnitude as well as faster
variations of smaller magnitude. Let us assume that the slower, larger
signal is our signal of interest. We could try using a high pass
filter to eliminate the smaller, faster signal. However, if we are
only interested in knowing when and for how long our signal of
interest is above some threshold, we could use transistors to produce
a circuit with an output voltage that is high or ``on&#39;&#39; when its input 
signal is above a ``turn on&#39;&#39; threshold and low or ``off&#39;&#39; otherwise. This
circuit would produce several very short output pulses due to noise
fluctuations as the signal crossed the threshold. If we refine the
design so that the output only swings low after the signal crosses
a second &lt;i&gt;lower&lt;/i&gt; ``turn off&#39;&#39; threshold, we limit the
sensitivity of the circuit to noise. In order for this idea to work,
the difference between our ``turn on&#39;&#39; and ``turn off&#39;&#39; voltage
thresholds should be somewhat larger than the peak to peak magnitude
of the noise as shown in Figure&amp;nbsp;&lt;a href=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/node4.html#fig:schmittgr&quot;&gt;19&lt;/a&gt;.



&lt;br /&gt;
&lt;div align=&quot;CENTER&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7313231459909421467&quot; name=&quot;fig:schmittgr&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7313231459909421467&quot; name=&quot;1136&quot;&gt;&lt;/a&gt;

&lt;table&gt;
&lt;caption align=&quot;BOTTOM&quot;&gt;&lt;b&gt;Figure 19:&lt;/b&gt;
A ``noisy&#39;&#39; input signal is shown below
the desired output - high or ``on&#39;&#39; when the input signal has passed a
``turn on&#39;&#39; threshold and has not yet fallen below a &lt;i&gt;lower&lt;/i&gt;
``turn off&#39;&#39; threshold. The two thresholds are arranged to prevent the
circuit from responding to fluctuations due to noise.&lt;/caption&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;div align=&quot;CENTER&quot;&gt;
&lt;img align=&quot;BOTTOM&quot; alt=&quot;\includegraphics{lab3-schmittgr.eps}&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img134.gif&quot; height=&quot;220&quot; width=&quot;303&quot; /&gt;

&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
The device described above is known as a Schmitt trigger. It is an
example of a class of devices called &lt;b&gt;bistable multivibrators&lt;/b&gt;
or &lt;b&gt;flip flops&lt;/b&gt;. These devices, because they have two possible
output states dependent on the history of the input signal have (at
least short term) memory.

&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7313231459909421467&quot; name=&quot;SECTION00046100000000000000&quot;&gt;
Design considerations&lt;/a&gt;
&lt;/h3&gt;
&lt;div align=&quot;CENTER&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7313231459909421467&quot; name=&quot;fig:schmitt&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7313231459909421467&quot; name=&quot;1137&quot;&gt;&lt;/a&gt;

&lt;table&gt;
&lt;caption align=&quot;BOTTOM&quot;&gt;&lt;b&gt;Figure 20:&lt;/b&gt;
Nonlinear two state amplifier with
different ``on&#39;&#39; and ``off&#39;&#39; input thresholds called a Schmitt
trigger.&lt;/caption&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;div align=&quot;CENTER&quot;&gt;
&lt;img align=&quot;BOTTOM&quot; alt=&quot;\includegraphics{lab3-schmitt.eps}&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img135.gif&quot; height=&quot;274&quot; width=&quot;353&quot; /&gt;

&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
The circuit of Figure&amp;nbsp;&lt;a href=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/node4.html#fig:schmitt&quot;&gt;20&lt;/a&gt; is a Schmitt trigger
circuit. The two transistors &lt;img align=&quot;MIDDLE&quot; alt=&quot;$Q_1$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img4.gif&quot; height=&quot;30&quot; width=&quot;22&quot; /&gt; and &lt;img align=&quot;MIDDLE&quot; alt=&quot;$Q_2$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img5.gif&quot; height=&quot;30&quot; width=&quot;22&quot; /&gt; are the key to the
bistable behavior of the circuit.  With the circuit in the ``on&#39;&#39;
state, &lt;img align=&quot;MIDDLE&quot; alt=&quot;$Q_1$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img4.gif&quot; height=&quot;30&quot; width=&quot;22&quot; /&gt; is active (
&lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{BE1} \approx 0.7$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img136.gif&quot; height=&quot;30&quot; width=&quot;81&quot; /&gt;&amp;nbsp;V) while &lt;img align=&quot;MIDDLE&quot; alt=&quot;$Q_2$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img5.gif&quot; height=&quot;30&quot; width=&quot;22&quot; /&gt; is
inactive (&lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{BE2} &amp;lt; 0.7$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img137.gif&quot; height=&quot;30&quot; width=&quot;81&quot; /&gt;&amp;nbsp;V). In the ``off&#39;&#39; state, they trade
roles. Neither transistor is saturated.  It is important to note that
these are not conclusions one can draw looking
Figure&amp;nbsp;&lt;a href=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/node4.html#fig:schmitt&quot;&gt;20&lt;/a&gt; in the absence of resistance values. Instead,
these are assertions that get us started in understanding the behavior
of the circuit. It is further helpful to start at the left of
Figure&amp;nbsp;&lt;a href=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/node4.html#fig:schmittgr&quot;&gt;19&lt;/a&gt; and think through the generation of an
output pulse as follows.

&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;&lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{in}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img10.gif&quot; height=&quot;30&quot; width=&quot;24&quot; /&gt; low, &lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{out}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img9.gif&quot; height=&quot;30&quot; width=&quot;30&quot; /&gt; low (trigger ``off&#39;&#39;)&lt;/b&gt;
&lt;br /&gt;
The trigger is ``off&#39;&#39; in this state. We start with the assumption 
that in this state, &lt;img align=&quot;MIDDLE&quot; alt=&quot;$Q_1$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img4.gif&quot; height=&quot;30&quot; width=&quot;22&quot; /&gt; is inactive and &lt;img align=&quot;MIDDLE&quot; alt=&quot;$Q_2$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img5.gif&quot; height=&quot;30&quot; width=&quot;22&quot; /&gt; is active. 
If we mentally remove &lt;img align=&quot;MIDDLE&quot; alt=&quot;$Q_1$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img4.gif&quot; height=&quot;30&quot; width=&quot;22&quot; /&gt; from the circuit as depicted in
Figure&amp;nbsp;&lt;a href=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/node4.html#fig:schmittonoff&quot;&gt;21&lt;/a&gt;(a), we have what looks like a somewhat
tangled common emitter amplifier. The base voltage of &lt;img align=&quot;MIDDLE&quot; alt=&quot;$Q_2$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img5.gif&quot; height=&quot;30&quot; width=&quot;22&quot; /&gt;
is set by the voltage divider consisting of &lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_1 + R_3$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img138.gif&quot; height=&quot;30&quot; width=&quot;61&quot; /&gt; and &lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_4$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img139.gif&quot; height=&quot;30&quot; width=&quot;22&quot; /&gt;. If
&lt;img align=&quot;MIDDLE&quot; alt=&quot;$Q_2$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img5.gif&quot; height=&quot;30&quot; width=&quot;22&quot; /&gt; is active but not saturated, 
&lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{BE2} = V_{B2} - V_{E2} \approx
0.7$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img140.gif&quot; height=&quot;30&quot; width=&quot;175&quot; /&gt;&amp;nbsp;V, or 
&lt;br /&gt;
&lt;div align=&quot;RIGHT&quot;&gt;
&lt;table align=&quot;CENTER&quot; style=&quot;width: 100%px;&quot;&gt;
&lt;tbody&gt;
&lt;tr valign=&quot;MIDDLE&quot;&gt;&lt;td align=&quot;CENTER&quot; nowrap=&quot;nowrap&quot;&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7313231459909421467&quot; name=&quot;eq:schmitt-divider&quot;&gt;&lt;/a&gt;&lt;img alt=&quot;\begin{displaymath}
\left( \frac{R_4}{R_1 + R_3 + R_4} \right) V_{cc} - I_{C2} R_E
\approx 0.7~\textrm{V}
\end{displaymath}&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img141.gif&quot; height=&quot;42&quot; width=&quot;269&quot; /&gt;&lt;/td&gt;
&lt;td align=&quot;RIGHT&quot; width=&quot;10&quot;&gt;(9)&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
where &lt;img align=&quot;MIDDLE&quot; alt=&quot;$I_{C2}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img142.gif&quot; height=&quot;30&quot; width=&quot;26&quot; /&gt; is the collector current of &lt;img align=&quot;MIDDLE&quot; alt=&quot;$Q_2$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img5.gif&quot; height=&quot;30&quot; width=&quot;22&quot; /&gt;. For our purposes, we
can and do consider the collector and emitter currents to be
equal. Further, the output voltage corresponding to the ``off&#39;&#39; state
is given by
&lt;br /&gt;
&lt;div align=&quot;RIGHT&quot;&gt;
&lt;table align=&quot;CENTER&quot; style=&quot;width: 100%px;&quot;&gt;
&lt;tbody&gt;
&lt;tr valign=&quot;MIDDLE&quot;&gt;&lt;td align=&quot;CENTER&quot; nowrap=&quot;nowrap&quot;&gt;&lt;img alt=&quot;\begin{displaymath}
V_{off} = V_{cc} - I_{C2} R_2.
\end{displaymath}&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img143.gif&quot; height=&quot;29&quot; width=&quot;138&quot; /&gt;&lt;/td&gt;
&lt;td align=&quot;RIGHT&quot; width=&quot;10&quot;&gt;(10)&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div align=&quot;CENTER&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7313231459909421467&quot; name=&quot;fig:schmittonoff&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7313231459909421467&quot; name=&quot;1141&quot;&gt;&lt;/a&gt;

&lt;table&gt;
&lt;caption align=&quot;BOTTOM&quot;&gt;&lt;b&gt;Figure 21:&lt;/b&gt;
Schmitt trigger in the (a) ``off&#39;&#39;
(&lt;img align=&quot;MIDDLE&quot; alt=&quot;$Q_1$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img4.gif&quot; height=&quot;30&quot; width=&quot;22&quot; /&gt; inactive) and (b) ``on&#39;&#39; (&lt;img align=&quot;MIDDLE&quot; alt=&quot;$Q_2$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img5.gif&quot; height=&quot;30&quot; width=&quot;22&quot; /&gt; inactive) states.&lt;/caption&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;div align=&quot;CENTER&quot;&gt;
&lt;b&gt;(a)&lt;/b&gt;

&lt;img align=&quot;BOTTOM&quot; alt=&quot;\scalebox{0.7}{
\includegraphics{lab3-schmittoff.eps}
}&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img144.gif&quot; height=&quot;192&quot; width=&quot;247&quot; /&gt;
&lt;b&gt;(b)&lt;/b&gt;

&lt;img align=&quot;BOTTOM&quot; alt=&quot;\scalebox{0.7}{
\includegraphics{lab3-schmitton.eps}
}&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img145.gif&quot; height=&quot;192&quot; width=&quot;247&quot; /&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{in}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img10.gif&quot; height=&quot;30&quot; width=&quot;24&quot; /&gt; rising, &lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{out}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img9.gif&quot; height=&quot;30&quot; width=&quot;30&quot; /&gt; low (trigger ``off&#39;&#39;)&lt;/b&gt;
&lt;br /&gt;
Noting that the emitters of &lt;img align=&quot;MIDDLE&quot; alt=&quot;$Q_1$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img4.gif&quot; height=&quot;30&quot; width=&quot;22&quot; /&gt; and &lt;img align=&quot;MIDDLE&quot; alt=&quot;$Q_2$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img5.gif&quot; height=&quot;30&quot; width=&quot;22&quot; /&gt; are tied together, we
conclude that the base and base emitter voltages at which they
activate are equal. We already know the voltage of the base of &lt;img align=&quot;MIDDLE&quot; alt=&quot;$Q_2$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img5.gif&quot; height=&quot;30&quot; width=&quot;22&quot; /&gt;
when the circuit is in the ``off&#39;&#39; state. Hence, we have the input
threshold for turning on &lt;img align=&quot;MIDDLE&quot; alt=&quot;$Q_1$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img4.gif&quot; height=&quot;30&quot; width=&quot;22&quot; /&gt; and triggering the transition to the
``on&#39;&#39; state,
&lt;br /&gt;
&lt;div align=&quot;RIGHT&quot;&gt;
&lt;table align=&quot;CENTER&quot; style=&quot;width: 100%px;&quot;&gt;
&lt;tbody&gt;
&lt;tr valign=&quot;MIDDLE&quot;&gt;&lt;td align=&quot;CENTER&quot; nowrap=&quot;nowrap&quot;&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7313231459909421467&quot; name=&quot;eq:schmittturnon&quot;&gt;&lt;/a&gt;&lt;img alt=&quot;\begin{displaymath}
V_{turn~on} = \left( \frac{R_4}{R_1 + R_3 + R_4} \right) V_{cc}.
\end{displaymath}&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img146.gif&quot; height=&quot;42&quot; width=&quot;222&quot; /&gt;&lt;/td&gt;
&lt;td align=&quot;RIGHT&quot; width=&quot;10&quot;&gt;(11)&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{in}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img10.gif&quot; height=&quot;30&quot; width=&quot;24&quot; /&gt; high, &lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{out}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img9.gif&quot; height=&quot;30&quot; width=&quot;30&quot; /&gt; high (trigger ``on&#39;&#39;)&lt;/b&gt;
&lt;br /&gt;
The trigger is in the ``on&#39;&#39; state (see
Figure&amp;nbsp;&lt;a href=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/node4.html#fig:schmittonoff&quot;&gt;21&lt;/a&gt;). Once &lt;img align=&quot;MIDDLE&quot; alt=&quot;$Q_2$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img5.gif&quot; height=&quot;30&quot; width=&quot;22&quot; /&gt; is inactive, &lt;img align=&quot;MIDDLE&quot; alt=&quot;$I_{C2} = 0$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img147.gif&quot; height=&quot;30&quot; width=&quot;56&quot; /&gt;,
and there is no voltage drop across &lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_2$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img104.gif&quot; height=&quot;30&quot; width=&quot;22&quot; /&gt;. We can conclude that
&lt;br /&gt;
&lt;div align=&quot;RIGHT&quot;&gt;
&lt;table align=&quot;CENTER&quot; style=&quot;width: 100%px;&quot;&gt;
&lt;tbody&gt;
&lt;tr valign=&quot;MIDDLE&quot;&gt;&lt;td align=&quot;CENTER&quot; nowrap=&quot;nowrap&quot;&gt;&lt;img alt=&quot;\begin{displaymath}
V_{on} = 5~\textrm{V}.
\end{displaymath}&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img148.gif&quot; height=&quot;27&quot; width=&quot;74&quot; /&gt;&lt;/td&gt;
&lt;td align=&quot;RIGHT&quot; width=&quot;10&quot;&gt;(12)&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{in}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img10.gif&quot; height=&quot;30&quot; width=&quot;24&quot; /&gt; falling, &lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{out}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img9.gif&quot; height=&quot;30&quot; width=&quot;30&quot; /&gt; high (trigger ``on&#39;&#39;)&lt;/b&gt;
&lt;br /&gt;
In this state, there are three unique currents &lt;img align=&quot;MIDDLE&quot; alt=&quot;$I_1$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img149.gif&quot; height=&quot;30&quot; width=&quot;17&quot; /&gt;, &lt;img align=&quot;MIDDLE&quot; alt=&quot;$I_2$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img150.gif&quot; height=&quot;30&quot; width=&quot;17&quot; /&gt;, and
&lt;img align=&quot;MIDDLE&quot; alt=&quot;$I_{C1}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img151.gif&quot; height=&quot;30&quot; width=&quot;26&quot; /&gt; flowing in the circuit as shown in
Figure&amp;nbsp;&lt;a href=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/node4.html#fig:schmittonoff&quot;&gt;21&lt;/a&gt;(b).  The node rule gives
&lt;br /&gt;
&lt;div align=&quot;RIGHT&quot;&gt;
&lt;table align=&quot;CENTER&quot; style=&quot;width: 100%px;&quot;&gt;
&lt;tbody&gt;
&lt;tr valign=&quot;MIDDLE&quot;&gt;&lt;td align=&quot;CENTER&quot; nowrap=&quot;nowrap&quot;&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7313231459909421467&quot; name=&quot;eq:schmittoff1&quot;&gt;&lt;/a&gt;&lt;img alt=&quot;\begin{displaymath}
I_1 = I_{C1} + I_2.
\end{displaymath}&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img152.gif&quot; height=&quot;27&quot; width=&quot;95&quot; /&gt;&lt;/td&gt;
&lt;td align=&quot;RIGHT&quot; width=&quot;10&quot;&gt;(13)&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
We can further observe, via the loop rule, that
&lt;br /&gt;
&lt;div align=&quot;RIGHT&quot;&gt;
&lt;table align=&quot;CENTER&quot; style=&quot;width: 100%px;&quot;&gt;
&lt;tbody&gt;
&lt;tr valign=&quot;MIDDLE&quot;&gt;&lt;td align=&quot;CENTER&quot; nowrap=&quot;nowrap&quot;&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7313231459909421467&quot; name=&quot;eq:schmittoff2&quot;&gt;&lt;/a&gt;&lt;img alt=&quot;\begin{displaymath}
I_1 R_1 + I_2 (R_3 + R_4) = V_{cc}.
\end{displaymath}&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img153.gif&quot; height=&quot;29&quot; width=&quot;183&quot; /&gt;&lt;/td&gt;
&lt;td align=&quot;RIGHT&quot; width=&quot;10&quot;&gt;(14)&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
The key to finding the ``turn off&#39;&#39;
threshold input voltage &lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{turn~off}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img154.gif&quot; height=&quot;30&quot; width=&quot;62&quot; /&gt; is recognizing that the base
emitter voltages of &lt;img align=&quot;MIDDLE&quot; alt=&quot;$Q_1$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img4.gif&quot; height=&quot;30&quot; width=&quot;22&quot; /&gt; and &lt;img align=&quot;MIDDLE&quot; alt=&quot;$Q_2$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img5.gif&quot; height=&quot;30&quot; width=&quot;22&quot; /&gt; are both &lt;img align=&quot;BOTTOM&quot; alt=&quot;$\approx 0.7$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img155.gif&quot; height=&quot;13&quot; width=&quot;42&quot; /&gt;&amp;nbsp;V when
&lt;img align=&quot;MIDDLE&quot; alt=&quot;$Q_1$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img4.gif&quot; height=&quot;30&quot; width=&quot;22&quot; /&gt; is deactivating and &lt;img align=&quot;MIDDLE&quot; alt=&quot;$Q_2$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img5.gif&quot; height=&quot;30&quot; width=&quot;22&quot; /&gt; is activating. This yields a third
constraint
&lt;br /&gt;
&lt;div align=&quot;RIGHT&quot;&gt;
&lt;table align=&quot;CENTER&quot; style=&quot;width: 100%px;&quot;&gt;
&lt;tbody&gt;
&lt;tr valign=&quot;MIDDLE&quot;&gt;&lt;td align=&quot;CENTER&quot; nowrap=&quot;nowrap&quot;&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7313231459909421467&quot; name=&quot;eq:schmittoff3&quot;&gt;&lt;/a&gt;&lt;img alt=&quot;\begin{displaymath}
V_{turn~off} \approx I_{C1} R_E + 0.7 \approx I_2 R_4
\end{displaymath}&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img156.gif&quot; height=&quot;29&quot; width=&quot;223&quot; /&gt;&lt;/td&gt;
&lt;td align=&quot;RIGHT&quot; width=&quot;10&quot;&gt;(15)&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
which, together with Equations&amp;nbsp;&lt;a href=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/node4.html#eq:schmittoff1&quot;&gt;13&lt;/a&gt; and
&lt;a href=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/node4.html#eq:schmittoff2&quot;&gt;14&lt;/a&gt; allows us to eliminate the three unknown
currents. In this way, it can be shown that 
&lt;br /&gt;
&lt;div align=&quot;RIGHT&quot;&gt;
&lt;table align=&quot;CENTER&quot; style=&quot;width: 100%px;&quot;&gt;
&lt;tbody&gt;
&lt;tr valign=&quot;MIDDLE&quot;&gt;&lt;td align=&quot;CENTER&quot; nowrap=&quot;nowrap&quot;&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7313231459909421467&quot; name=&quot;eq:schmittturnoff&quot;&gt;&lt;/a&gt;&lt;img alt=&quot;\begin{displaymath}
V_{turn~off} \approx \frac{R_4 (V_{cc} + \frac{R_1}{R_E}~0.7~\textrm{V})}
{R_1 + R_3 + R_4 + \frac{R_1 R_4}{R_E}}.
\end{displaymath}&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img157.gif&quot; height=&quot;53&quot; width=&quot;238&quot; /&gt;&lt;/td&gt;
&lt;td align=&quot;RIGHT&quot; width=&quot;10&quot;&gt;(16)&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7313231459909421467&quot; name=&quot;SECTION00046200000000000000&quot;&gt;
Assignment&lt;/a&gt;
&lt;/h3&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Use Spice to predict the behavior of the circuit assuming 
&lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_1 = 4.7$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img158.gif&quot; height=&quot;30&quot; width=&quot;65&quot; /&gt;&amp;nbsp;k&lt;img align=&quot;BOTTOM&quot; alt=&quot;$\Omega $&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img3.gif&quot; height=&quot;15&quot; width=&quot;15&quot; /&gt;, &lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_2 = 3.9$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img159.gif&quot; height=&quot;30&quot; width=&quot;65&quot; /&gt;&amp;nbsp;k&lt;img align=&quot;BOTTOM&quot; alt=&quot;$\Omega $&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img3.gif&quot; height=&quot;15&quot; width=&quot;15&quot; /&gt;, &lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_3 = 2.2$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img160.gif&quot; height=&quot;30&quot; width=&quot;65&quot; /&gt;&amp;nbsp;k&lt;img align=&quot;BOTTOM&quot; alt=&quot;$\Omega $&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img3.gif&quot; height=&quot;15&quot; width=&quot;15&quot; /&gt;,
&lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_4 = 5.6$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img161.gif&quot; height=&quot;30&quot; width=&quot;65&quot; /&gt;&amp;nbsp;k&lt;img align=&quot;BOTTOM&quot; alt=&quot;$\Omega $&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img3.gif&quot; height=&quot;15&quot; width=&quot;15&quot; /&gt;, and &lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_E = 2.7$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img162.gif&quot; height=&quot;30&quot; width=&quot;68&quot; /&gt;&amp;nbsp;k&lt;img align=&quot;BOTTOM&quot; alt=&quot;$\Omega $&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img3.gif&quot; height=&quot;15&quot; width=&quot;15&quot; /&gt;.  
You will need to use two separate DC sweep analyses (one from 0&amp;nbsp;V up
to 5&amp;nbsp;V, and one from 5&amp;nbsp;V down to 0&amp;nbsp;V) instead of a transient
analysis.&lt;a href=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/footnode.html#foot1147&quot; name=&quot;tex2html29&quot;&gt;&lt;sup&gt;8&lt;/sup&gt;&lt;/a&gt;Produce a graph of &lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{out}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img9.gif&quot; height=&quot;30&quot; width=&quot;30&quot; /&gt; vs. &lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{in}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img10.gif&quot; height=&quot;30&quot; width=&quot;24&quot; /&gt;. Make note of the values of
&lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{turn~on}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img163.gif&quot; height=&quot;30&quot; width=&quot;56&quot; /&gt;, &lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{turn~off}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img154.gif&quot; height=&quot;30&quot; width=&quot;62&quot; /&gt;, &lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{on}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img164.gif&quot; height=&quot;30&quot; width=&quot;26&quot; /&gt;, and &lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{off}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img165.gif&quot; height=&quot;30&quot; width=&quot;33&quot; /&gt; that Spice
predicts. 


&lt;/li&gt;
&lt;li&gt;Build the circuit using the resistance values you used in your
Spice simulation, and use the &lt;tt&gt;X-Y&lt;/tt&gt; mode of the oscilloscope to
produce a graph of &lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{out}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img9.gif&quot; height=&quot;30&quot; width=&quot;30&quot; /&gt; vs. &lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{in}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img10.gif&quot; height=&quot;30&quot; width=&quot;24&quot; /&gt; for comparison with your
Spice calculation. Measure actual values of &lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{turn~on}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img163.gif&quot; height=&quot;30&quot; width=&quot;56&quot; /&gt;,
&lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{turn~off}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img154.gif&quot; height=&quot;30&quot; width=&quot;62&quot; /&gt;, &lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{on}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img164.gif&quot; height=&quot;30&quot; width=&quot;26&quot; /&gt;, and &lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{off}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img165.gif&quot; height=&quot;30&quot; width=&quot;33&quot; /&gt;. How well do Spice and
experiment compare?


&lt;/li&gt;
&lt;li&gt;Use Equations&amp;nbsp;&lt;a href=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/node4.html#eq:schmitt-divider&quot;&gt;9&lt;/a&gt;-&lt;a href=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/node4.html#eq:schmittturnon&quot;&gt;11&lt;/a&gt;
to show that 
&lt;br /&gt;
&lt;div align=&quot;RIGHT&quot;&gt;
&lt;table align=&quot;CENTER&quot; style=&quot;width: 100%px;&quot;&gt;
&lt;tbody&gt;
&lt;tr valign=&quot;MIDDLE&quot;&gt;&lt;td align=&quot;CENTER&quot; nowrap=&quot;nowrap&quot;&gt;&lt;img alt=&quot;\begin{displaymath}
V_{off} = V_{cc} - \frac{R_2}{R_E}(V_{turn~on} - 0.7~\textrm{V}).
\end{displaymath}&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img166.gif&quot; height=&quot;42&quot; width=&quot;246&quot; /&gt;&lt;/td&gt;
&lt;td align=&quot;RIGHT&quot; width=&quot;10&quot;&gt;(17)&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;Fill in the missing steps leading from 
Equations&amp;nbsp;&lt;a href=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/node4.html#eq:schmittoff1&quot;&gt;13&lt;/a&gt;-&lt;a href=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/node4.html#eq:schmittoff3&quot;&gt;15&lt;/a&gt; to
Equation&amp;nbsp;&lt;a href=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/node4.html#eq:schmittturnoff&quot;&gt;16&lt;/a&gt; in the design discussion
above. Compare theoretical predictions of &lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{turn~on}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img163.gif&quot; height=&quot;30&quot; width=&quot;56&quot; /&gt;,
&lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{turn~off}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img154.gif&quot; height=&quot;30&quot; width=&quot;62&quot; /&gt;, &lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{on}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img164.gif&quot; height=&quot;30&quot; width=&quot;26&quot; /&gt;, and &lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{off}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img165.gif&quot; height=&quot;30&quot; width=&quot;33&quot; /&gt; with your measurements and
Spice results.


&lt;/li&gt;
&lt;li&gt;What are the theoretical input and output impedances of the
circuit in terms of the resistances &lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_1$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img103.gif&quot; height=&quot;30&quot; width=&quot;22&quot; /&gt;, &lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_2$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img104.gif&quot; height=&quot;30&quot; width=&quot;22&quot; /&gt;, &lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_3$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img167.gif&quot; height=&quot;30&quot; width=&quot;22&quot; /&gt;, &lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_4$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img139.gif&quot; height=&quot;30&quot; width=&quot;22&quot; /&gt;, and
&lt;img align=&quot;MIDDLE&quot; alt=&quot;$R_E$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img105.gif&quot; height=&quot;30&quot; width=&quot;25&quot; /&gt;?  The voltage specifications of your Schmitt trigger (the values
of &lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{turn~on}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img163.gif&quot; height=&quot;30&quot; width=&quot;56&quot; /&gt;, &lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{turn~off}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img154.gif&quot; height=&quot;30&quot; width=&quot;62&quot; /&gt;, &lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{on}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img164.gif&quot; height=&quot;30&quot; width=&quot;26&quot; /&gt;, and &lt;img align=&quot;MIDDLE&quot; alt=&quot;$V_{off}$&quot; border=&quot;0&quot; src=&quot;http://webpages.ursinus.edu/lriley/ref/circuits/img165.gif&quot; height=&quot;30&quot; width=&quot;33&quot; /&gt; you report)
actually depend on the input and output impedances of your trigger,
the input impedance of the load, and output impedance of the driving
circuit. If you would like your circuit to adhere to these
specifications to within 1%, estimate (a) the upper limit on output
impedances of circuits used to generate input signals for your Schmitt
trigger, and (b) the lower limit on input impedances of loads driven
by your Schmitt trigger. Do the function generator and oscilloscope
you used to evaluate the circuit fall within these limits?

&lt;/li&gt;
&lt;/ol&gt;
</content><link rel='replies' type='application/atom+xml' href='http://anibhaskar.blogspot.com/feeds/4888236038393129968/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://anibhaskar.blogspot.com/2013/04/transistor-circuits-transistor-behavior.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7313231459909421467/posts/default/4888236038393129968'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7313231459909421467/posts/default/4888236038393129968'/><link rel='alternate' type='text/html' href='http://anibhaskar.blogspot.com/2013/04/transistor-circuits-transistor-behavior.html' title='Transistor Circuits &amp; Transistor Behavior '/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12437203074866629318</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7313231459909421467.post-7868701445845838442</id><published>2013-03-10T01:07:00.001-08:00</published><updated>2013-06-24T01:29:54.213-07:00</updated><title type='text'>Wireless power transmission &amp; mobile charger </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;Achievement&quot; style=&quot;margin-left: 72.0pt; mso-list: none; tab-stops: 36.0pt; text-indent: 36.0pt;&quot;&gt;
&lt;span lang=&quot;X-NONE&quot; style=&quot;font-family: &#39;Arial Black&#39;, sans-serif; text-indent: 36pt;&quot;&gt;Wireless
power transmission (wireless phone charger)&lt;/span&gt;&lt;span lang=&quot;X-NONE&quot; style=&quot;text-indent: 36pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.challenge.toradex.com/projects/10014-wireless-power-transmission&quot;&gt;http://www.challenge.toradex.com/projects/10014-wireless-power-transmission&lt;/a&gt;&lt;/div&gt;
&lt;h3&gt;
&lt;span lang=&quot;X-NONE&quot;&gt;This project was
developed by using the basic principles of electric field. In it power could be
transmitted without any physical connection. In it we made a mini UPS to
convert DC to AC and coils to create electric and magnetic field. The range of
power transmission is 32.00 cm.&lt;/span&gt;&lt;/h3&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKid-LCcwFlekxeMCGUJDw1kGQ7h8YHDcler4neTgktkSLMZm7RcLcj032kIM1hCJvh_gJxVGx912xTnXgSdAIJOlOaJcNnhELf1j_9bLxdTuIIpdJ1eVFEXilrGX-FhCe6sU56F0kycE/s1600/wireless.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKid-LCcwFlekxeMCGUJDw1kGQ7h8YHDcler4neTgktkSLMZm7RcLcj032kIM1hCJvh_gJxVGx912xTnXgSdAIJOlOaJcNnhELf1j_9bLxdTuIIpdJ1eVFEXilrGX-FhCe6sU56F0kycE/s1600/wireless.png&quot; height=&quot;320&quot; width=&quot;269&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.youtube.com/watch?v=SGofVINLnRs&quot; style=&quot;text-align: start;&quot;&gt;https://www.youtube.com/watch?v=SGofVINLnRs&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://anibhaskar.blogspot.com/feeds/7868701445845838442/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://anibhaskar.blogspot.com/2013/03/wireless-power-transmission-mobile.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7313231459909421467/posts/default/7868701445845838442'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7313231459909421467/posts/default/7868701445845838442'/><link rel='alternate' type='text/html' href='http://anibhaskar.blogspot.com/2013/03/wireless-power-transmission-mobile.html' title='Wireless power transmission &amp; mobile charger '/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12437203074866629318</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKid-LCcwFlekxeMCGUJDw1kGQ7h8YHDcler4neTgktkSLMZm7RcLcj032kIM1hCJvh_gJxVGx912xTnXgSdAIJOlOaJcNnhELf1j_9bLxdTuIIpdJ1eVFEXilrGX-FhCe6sU56F0kycE/s72-c/wireless.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7313231459909421467.post-585562619404207431</id><published>2013-03-01T05:26:00.000-08:00</published><updated>2013-07-16T05:21:59.891-07:00</updated><title type='text'>ROBOTIC ARM</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2&gt;
Robotic ARM with 4 DOF....&lt;/h2&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: georgia, serif; font-size: large;&quot;&gt;The aim of designing an automated robotic arm controller is achieved by sequential programming of the micro controller based up on real time constraints. This paper includes the design, working and implementation of the automated robotic arm for industrial applications.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: georgia, serif; font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: georgia, serif; font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;img alt=&quot;Robotic Arm Project&quot; src=&quot;http://eceprojects.net/wp-content/uploads/2013/02/Robotic-Arm-Project.jpg&quot; height=&quot;311&quot; style=&quot;font-family: arial; font-size: small;&quot; title=&quot;Robotic Arm Project&quot; width=&quot;628&quot; /&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: georgia, palatino;&quot;&gt;In this Robotic Arm Project Report&amp;nbsp;we explain about a robotic arm control circuit using a micro controller which controls the mechanical movements of the robotic arm. In recent days robotics is gaining enormous attention in industrial automation applications.&lt;/span&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;font-family: arial;&quot;&gt;
&lt;span style=&quot;font-family: georgia, palatino;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;These programmable re-programmable multi functional manipulating devices are intensively used in the hazardous conditions. The term robot is nothing but the electro mechanical device which mimics the human behavior in implementing tasks, while robotics is the science and technology which deals with the design, construction and implementation of robots.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: arial;&quot;&gt;
&lt;span style=&quot;font-family: georgia, palatino;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;The robotic arm had two servo motors and a dc motor, the servo motors are placed at the shoulders facilitates the circular and angular movements and the dc motor at the wrist allows the robot arm to pick and pale of the objects.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: arial;&quot;&gt;
&lt;span style=&quot;font-family: georgia, palatino;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;The micro controller used in this robotic arm project is an low power and high performance CMOS 8-bit micro controller manufactured using AVR enhanced RISC architecture, these devices are capable of executing powerful instructions in an single clock cycle.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: arial;&quot;&gt;
&lt;span style=&quot;font-family: georgia, palatino;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;The proposed system mainly consists of three sections server computer, robotic arm and automated guided vehicle. The controlling circuit had micro controller which is programmed based up on the assembly level language.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: arial;&quot;&gt;
&lt;span style=&quot;font-family: georgia, palatino;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;This robotic arm technology is applicable in automated guided vehicle or automatic guided vehicle systems, obstacle sensing and guidance systems, Industrial automated equipment carrier’s automated cars and Industrial automated equipment carrier’s automated cars.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: arial;&quot;&gt;
&lt;span style=&quot;font-family: georgia, palatino;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;These systems are Time saving, eliminates the need of human labor in dangerous working conditions, implements sequential and systematic operation, facilitates wireless operation with easy maintenance.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: georgia, palatino;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;a href=&quot;http://www.youtube.com/watch?v=ddk24AOLJpc&amp;amp;feature=youtu.be&quot;&gt;http://www.youtube.com/watch?v=ddk24AOLJpc&amp;amp;feature=youtu.be&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://anibhaskar.blogspot.com/feeds/585562619404207431/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://anibhaskar.blogspot.com/2013/03/robotic-arm.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7313231459909421467/posts/default/585562619404207431'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7313231459909421467/posts/default/585562619404207431'/><link rel='alternate' type='text/html' href='http://anibhaskar.blogspot.com/2013/03/robotic-arm.html' title='ROBOTIC ARM'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12437203074866629318</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7313231459909421467.post-6158557635660163434</id><published>2013-01-30T22:30:00.001-08:00</published><updated>2013-01-31T00:48:15.398-08:00</updated><title type='text'>Stop Watch Verilog</title><content type='html'>module Stopwatch ( M0_seg,S1_seg,S0_seg,MS1_seg,MS0_seg, reset,switch,clock);&lt;br /&gt;
// M0 for minute segment&lt;br /&gt;
// S1 for MSB second&lt;br /&gt;
// S0 for LSB second&lt;br /&gt;
// MS1 for MSB Msecond&lt;br /&gt;
// MS0 for LSB Msecond&lt;br /&gt;
&lt;br /&gt;
output [7:0] M0_seg;&lt;br /&gt;
output [7:0] S1_seg;&lt;br /&gt;
output [7:0] S0_seg;&lt;br /&gt;
output [7:0] MS1_seg;&lt;br /&gt;
output [7:0] MS0_seg;&lt;br /&gt;
&lt;br /&gt;
reg [7:0] M0_seg; &lt;br /&gt;
reg [7:0] S1_seg;&lt;br /&gt;
reg [7:0] S0_seg; &lt;br /&gt;
reg [7:0] MS1_seg;&lt;br /&gt;
reg [7:0] MS0_seg;&lt;br /&gt;
&lt;br /&gt;
input switch;&lt;br /&gt;
input reset;&lt;br /&gt;
input clock;&lt;br /&gt;
&lt;br /&gt;
reg [3:0] M0;&lt;br /&gt;
reg [3:0] S1;&lt;br /&gt;
reg [3:0] S0;&lt;br /&gt;
reg [3:0] MS1;&lt;br /&gt;
reg [3:0] MS0; &lt;br /&gt;
&lt;br /&gt;
always @(posedge clock or posedge reset)&lt;br /&gt;
&amp;nbsp;begin: &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; reg check;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; reg counting;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (reset) begin&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; M0&amp;lt;= 0;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; S1 &amp;lt;= 0;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; S0 &amp;lt;= 0;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MS1 &amp;lt;= 0;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MS0 &amp;lt;= 0;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; counting = 0;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; check =0;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; end&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; else begin&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ((switch &amp;amp;&amp;amp; (!check))) begin&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; check = 1;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; counting = (!counting);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if ((!switch)) begin&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; check = 0;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (counting) begin&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ((MS0 == 9)) begin&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MS0 &amp;lt;= 0;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ((MS1 == 9)) begin&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MS1 &amp;lt;= 0;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ((S0 == 9)) begin&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; S0 &amp;lt;= 0;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  if ((S1 == 5)) begin&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; S1 &amp;lt;= 0;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  if ((M0 == 9)) begin&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; M0 &amp;lt;= 0;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else begin&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MS0 &amp;lt;= (MS0 + 1);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else begin&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MS1 &amp;lt;= (MS1 + 1);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else begin&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; S0 &amp;lt;= (S0 + 1);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end&lt;br /&gt;
&amp;nbsp; else begin&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; S1 &amp;lt;= (S1 + 1);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end&lt;br /&gt;
&amp;nbsp; else begin&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; M0 &amp;lt;= (M0 + 1);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
always @(posedge clock)&lt;br /&gt;
begin:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case (M0)&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0: M0_seg &amp;lt;= 64;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1: M0_seg &amp;lt;= 121;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2: M0_seg &amp;lt;= 36;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3: M0_seg &amp;lt;= 48;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4: M0_seg &amp;lt;= 25;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5: M0_seg &amp;lt;= 18;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6: M0_seg &amp;lt;= 2;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7: M0_seg &amp;lt;= 120;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8: M0_seg &amp;lt;= 0;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; default: M0_seg &amp;lt;= 16;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; endcase&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
always @(posedge clock)&lt;br /&gt;
&amp;nbsp;begin:&lt;br /&gt;
case (S1)&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0: S1_seg &amp;lt;= 64;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1: S1_seg &amp;lt;= 121;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2: S1_seg &amp;lt;= 36;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3: S1_seg &amp;lt;= 48;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4: S1_seg &amp;lt;= 25;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5: S1_seg &amp;lt;= 18;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6: S1_seg &amp;lt;= 2;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7: S1_seg &amp;lt;= 120;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8: S1_seg &amp;lt;= 0;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; default: S1_seg &amp;lt;= 16;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; endcase&lt;br /&gt;
&lt;br /&gt;
end &lt;br /&gt;
&lt;br /&gt;
always @(posedge clock)&lt;br /&gt;
&amp;nbsp;begin:&lt;br /&gt;
case (S0)&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0: S0_seg &amp;lt;= 64;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1: S0_seg &amp;lt;= 121;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2: S0_seg &amp;lt;= 36;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3: S0_seg &amp;lt;= 48;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4: S0_seg &amp;lt;= 25;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5: S0_seg &amp;lt;= 18;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6: S0_seg &amp;lt;= 2;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7: S0_seg &amp;lt;= 120;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8: S0_seg &amp;lt;= 0;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; default: S0_seg &amp;lt;= 16;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; endcase&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
always @(posedge clock)&lt;br /&gt;
&amp;nbsp;begin:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;case (MS1)&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0: MS1_seg &amp;lt;= 64;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1: MS1_seg &amp;lt;= 121;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2: MS1_seg &amp;lt;= 36;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3: MS1_seg &amp;lt;= 48;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4: MS1_seg &amp;lt;= 25;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5: MS1_seg &amp;lt;= 18;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6: MS1_seg &amp;lt;= 2;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7: MS1_seg &amp;lt;= 120;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8: MS1_seg &amp;lt;= 0;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; default: MS1_seg &amp;lt;= 16;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; endcase&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
always @(posedge clock)&lt;br /&gt;
&amp;nbsp;begin: &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; case (MS0)&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0: MS0_seg &amp;lt;= 64;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1: MS0_seg &amp;lt;= 121;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2: MS0_seg &amp;lt;= 36;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3: MS0_seg &amp;lt;= 48;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4: MS0_seg &amp;lt;= 25;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5: MS0_seg &amp;lt;= 18;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6: MS0_seg &amp;lt;= 2;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7: MS0_seg &amp;lt;= 120;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8: MS0_seg &amp;lt;= 0;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; default: MS0_seg &amp;lt;= 16;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; endcase&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
endmodule</content><link rel='replies' type='application/atom+xml' href='http://anibhaskar.blogspot.com/feeds/6158557635660163434/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://anibhaskar.blogspot.com/2013/01/blog-post.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7313231459909421467/posts/default/6158557635660163434'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7313231459909421467/posts/default/6158557635660163434'/><link rel='alternate' type='text/html' href='http://anibhaskar.blogspot.com/2013/01/blog-post.html' title='Stop Watch Verilog'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12437203074866629318</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7313231459909421467.post-1940004201015517963</id><published>2013-01-23T20:38:00.002-08:00</published><updated>2013-01-23T20:39:25.775-08:00</updated><title type='text'>VHDL v/s VERILOG</title><content type='html'>VHDL pros: 
&lt;br /&gt;
- Rich async logic support (when/else; with/select) outside of process blocks.
&lt;br /&gt;
- Good signed support.
&lt;br /&gt;
- Strongly typed.
&lt;br /&gt;
- Roll your own custom types.
&lt;br /&gt;
- Nice package support.
&lt;br /&gt;
- Can easily flip a vector.
&lt;br /&gt;
- Async reset is a level (as God intended).
&lt;br /&gt;
&lt;br /&gt;
VHDL cons:
&lt;br /&gt;
- Tedious module prototype instantiation.
&lt;br /&gt;
- Vector &quot;to&quot; and &quot;downto&quot; can be confusingly redundant information.
&lt;br /&gt;
- Output port type of &quot;buffer&quot; should be the default, but is considered bad form.
&lt;br /&gt;
- Sensitivity lists for async blocks (usually ignored by synthesis).
&lt;br /&gt;
- No block commenting, only line.
&lt;br /&gt;
- More verbose = more typing &amp;amp; pasting.
&lt;br /&gt;
&lt;br /&gt;
Verilog pros:
&lt;br /&gt;
- Nice vector bit operations &amp;amp; reductions.
&lt;br /&gt;
- Nice parameter support.
&lt;br /&gt;
- Nice vector definition &amp;amp; concatenation.
&lt;br /&gt;
- Weakly typed.
&lt;br /&gt;
- Nice loops.
&lt;br /&gt;
- Default (*) sensitivity lists for async blocks.
&lt;br /&gt;
- Both block &amp;amp; line commenting.
&lt;br /&gt;
- Less verbose = less typing &amp;amp; pasting.
&lt;br /&gt;
&lt;br /&gt;
Verilog cons:
&lt;br /&gt;
- A &quot;reg&quot; is often actually a &quot;wire&quot; which is incredibly confusing at first.
&lt;br /&gt;
- Poor async support.
&lt;br /&gt;
- No package support, have to make do with include statements &amp;amp; the like.
&lt;br /&gt;
- Cryptic select statements.
&lt;br /&gt;
- Have to manually size and enumerate state vectors, even if this info will be ignored later.
&lt;br /&gt;
- Async reset is an edge, not a level, which is idiotic.
&lt;br /&gt;
- Undeclared wires often aren&#39;t flagged by the synthesizer, reducing vectors to single wires.
&lt;br /&gt;
- Can&#39;t easily flip a vector (must do in a loop).
&lt;br /&gt;
- Blocking vs. non-blocking nonsense.
&lt;br /&gt;
- Awkward &quot;begin&quot; and &quot;end&quot; instead of parenthesis.
&lt;br /&gt;
- Dangerous (global/local) defparam statement.
&lt;br /&gt;
- Subtle differences between &amp;amp;&amp;amp; and &amp;amp;; || and |; ~ and !.
</content><link rel='replies' type='application/atom+xml' href='http://anibhaskar.blogspot.com/feeds/1940004201015517963/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://anibhaskar.blogspot.com/2013/01/vhds-vs-verilog.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7313231459909421467/posts/default/1940004201015517963'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7313231459909421467/posts/default/1940004201015517963'/><link rel='alternate' type='text/html' href='http://anibhaskar.blogspot.com/2013/01/vhds-vs-verilog.html' title='VHDL v/s VERILOG'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12437203074866629318</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7313231459909421467.post-6464871592516856631</id><published>2013-01-14T21:28:00.002-08:00</published><updated>2013-01-14T21:28:47.286-08:00</updated><title type='text'>verilog HDL code</title><content type='html'>&lt;h3 class=&quot;post-title entry-title&quot; itemprop=&quot;name&quot;&gt;
Verilog codes for different Shift-registers
&lt;/h3&gt;
&lt;div class=&quot;post-header&quot;&gt;

&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
Verilog code for an 8-bit shift-left         register with a positive-edge clock, serial in and serial out.&lt;br /&gt;&lt;pre&gt; module shift (clk, si, so);
 input        clk,si;
 output       so;
 reg    [7:0] tmp;
 always @(posedge clk)
 begin
    tmp    &amp;lt;= tmp &amp;lt;&amp;lt; 1;
    tmp[0] &amp;lt;= si;
 end
    assign so = tmp[7];
        endmodule
        &lt;/pre&gt;
&lt;br /&gt;&lt;br /&gt; Verilog code for an 8-bit shift-left         register with a 
negative-edge clock, a clock enable, a serial in and a         serial 
out.&lt;br /&gt;&lt;pre&gt; module shift (clk, ce, si, so);
 input        clk, si, ce;
 output       so;
 reg    [7:0] tmp;
 always @(negedge clk)
 begin
    if (ce) begin
       tmp    &amp;lt;= tmp &amp;lt;&amp;lt; 1;
       tmp[0] &amp;lt;= si;
    end
 end
    assign so = tmp[7];
        endmodule
        &lt;/pre&gt;
Verilog code for an 8-bit shift-left         register with a 
positive-edge clock, asynchronous clear, serial in and         serial 
out.&lt;br /&gt;&lt;pre&gt; module shift (clk, clr, si, so);
 input        clk, si, clr;
 output       so;
 reg    [7:0] tmp;
 always @(posedge clk or posedge clr)
 begin
    if (clr)
       tmp &amp;lt;= 8’b00000000;
    else
       tmp &amp;lt;= {tmp[6:0], si};
 end
    assign so = tmp[7];
        endmodule
        &lt;/pre&gt;
Verilog code for an 8-bit shift-left         register with a 
positive-edge clock, a synchronous set, a serial in and         a serial
 out.&lt;br /&gt;&lt;pre&gt; module shift (clk, s, si, so);
 input        clk, si, s;
 output       so;
 reg    [7:0] tmp;
 always @(posedge clk)
 begin
    if (s)
       tmp &amp;lt;= 8’b11111111;
    else
       tmp &amp;lt;= {tmp[6:0], si};
 end
    assign so = tmp[7];
        endmodule
        &lt;/pre&gt;
&lt;br /&gt; Verilog code for an 8-bit shift-left         register with a positive-edge clock, a serial in and a parallel out.&lt;br /&gt;&lt;pre&gt;        module shift (clk, si, po);
        input        clk, si;
        output [7:0] po;
        reg    [7:0] tmp;
        always @(posedge clk)
        begin
           tmp &amp;lt;= {tmp[6:0], si};
        end
           assign po = tmp;
        endmodule
        &lt;/pre&gt;
&lt;br /&gt; Verilog code for an 8-bit shift-left         register with a 
positive-edge clock, an asynchronous parallel load, a         serial in 
and a serial out.&lt;br /&gt;&lt;pre&gt; module shift (clk, load, si, d, so);
 input        clk, si, load;
 input  [7:0] d;
 output       so;
 reg    [7:0] tmp;
 always @(posedge clk or posedge load)
 begin
    if (load) 
              tmp &amp;lt;= d;
    else
       tmp &amp;lt;= {tmp[6:0], si};
 end
    assign so = tmp[7];
        endmodule
        &lt;/pre&gt;
&lt;br /&gt; Verilog code for an 8-bit shift-left         register with a 
positive-edge clock, a synchronous parallel load, a         serial in 
and a serial out.&lt;br /&gt;&lt;pre&gt;        module shift (clk, sload, si, d, so);
        input        clk, si, sload;
        input  [7:0] d;
        output       so;
        reg    [7:0] tmp;
        always @(posedge clk)
        begin
           if (sload)
              tmp &amp;lt;= d;
           else
              tmp &amp;lt;= {tmp[6:0], si};
        end
           assign so = tmp[7];
        endmodule
        &lt;/pre&gt;
&lt;br /&gt; Verilog code for an 8-bit         shift-left/shift-right register 
with a positive-edge clock, a serial in         and a serial out.&lt;br /&gt;&lt;pre&gt; module shift (clk, si, left_right, po);
 input        clk, si, left_right;
 output       po;
 reg    [7:0] tmp;
 always @(posedge clk)
 begin
    if (left_right == 1’b0)
       tmp &amp;lt;= {tmp[6:0], si};
    else
       tmp &amp;lt;= {si, tmp[7:1]};
 end
    assign po = tmp;
        endmodule
        &lt;/pre&gt;
&lt;/h4&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://anibhaskar.blogspot.com/feeds/6464871592516856631/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://anibhaskar.blogspot.com/2013/01/verilog-hdl-code.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7313231459909421467/posts/default/6464871592516856631'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7313231459909421467/posts/default/6464871592516856631'/><link rel='alternate' type='text/html' href='http://anibhaskar.blogspot.com/2013/01/verilog-hdl-code.html' title='verilog HDL code'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12437203074866629318</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7313231459909421467.post-7928743230438428154</id><published>2012-12-06T02:05:00.000-08:00</published><updated>2013-01-27T18:52:35.277-08:00</updated><title type='text'>BASIC ELECTRONICS</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;table bgcolor=&quot;#fafafa&quot; border=&quot;0&quot; style=&quot;width: 96%px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td align=&quot;left&quot; valign=&quot;top&quot; width=&quot;60%&quot;&gt;&lt;h1&gt;
AC Waveform&lt;/h1&gt;
&lt;/td&gt;
        &lt;td align=&quot;center&quot; class=&quot;mtxt&quot; valign=&quot;bottom&quot; width=&quot;40%&quot;&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&lt;table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; style=&quot;width: 100%px;&quot;&gt;
         &lt;tbody&gt;
&lt;tr&gt;&lt;td align=&quot;left&quot; valign=&quot;bottom&quot; width=&quot;60%&quot;&gt;&lt;span class=&quot;pagetxt&quot;&gt;Tutorial: 1 of 12&lt;/span&gt;&lt;/td&gt;
          &lt;td align=&quot;center&quot; valign=&quot;top&quot; width=&quot;40%&quot;&gt;&lt;form action=&quot;http://www.electronics-tutorials.ws/accircuits/AC-waveform.html&quot; name=&quot;page&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/form&gt;
&lt;/td&gt;
         &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/td&gt;
       &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;h2 class=&quot;htxt&quot;&gt;
The AC Waveform&lt;/h2&gt;
&lt;div align=&quot;justify&quot;&gt;
&lt;b&gt;Direct Current&lt;/b&gt; or &lt;b&gt;D.C.&lt;/b&gt; as it is more commonly called, is a form of current or voltage
that flows around an electrical circuit in one direction only, making it a &quot;Uni-directional&quot; supply. Generally, both DC
currents and voltages are produced by power supplies, batteries, dynamos and solar cells to name a few. A DC voltage or
current has a fixed magnitude (amplitude) and a definite direction associated with it. For example, &lt;span class=&quot;ntxt&quot;&gt;+12V&lt;/span&gt;
represents 12 volts in the positive direction, or &lt;span class=&quot;ntxt&quot;&gt;-5V&lt;/span&gt; represents 5 volts in the negative direction.&lt;/div&gt;
&lt;div align=&quot;justify&quot;&gt;
We also know that DC power supplies do not change their value with regards to time, they are a constant
value flowing in a continuous steady state direction. In other words, DC maintains the same value for all times and a constant
uni-directional DC supply never changes or becomes negative unless its connections are physically reversed. An example of
a simple DC or direct current circuit is shown below.&lt;/div&gt;
&lt;h3 class=&quot;h3txt&quot;&gt;
DC Circuit and Waveform&lt;/h3&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;img alt=&quot;DC Circuit and DC Waveform&quot; border=&quot;0&quot; src=&quot;http://www.electronics-tutorials.ws/accircuits/acp1.gif&quot; height=&quot;172px&quot; width=&quot;457px&quot; /&gt;&lt;/div&gt;
&lt;div align=&quot;justify&quot;&gt;
&lt;br /&gt;
An alternating function or &lt;b&gt;AC Waveform&lt;/b&gt; on the other hand is defined as one that
varies in both magnitude and direction in more or less an even manner with respect to time making it a &quot;Bi-directional&quot;
waveform. An AC function can represent either a power source or a signal source with the shape of an &lt;i&gt;AC waveform&lt;/i&gt;
generally following that of a mathematical sinusoid as defined by:-
&amp;nbsp;&amp;nbsp;&lt;span class=&quot;mtxt&quot;&gt;A(t)&amp;nbsp;=&amp;nbsp;A&lt;sub&gt;max&lt;/sub&gt;&amp;nbsp;x&amp;nbsp;sin(2πƒt)&lt;/span&gt;.&lt;/div&gt;
&lt;span class=&quot;ad300left&quot;&gt;
&lt;ins style=&quot;border: none; display: inline-table; height: 250px; margin: 0; padding: 0; position: relative; visibility: visible; width: 300px;&quot;&gt;&lt;ins id=&quot;aswift_1_anchor&quot; style=&quot;border: none; display: block; height: 250px; margin: 0; padding: 0; position: relative; visibility: visible; width: 300px;&quot;&gt;&lt;iframe allowtransparency=&quot;true&quot; frameborder=&quot;0&quot; height=&quot;250&quot; hspace=&quot;0&quot; id=&quot;aswift_1&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; name=&quot;aswift_1&quot; scrolling=&quot;no&quot; style=&quot;left: 0; position: absolute; top: 0;&quot; vspace=&quot;0&quot; width=&quot;300&quot;&gt;&lt;/iframe&gt;&lt;/ins&gt;&lt;/ins&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div align=&quot;justify&quot;&gt;
The term AC or to give it its full description of Alternating Current, generally refers to a time-varying waveform
with the most common of all being called a &lt;b&gt;Sinusoid&lt;/b&gt; better known as a &lt;b&gt;Sinusoidal Waveform&lt;/b&gt;.
Sinusoidal waveforms are more generally called by their short description as &lt;b&gt;Sine Waves&lt;/b&gt;. Sine waves are by
far one of the most important types of AC waveform used in electrical engineering.&lt;/div&gt;
&lt;div align=&quot;justify&quot;&gt;
The shape obtained by plotting the instantaneous ordinate values of either voltage or current against time
is called an &lt;b&gt;AC Waveform&lt;/b&gt;. An AC waveform is constantly changing its polarity every half cycle alternating
between a positive maximum value and a negative maximum value respectively with regards to time with a common example of
this being the domestic mains voltage supply we use in our homes.&lt;/div&gt;
&lt;div align=&quot;justify&quot;&gt;
This means then that the &lt;i&gt;AC Waveform&lt;/i&gt; is a &quot;time-dependent signal&quot; with the most common type of
time-dependant signal being that of the &lt;b&gt;Periodic Waveform&lt;/b&gt;.
 The periodic or AC waveform is the resulting
product of a rotating electrical generator. Generally, the shape of any 
periodic waveform can be generated using a
fundamental frequency and superimposing it with harmonic signals of 
varying frequencies and amplitudes but that&#39;s for another tutorial.&lt;/div&gt;
&lt;div align=&quot;justify&quot;&gt;
Alternating voltages and currents can not be stored in batteries or cells like direct current can, it is
much easier and cheaper to generate them using alternators and waveform generators when needed. The type and shape of an AC
waveform depends upon the generator or device producing them, but all AC waveforms consist of a zero voltage line that
divides the waveform into two symmetrical halves. The main characteristics of an &lt;b&gt;AC Waveform&lt;/b&gt; are defined as:&lt;/div&gt;
&lt;h3 class=&quot;h3txt&quot;&gt;
AC Waveform Characteristics&lt;/h3&gt;
&lt;ul&gt;
&lt;li style=&quot;padding-bottom: 10px;&quot;&gt;&lt;span class=&quot;mtxt&quot;&gt;•&amp;nbsp;The Period, (T)&lt;/span&gt; is the length of time in seconds that the waveform takes
to repeat itself from start to finish. This can also be called the &lt;i&gt;Periodic Time&lt;/i&gt; of the waveform for sine waves, or the &lt;i&gt;Pulse Width&lt;/i&gt; 
for square waves.&lt;/li&gt;
&lt;li style=&quot;padding-bottom: 10px;&quot;&gt;&lt;span class=&quot;mtxt&quot;&gt;•&amp;nbsp;The Frequency, (ƒ)&lt;/span&gt; is the number of times the waveform repeats itself within
a one second time period. Frequency is the reciprocal of the time period, (&lt;span class=&quot;ntxt&quot;&gt;&amp;nbsp;ƒ&amp;nbsp;=&amp;nbsp;1/T&amp;nbsp;&lt;/span&gt;) with 
the unit of frequency being the &lt;i&gt;Hertz&lt;/i&gt;, (Hz).&lt;/li&gt;
&lt;li style=&quot;padding-bottom: 10px;&quot;&gt;&lt;span class=&quot;mtxt&quot;&gt;•&amp;nbsp;The Amplitude (A)&lt;/span&gt; is the magnitude or intensity of the signal waveform measured
in volts or amps.&lt;/li&gt;
&lt;/ul&gt;
&lt;div align=&quot;justify&quot;&gt;
In our tutorial about &lt;i&gt;&lt;a href=&quot;http://www.electronics-tutorials.ws/waveforms/waveforms.html&quot;&gt;Waveforms&lt;/a&gt;&lt;/i&gt;&amp;nbsp;,
we looked at different types of waveforms and said that &quot;&lt;b&gt;Waveforms&lt;/b&gt;
 are basically a visual representation of the variation of 
a voltage or current plotted to a base of time&quot;. Generally, for AC 
waveforms this horizontal base line represents a zero condition of 
either 
voltage or current. Any part of an AC type waveform which lies above the
 horizontal zero axis represents a voltage or current flowing in one 
direction. Likewise, any part of the waveform which lies below the 
horizontal zero axis represents a voltage or current flowing in the 
opposite 
direction to the first. Generally for sinusoidal AC waveforms the shape 
of the waveform above the zero axis is the same as the shape below 
it. However, for most non-power AC signals including audio waveforms 
this is not always the case.&lt;/div&gt;
&lt;div align=&quot;justify&quot;&gt;
The most common periodic signal waveforms that are used in Electrical and Electronic Engineering are the 
&lt;i&gt;Sinusoidal Waveforms&lt;/i&gt;. However, an alternating AC waveform may not always take the shape of a smooth shape based around the 
trigonometric sine or cosine function. AC waveforms can also take the shape of either &lt;i&gt;Complex Waves&lt;/i&gt;, &lt;i&gt;Square Waves&lt;/i&gt; 
or &lt;i&gt;Triangular Waves&lt;/i&gt; and these are shown below.&lt;/div&gt;
&lt;h3 class=&quot;h3txt&quot;&gt;
Types of Periodic Waveform&lt;/h3&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;img alt=&quot;Periodic AC Waveform Types&quot; border=&quot;0&quot; src=&quot;http://www.electronics-tutorials.ws/accircuits/acp2.gif&quot; height=&quot;337px&quot; width=&quot;563px&quot; /&gt;&lt;/div&gt;
&lt;div align=&quot;justify&quot;&gt;
&lt;br /&gt;
The time taken for an &lt;b&gt;AC Waveform&lt;/b&gt; to complete one full pattern from its positive half
to its negative half and back to its zero baseline again is called a &lt;b&gt;Cycle&lt;/b&gt; and one complete cycle contains both 
a positive half-cycle and a negative half-cycle. The time taken by the waveform to complete one full cycle is called the 
&lt;b&gt;Periodic Time&lt;/b&gt; of the waveform, and is given the symbol &lt;span class=&quot;ntxt&quot;&gt;T&lt;/span&gt;. The number of 
complete cycles that are produced within one second (cycles/second) is called the &lt;b&gt;Frequency&lt;/b&gt;, symbol 
&lt;span class=&quot;ntxt&quot;&gt;ƒ&lt;/span&gt; of the alternating waveform. Frequency is measured in &lt;b&gt;Hertz&lt;/b&gt;, 
(&amp;nbsp;&lt;span class=&quot;ntxt&quot;&gt;Hz&lt;/span&gt;&amp;nbsp;) named after the German physicist Heinrich Hertz.&lt;/div&gt;
&lt;div align=&quot;justify&quot;&gt;
Then we can see that a relationship exists between cycles (oscillations), periodic time and frequency 
(cycles per second), so if there are &lt;span class=&quot;ntxt&quot;&gt;ƒ&lt;/span&gt; number of cycles in one second, each individual cycle
must take &lt;span class=&quot;ntxt&quot;&gt;1/ƒ&lt;/span&gt; seconds to complete.&lt;/div&gt;
&lt;h3 class=&quot;h3txt&quot;&gt;
Relationship Between Frequency and Periodic Time&lt;/h3&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;img alt=&quot;Frequency and Periodic Time Relationship&quot; border=&quot;0&quot; src=&quot;http://www.electronics-tutorials.ws/accircuits/acp3.gif&quot; height=&quot;213px&quot; width=&quot;501px&quot; /&gt;&lt;/div&gt;
&lt;h2 class=&quot;h2txt&quot;&gt;
Example No1&lt;/h2&gt;
&lt;div align=&quot;justify&quot;&gt;
1. What will be the periodic time of a 50Hz waveform and 2. what is the frequency of an AC waveform that 
has a periodic time of 10mS.&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&amp;nbsp;&amp;nbsp;1).&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;img alt=&quot;Periodic Time&quot; border=&quot;0&quot; src=&quot;http://www.electronics-tutorials.ws/accircuits/acp4.gif&quot; height=&quot;64px&quot; width=&quot;482px&quot; /&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&amp;nbsp;&amp;nbsp;2).&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;img alt=&quot;Frequency&quot; border=&quot;0&quot; src=&quot;http://www.electronics-tutorials.ws/accircuits/acp5.gif&quot; height=&quot;62px&quot; width=&quot;406px&quot; /&gt;&lt;/div&gt;
&lt;div align=&quot;justify&quot;&gt;
Frequency used to be expressed in &quot;cycles per second&quot; abbreviated to &quot;cps&quot;, but today it is more commonly
specified in units called &quot;Hertz&quot;. For a domestic mains supply the frequency will be either 50Hz or 60Hz depending upon the
country and is fixed by the speed of rotation of the generator. But one hertz is a very small unit so prefixes are used that
denote the order of magnitude of the waveform at higher frequencies such as &lt;b&gt;kHz&lt;/b&gt;, &lt;b&gt;MHz&lt;/b&gt; and even &lt;b&gt;GHz&lt;/b&gt;.&lt;/div&gt;
&lt;table align=&quot;center&quot; bgcolor=&quot;#ffffff&quot; border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; class=&quot;mtxt&quot; style=&quot;width: 480pxpx;&quot;&gt;
&lt;tbody&gt;
&lt;tr align=&quot;center&quot; bgcolor=&quot;#d3e0ea&quot;&gt;
&lt;td width=&quot;120px&quot;&gt;Prefix&lt;/td&gt;&lt;td width=&quot;120px&quot;&gt;Definition&lt;/td&gt;&lt;td width=&quot;120px&quot;&gt;Written as&lt;/td&gt;&lt;td width=&quot;120px&quot;&gt;Periodic Time&lt;/td&gt;&lt;/tr&gt;
&lt;tr align=&quot;center&quot;&gt;&lt;td&gt;Kilo&lt;/td&gt;&lt;td&gt;Thousand&lt;/td&gt;&lt;td&gt;kHz&lt;/td&gt;&lt;td&gt;1mS&lt;/td&gt;&lt;/tr&gt;
&lt;tr align=&quot;center&quot;&gt;&lt;td&gt;Mega&lt;/td&gt;&lt;td&gt;Million&lt;/td&gt;&lt;td&gt;MHz&lt;/td&gt;&lt;td&gt;1uS&lt;/td&gt;&lt;/tr&gt;
&lt;tr align=&quot;center&quot;&gt;&lt;td&gt;Giga&lt;/td&gt;&lt;td&gt;Billion&lt;/td&gt;&lt;td&gt;GHz&lt;/td&gt;&lt;td&gt;1nS&lt;/td&gt;&lt;/tr&gt;
&lt;tr align=&quot;center&quot;&gt;&lt;td&gt;Terra&lt;/td&gt;&lt;td&gt;Trillion&lt;/td&gt;&lt;td&gt;THz&lt;/td&gt;&lt;td&gt;1pS&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h2 class=&quot;h2txt&quot;&gt;
&lt;br /&gt;Amplitude of an AC Waveform&lt;/h2&gt;
&lt;div align=&quot;justify&quot;&gt;
As well as knowing either the periodic time or the frequency of the alternating quantity, another important
parameter of the AC waveform is &lt;b&gt;Amplitude&lt;/b&gt;, better known as its Maximum or Peak value represented by the terms, 
&lt;span class=&quot;ntxt&quot;&gt;V&lt;i&gt;max&lt;/i&gt;&lt;/span&gt; for voltage or &lt;span class=&quot;ntxt&quot;&gt;I&lt;i&gt;max&lt;/i&gt;&lt;/span&gt; for current. The peak value is the 
greatest value of either voltage or current that the waveform reaches during each half cycle measured from the zero baseline. 
Unlike a DC voltage or current which has a steady state that can be measured or calculated using 
&lt;i&gt;&lt;a href=&quot;http://www.electronics-tutorials.ws/dccircuits/dcp_2.html&quot;&gt;Ohm&#39;s Law&lt;/a&gt;&lt;/i&gt;, an alternating quantity is constantly 
changing its value over time.&lt;/div&gt;
&lt;div align=&quot;justify&quot;&gt;
For pure sinusoidal waveforms this peak value will always be the same for both half cycles
(&lt;span class=&quot;ntxt&quot;&gt;&amp;nbsp;+Vm&amp;nbsp;=&amp;nbsp;-Vm&amp;nbsp;&lt;/span&gt;) but for non-sinusoidal or complex waveforms the maximum peak value
can be very different for each half cycle. Sometimes, alternating waveforms are given a &lt;i&gt;peak-to-peak&lt;/i&gt;, 
&lt;span class=&quot;ntxt&quot;&gt;V&lt;i&gt;p-p&lt;/i&gt;&lt;/span&gt; value and this is simply the distance or the sum in voltage between the maximum peak value, 
&lt;span class=&quot;ntxt&quot;&gt;+V&lt;i&gt;max&lt;/i&gt;&lt;/span&gt; and the minimum peak value, &lt;span class=&quot;ntxt&quot;&gt;-V&lt;i&gt;max&lt;/i&gt;&lt;/span&gt; during one 
complete cycle.&lt;/div&gt;
&lt;h2 class=&quot;h2txt&quot;&gt;
The Average Value of an AC Waveform&lt;/h2&gt;
&lt;div align=&quot;justify&quot;&gt;
The average or mean value of a continuous DC voltage 
will always be equal to its maximum peak value as a DC 
voltage is constant. This average value will only change if the duty 
cycle of the DC voltage changes. In a pure sine wave if the 
average value is calculated over the full cycle, the average value would
 be equal to zero as the positive and negative halves 
will cancel each other out. So the average or mean value of an AC 
waveform is calculated or measured over a half cycle only and 
this is shown below.&lt;/div&gt;
&lt;h3 class=&quot;h3txt&quot;&gt;
Average Value of a Non-sinusoidal Waveform&lt;/h3&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;img alt=&quot;Average Value of the AC Waveform&quot; border=&quot;0&quot; src=&quot;http://www.electronics-tutorials.ws/accircuits/acp6.gif&quot; height=&quot;428px&quot; width=&quot;484px&quot; /&gt;&lt;/div&gt;
&lt;div align=&quot;justify&quot;&gt;
&lt;br /&gt;
To find the average value of the waveform we need to calculate the area underneath the waveform using the 
mid-ordinate rule, trapezoidal rule or Simpson&#39;s rule found in mathematics. The approximate area under any irregular waveform 
can easily be found by simply using the mid-ordinate rule. The zero axis base line is divided up into any number of equal parts 
and in our simple example above this value was nine, (&amp;nbsp;V&lt;sub&gt;1&lt;/sub&gt; to V&lt;sub&gt;9&lt;/sub&gt;&amp;nbsp;).
 The more ordinate lines that
are drawn the more accurate will be the final average or mean value. The
 average value will be the addition of all the instantaneous
values added together and then divided by the total number. This is 
given as.&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;img alt=&quot;Co-ordinate Rule&quot; border=&quot;0&quot; src=&quot;http://www.electronics-tutorials.ws/accircuits/acp7.gif&quot; height=&quot;68px&quot; width=&quot;417px&quot; /&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
Where: &lt;span class=&quot;ntxt&quot;&gt;n&lt;/span&gt; equals the actual number of mid-ordinates used.&lt;/div&gt;
&lt;div align=&quot;justify&quot;&gt;
For a pure sinusoidal waveform this average or mean value will always be equal to 
&lt;span class=&quot;ntxt&quot;&gt;0.637&amp;nbsp;x&amp;nbsp;V&lt;sub&gt;max&lt;/sub&gt;&lt;/span&gt; and this relationship also holds true for average values of current.&lt;/div&gt;
&lt;h2 class=&quot;h2txt&quot;&gt;
The RMS Value of an AC Waveform&lt;/h2&gt;
&lt;div align=&quot;justify&quot;&gt;
The average value of an AC waveform is NOT the same value as that for a DC waveforms average value. This is
because the AC waveform is constantly changing with time and the heating effect given by the formula 
(&amp;nbsp;&lt;span class=&quot;ntxt&quot;&gt;P&amp;nbsp;=&amp;nbsp;I&lt;sup&gt;&amp;nbsp;2&lt;/sup&gt;.R&lt;/span&gt;&amp;nbsp;), will also be changing producing a positive power 
consumption. The equivalent average value for an alternating current system that provides the same power to the load as a DC 
equivalent circuit is called the &quot;effective value&quot;.&lt;/div&gt;
&lt;div align=&quot;justify&quot;&gt;
This effective power in an alternating current system is therefore equal to:
(&amp;nbsp;&lt;span class=&quot;ntxt&quot;&gt;I&lt;sup&gt;&amp;nbsp;2&lt;/sup&gt;.R.Average&lt;/span&gt;&amp;nbsp;). As power is proportional to current squared, the effective current,
&lt;span class=&quot;ntxt&quot;&gt;I&lt;/span&gt; will be equal to &lt;span class=&quot;mtxt&quot;&gt;√&lt;/span&gt;&lt;span class=&quot;otxt&quot;&gt;&amp;nbsp;I&lt;sup&gt;&amp;nbsp;2&lt;/sup&gt;&amp;nbsp;Ave&lt;/span&gt;. 
Therefore, the effective current in an AC system is called the &lt;b&gt;Root Mean Squared&lt;/b&gt; or &lt;b&gt;R.M.S.&lt;/b&gt; value and RMS values are 
the DC equivalent values that provide the same power to the load.&lt;/div&gt;
&lt;div align=&quot;justify&quot;&gt;
The effective or RMS value of an alternating current 
is measured in terms of the direct current value that 
produces the same heating effect in the same value resistance. The RMS 
value for any AC waveform can be found from the following 
modified average value formula.&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;img alt=&quot;The AC Waveforms Root Mean Squared Value&quot; border=&quot;0&quot; src=&quot;http://www.electronics-tutorials.ws/accircuits/acp8.gif&quot; height=&quot;82px&quot; width=&quot;429px&quot; /&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
Where: &lt;span class=&quot;ntxt&quot;&gt;n&lt;/span&gt; equals the number of mid-ordinates.&lt;br /&gt;
&lt;/div&gt;
&lt;div align=&quot;justify&quot;&gt;
For a pure sinusoidal waveform this effective or R.M.S. value will always be equal to 
&lt;span class=&quot;ntxt&quot;&gt;1/&lt;/span&gt;&lt;span class=&quot;mtxt&quot;&gt;√&lt;/span&gt;&lt;span class=&quot;otxt&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;ntxt&quot;&gt;&amp;nbsp;x&amp;nbsp;V&lt;sub&gt;max&lt;/sub&gt;&lt;/span&gt; 
which is equal to &lt;span class=&quot;ntxt&quot;&gt;0.707&amp;nbsp;x&amp;nbsp;V&lt;sub&gt;max&lt;/sub&gt;&lt;/span&gt; and this relationship holds true for RMS
values of current. The RMS value for a sinusoidal waveform is always greater than the average value except for a rectangular 
waveform. In this case the heating effect remains constant so the average and the RMS values will be the same.&lt;/div&gt;
&lt;div align=&quot;justify&quot;&gt;
One final comment about R.M.S. values. Most 
multimeters, either digital or analogue unless otherwise stated
only measure the R.M.S. values of voltage and current and not the 
average. Therefore when using a multimeter on a direct current system 
the
reading will be equal to &lt;span class=&quot;ntxt&quot;&gt;I&amp;nbsp;=&amp;nbsp;V/R&lt;/span&gt; and for an alternating current system the reading will be 
equal to &lt;span class=&quot;ntxt&quot;&gt;Irms&amp;nbsp;=&amp;nbsp;Vrms/R&lt;/span&gt;.&lt;/div&gt;
&lt;div align=&quot;justify&quot;&gt;
Also, except for average power calculations, when calculating RMS or peak voltages, only use V&lt;sub&gt;RMS&lt;/sub&gt;
to find I&lt;sub&gt;RMS&lt;/sub&gt; values, or peak voltage, Vp to find peak current, Ip values. Do not mix the two together average,
RMS or peak values as they are completely different and your results will be incorrect.&lt;/div&gt;
&lt;h2 class=&quot;h2txt&quot;&gt;
Form Factor and Crest Factor&lt;/h2&gt;
&lt;div align=&quot;justify&quot;&gt;
Although little used these days, both &lt;b&gt;Form Factor&lt;/b&gt; and &lt;b&gt;Crest Factor&lt;/b&gt; can be used to give 
information about the actual shape of the AC waveform. Form Factor is the ratio between the average value and the RMS value 
and is given as.&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;img alt=&quot;AC waveforms Form Factor&quot; border=&quot;0&quot; src=&quot;http://www.electronics-tutorials.ws/accircuits/acp9.gif&quot; height=&quot;65px&quot; width=&quot;505px&quot; /&gt;&lt;/div&gt;
&lt;div align=&quot;justify&quot;&gt;
For a pure sinusoidal waveform the Form Factor will always be equal to &lt;span class=&quot;ntxt&quot;&gt;1.11&lt;/span&gt;.&lt;/div&gt;
&lt;div align=&quot;justify&quot;&gt;
Crest Factor is the ratio between the R.M.S. value and the Peak value of the waveform and is given as.&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;img alt=&quot;AC waveforms Crest Factor&quot; border=&quot;0&quot; src=&quot;http://www.electronics-tutorials.ws/accircuits/acp10.gif&quot; height=&quot;64px&quot; width=&quot;486px&quot; /&gt;&lt;/div&gt;
&lt;div align=&quot;justify&quot;&gt;
For a pure sinusoidal waveform the Crest Factor will always be equal to &lt;span class=&quot;ntxt&quot;&gt;1.414&lt;/span&gt;.&lt;/div&gt;
&lt;h2 class=&quot;h2txt&quot;&gt;
Example No1&lt;/h2&gt;
&lt;div align=&quot;justify&quot;&gt;
A sinusoidal alternating current of 6 amps is flowing through a resistance of 40Ω. Calculate the average 
voltage and the peak voltage of the supply.&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
The R.M.S. Voltage value is calculated as:&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;img alt=&quot;R.M.S. Voltage for Example No2&quot; border=&quot;0&quot; src=&quot;http://www.electronics-tutorials.ws/accircuits/acp11.gif&quot; height=&quot;36px&quot; width=&quot;336px&quot; /&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
The Average Voltage value is calculated as:&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;img alt=&quot;Average Voltage for Example No2&quot; border=&quot;0&quot; src=&quot;http://www.electronics-tutorials.ws/accircuits/acp12.gif&quot; height=&quot;170px&quot; width=&quot;493px&quot; /&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
The Peak Voltage value is calculated as:&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;img alt=&quot;Peak Voltage for Example No2&quot; border=&quot;0&quot; src=&quot;http://www.electronics-tutorials.ws/accircuits/acp13.gif&quot; height=&quot;92px&quot; width=&quot;368px&quot; /&gt;&lt;/div&gt;
&lt;div align=&quot;justify&quot;&gt;
&lt;br /&gt;
The use and calculation of Average, R.M.S, Form factor and Crest Factor can also be use with any type 
of periodic waveform including Triangular, Square, Sawtoothed or any other irregular or complex voltage/current waveform shape
and in the next tutorial about &lt;i&gt;&lt;a href=&quot;http://www.electronics-tutorials.ws/accircuits/sinusoidal-waveform.html&quot;&gt;Sinusoidal Waveforms&lt;/a&gt;&lt;/i&gt;
 
we will look at the principal of generating a sinusoidal AC waveform (a 
sinusoid) along with its angular velocity representation.&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://anibhaskar.blogspot.com/feeds/7928743230438428154/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://anibhaskar.blogspot.com/2012/12/basic-electronics.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7313231459909421467/posts/default/7928743230438428154'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7313231459909421467/posts/default/7928743230438428154'/><link rel='alternate' type='text/html' href='http://anibhaskar.blogspot.com/2012/12/basic-electronics.html' title='BASIC ELECTRONICS'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12437203074866629318</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7313231459909421467.post-2956771915313252145</id><published>2012-09-28T06:46:00.001-07:00</published><updated>2012-09-28T06:46:33.865-07:00</updated><title type='text'>avr input/output</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
input port- PORTA&lt;br /&gt;
output port -PORTB&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;avr/io.h&amp;gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
#include&amp;lt;util/delay.h&amp;gt;&lt;br /&gt;
int main(void)&lt;br /&gt;
{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DDRA &amp;amp;= ~((1&amp;lt;&amp;lt;PA1)|(1&amp;lt;&amp;lt;PA2)|(1&amp;lt;&amp;lt;PA3));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; PORTA = (1&amp;lt;&amp;lt;PA1)|(1&amp;lt;&amp;lt;PA2)|(1&amp;lt;&amp;lt;PA3);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;while(1)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; &amp;nbsp; if &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;(!(PINA &amp;amp; (1&amp;lt;&amp;lt;PA1))) &amp;nbsp;//////////////// SET BIT 0TH&lt;br /&gt;
{&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;PORTB = PORTB | 0b00000001;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;_delay_ms(5000);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;PORTB = PORTB &amp;amp; 0b00000000;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;PORTB = PORTB | 0b10000000;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;_delay_ms(5000);&lt;br /&gt;
}&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;else if &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;(!(PINA &amp;amp; (1&amp;lt;&amp;lt;PA2)))&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;PORTB = PORTB | 0b00000010;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;_delay_ms(5000);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;PORTB = PORTB &amp;amp; 0b00000000;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;PORTB = PORTB | 0b01000000;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;_delay_ms(5000);&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;else if &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;(!(PINA &amp;amp; (1&amp;lt;&amp;lt;PA3)))&lt;br /&gt;
{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;PORTB = PORTB | 0b00000100;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;_delay_ms(5000);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;PORTB = PORTB &amp;amp; 0b00000000;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;PORTB = PORTB | 0b00100000;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;_delay_ms(5000);&lt;br /&gt;
&lt;br /&gt;
}&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;else&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;PORTB = PORTB &amp;amp; 0b00000000;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://anibhaskar.blogspot.com/feeds/2956771915313252145/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://anibhaskar.blogspot.com/2012/09/avr-inputoutput.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7313231459909421467/posts/default/2956771915313252145'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7313231459909421467/posts/default/2956771915313252145'/><link rel='alternate' type='text/html' href='http://anibhaskar.blogspot.com/2012/09/avr-inputoutput.html' title='avr input/output'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12437203074866629318</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7313231459909421467.post-1201542700933417810</id><published>2012-08-15T08:28:00.001-07:00</published><updated>2012-08-15T08:28:11.814-07:00</updated><title type='text'>hey...... its me......... :P</title><content type='html'>&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjk6DEM6ndcp-NwMEUAKbqxgeZJEuKejq6gjJuTE72L9ft3YD_UNVTJhJq5lHMtcygjjjmLIIuKZqdUZdHSE30b-DnkhO5UnBClQIkfqaBTaoorPwbwuNzHY1oE2YqtShUreJA-shFcpj4/s1600/100_21416.JPG&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjk6DEM6ndcp-NwMEUAKbqxgeZJEuKejq6gjJuTE72L9ft3YD_UNVTJhJq5lHMtcygjjjmLIIuKZqdUZdHSE30b-DnkhO5UnBClQIkfqaBTaoorPwbwuNzHY1oE2YqtShUreJA-shFcpj4/s320/100_21416.JPG&quot; style=&quot;clear: both; float: left; margin: 0px 10px 10px 0px;&quot; /&gt;&lt;/a&gt;&lt;div style=&#39;clear:both; text-align:LEFT&#39;&gt;&lt;a href=&#39;http://picasa.google.com/blogger/&#39; target=&#39;ext&#39;&gt;&lt;img src=&#39;http://photos1.blogger.com/pbp.gif&#39; alt=&#39;Posted by Picasa&#39; style=&#39;border: 0px none ; padding: 0px; background: transparent none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;&#39; align=&#39;middle&#39; border=&#39;0&#39; /&gt;&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://anibhaskar.blogspot.com/feeds/1201542700933417810/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://anibhaskar.blogspot.com/2012/08/hey-its-me-p.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7313231459909421467/posts/default/1201542700933417810'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7313231459909421467/posts/default/1201542700933417810'/><link rel='alternate' type='text/html' href='http://anibhaskar.blogspot.com/2012/08/hey-its-me-p.html' title='hey...... its me......... :P'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12437203074866629318</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjk6DEM6ndcp-NwMEUAKbqxgeZJEuKejq6gjJuTE72L9ft3YD_UNVTJhJq5lHMtcygjjjmLIIuKZqdUZdHSE30b-DnkhO5UnBClQIkfqaBTaoorPwbwuNzHY1oE2YqtShUreJA-shFcpj4/s72-c/100_21416.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7313231459909421467.post-379760105027472476</id><published>2012-08-01T10:30:00.002-07:00</published><updated>2012-10-09T20:36:14.000-07:00</updated><title type='text'>avr switch input</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fafcff; color: #2a2a2a; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px; line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;Overview&lt;/strong&gt;&lt;/div&gt;
&lt;div align=&quot;justify&quot; style=&quot;background-color: #fafcff; color: #2a2a2a; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px; line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
You cannot imagine to use microcontroller without using any of its i/o pins. Finally its all about&amp;nbsp; : taking input , processing it and generating output ! Thus i/o registers and their correct settings is indispensable part while learning to program any uC.&lt;/div&gt;
&lt;div align=&quot;justify&quot; style=&quot;background-color: #fafcff; color: #2a2a2a; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px; line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
We will learn how to use AVR ports and actually ‘code’&amp;nbsp; for writing/reading data to/from port pins. It is slightly confusing for beginners, however once you understand it, you will certainly appreciate the way it is designed.&lt;/div&gt;
&lt;div align=&quot;justify&quot; style=&quot;background-color: #fafcff; color: #2a2a2a; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px; line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
NOTE : I will frequently refer to&amp;nbsp; ‘configuring pin’ or simply ‘pin’. Remember, a port has multiple pins. Thus in order to change setting for one port, you have to change setting for all port pins of that port. To change setting for one single pin of the port, you have to change a particular bit in associated register. Got that ? If not read this para again.&lt;/div&gt;
&lt;div style=&quot;background-color: #fafcff; color: #2a2a2a; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px; line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: #fafcff; color: #2a2a2a; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px; line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;span id=&quot;more-135&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fafcff; color: #2a2a2a; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px; line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;Registers&lt;/strong&gt;&lt;/div&gt;
&lt;div align=&quot;justify&quot; style=&quot;background-color: #fafcff; color: #2a2a2a; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px; line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
AVR is 8 bit microcontroller. All its ports are 8 bit wide. Every port has 3 registers associated with it each one with 8 bits. Every bit in those registers configure pins of particular port. Bit0 of these registers is associated with Pin0 of the port, Bit1 of these registers is associated with Pin1 of the port, …. and like wise for other bits.&lt;/div&gt;
&lt;div style=&quot;background-color: #fafcff; color: #2a2a2a; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px; line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
These three registers are as follows :&lt;br /&gt;
(x can be replaced by A,B,C,D as per the AVR you are using)&lt;br /&gt;
- DDRx register&lt;br /&gt;
- PORTx register&lt;br /&gt;
- PINx register&lt;/div&gt;
&lt;div style=&quot;background-color: #fafcff; color: #2a2a2a; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px; line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fafcff; color: #2a2a2a; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px; line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;DDRx register&lt;/strong&gt;&lt;/div&gt;
&lt;div align=&quot;justify&quot; style=&quot;background-color: #fafcff; color: #2a2a2a; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px; line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;&lt;/strong&gt;DDRx (Data Direction Register) configures data direction of port pins. Means its setting determines whether port pins will be used for input or output. Writing 0 to a bit in DDRx makes corresponding port pin as input, while writing 1 to a bit in DDRx makes corresponding port pin as output.&lt;/div&gt;
&lt;div style=&quot;background-color: #fafcff; color: #2a2a2a; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px; line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
example:&lt;/div&gt;
&lt;ul style=&quot;background-color: #fafcff; color: #2a2a2a; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px;&quot;&gt;
&lt;li&gt;to make all pins of port A as input pins :&lt;br /&gt;DDRA = 0b00000000;&lt;/li&gt;
&lt;li&gt;to make all pins of port A as output pins :&lt;br /&gt;DDRA = 0b11111111;&lt;/li&gt;
&lt;li&gt;to make lower&amp;nbsp;&lt;a href=&quot;http://wiki.answers.com/Q/How_many_nibbles_are_there_in_a_byte&quot; style=&quot;color: #0a8fbc; font-weight: bold; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;nibble&lt;/a&gt;&amp;nbsp;of port B as output and higher&amp;nbsp;&lt;a href=&quot;http://wiki.answers.com/Q/How_many_nibbles_are_there_in_a_byte&quot; style=&quot;color: #0a8fbc; font-weight: bold; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;nibble&lt;/a&gt;&amp;nbsp;as input :&lt;br /&gt;DDRB = 0b00001111;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;background-color: #fafcff; color: #2a2a2a; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px; line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;PINx register&lt;/strong&gt;&amp;nbsp;&lt;/div&gt;
&lt;div align=&quot;justify&quot; style=&quot;background-color: #fafcff; color: #2a2a2a; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px; line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
PINx (Port IN) used to read data from port pins. In order to read the data from port pin, first you have to change port’s data direction to input. This is done by setting bits in DDRx to zero. If port is made output, then reading PINx register will give you data that has been output on port pins.&lt;/div&gt;
&lt;div align=&quot;justify&quot; style=&quot;background-color: #fafcff; color: #2a2a2a; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px; line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
Now there are two input modes. Either you can use port pins as tri stated inputs or you can activate internal pull up. It will be explained shortly.&lt;/div&gt;
&lt;div style=&quot;background-color: #fafcff; color: #2a2a2a; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px; line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
example :&lt;/div&gt;
&lt;ul style=&quot;background-color: #fafcff; color: #2a2a2a; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px;&quot;&gt;
&lt;li&gt;to read data from port A.&lt;div&gt;
&lt;pre style=&quot;background-color: #f4f4f4; border-style: none; color: black; font-family: consolas, &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; overflow: visible; padding: 0px; width: 867px;&quot;&gt;DDRA = 0x00;    &lt;span style=&quot;color: green;&quot;&gt;//Set port a as input&lt;/span&gt;
x = PINA;       &lt;span style=&quot;color: green;&quot;&gt;//Read contents of port a &lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;background-color: #fafcff; color: #2a2a2a; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px; line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;PORTx register&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fafcff; color: #2a2a2a; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px; line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
PORTx is used for two purposes.&lt;/div&gt;
&lt;div align=&quot;justify&quot; style=&quot;background-color: #fafcff; color: #2a2a2a; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px; line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
1) To output data&amp;nbsp; :&amp;nbsp; when port is configured as output&lt;/div&gt;
&lt;div style=&quot;background-color: #fafcff; color: #2a2a2a; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px; line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
When you set bits in DDRx to 1, corresponding pins becomes output pins. Now you can write data into respective bits in PORTx register. This will immediately change state of output pins according to data you have written.&lt;/div&gt;
&lt;div align=&quot;justify&quot; style=&quot;background-color: #fafcff; color: #2a2a2a; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px; line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
In other words to output data on to port pins, you have to write it into PORTx register. However do not forget to set data direction as output.&lt;/div&gt;
&lt;div style=&quot;background-color: #fafcff; color: #2a2a2a; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px; line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
example :&lt;/div&gt;
&lt;ul style=&quot;background-color: #fafcff; color: #2a2a2a; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px;&quot;&gt;
&lt;li&gt;to output 0xFF data on port b&lt;div&gt;
&lt;pre style=&quot;background-color: #f4f4f4; border-style: none; color: black; font-family: consolas, &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; overflow: visible; padding: 0px; width: 867px;&quot;&gt;DDRB = 0b11111111;        &lt;span style=&quot;color: green;&quot;&gt;//set all pins of port b as outputs&lt;/span&gt;
PORTB = 0xFF;             &lt;span style=&quot;color: green;&quot;&gt;//write data on port &lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;to output data in variable x on port a&lt;div&gt;
&lt;pre style=&quot;background-color: #f4f4f4; border-style: none; color: black; font-family: consolas, &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; overflow: visible; padding: 0px; width: 867px;&quot;&gt;DDRA = 0xFF;            &lt;span style=&quot;color: green;&quot;&gt;  //make port a as output&lt;/span&gt;
PORTA = x;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;//output variable on port&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;to output data on only 0th bit of port c&lt;div&gt;
&lt;pre style=&quot;background-color: #f4f4f4; border-style: none; color: black; font-family: consolas, &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; overflow: visible; padding: 0px; width: 867px;&quot;&gt;DDRC.0 = 1;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;//set only 0th pin of port c as output&lt;/span&gt;
PORTC.0 = 1;       &lt;span style=&quot;color: green;&quot;&gt;//make it high. &lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div align=&quot;justify&quot; style=&quot;background-color: #fafcff; color: #2a2a2a; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px; line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
2) To activate/deactivate pull up resistors – when port is configures as input&lt;/div&gt;
&lt;div style=&quot;background-color: #fafcff; color: #2a2a2a; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px; line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
When you set bits in DDRx to 0, i.e. make port pins as inputs, then corresponding bits in PORTx register are used to activate/deactivate pull-up registers associated with that pin. In order to activate pull-up resister, set bit in PORTx to 1, and to deactivate (i.e to make port pin tri stated) set it to 0.&lt;/div&gt;
&lt;div align=&quot;justify&quot; style=&quot;background-color: #fafcff; color: #2a2a2a; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px; line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
In input mode, when pull-up is enabled, default state of pin becomes ’1′. So even if you don’t connect anything to pin and if you try to read it, it will read as 1. Now, when you externally drive that pin to zero(i.e. connect to ground / or pull-down), only then it will be read as 0.&lt;/div&gt;
&lt;div align=&quot;justify&quot; style=&quot;background-color: #fafcff; color: #2a2a2a; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px; line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
However, if you configure pin as tri state. Then pin goes into state of high impedance. We can say, it is now simply connected to input of some OpAmp inside the uC and no other circuit is driving it from uC. Thus pin has very high impedance. In this case, if pin is left floating (i.e. kept unconnected) then even small static charge present on surrounding objects can change logic state of pin. If you try to read corresponding bit in pin register, its state cannot be predicted. This may cause your program to go haywire, if it depends on input from that particular pin.&lt;/div&gt;
&lt;div style=&quot;background-color: #fafcff; color: #2a2a2a; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px; line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
Thus while, taking inputs from pins / using micro-switches to take input, always enable pull-up resistors on input pins.&lt;/div&gt;
&lt;div style=&quot;background-color: #fafcff; color: #2a2a2a; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px; line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
NOTE : while using on chip ADC, ADC port pins must be configured as tri stated input.&lt;/div&gt;
&lt;div style=&quot;background-color: #fafcff; color: #2a2a2a; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px; line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
example :&lt;/div&gt;
&lt;ul style=&quot;background-color: #fafcff; color: #2a2a2a; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px;&quot;&gt;
&lt;li&gt;to make port a as input with pull-ups enabled and read data from port a&lt;div&gt;
&lt;pre style=&quot;background-color: #f4f4f4; border-style: none; color: black; font-family: consolas, &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; overflow: visible; padding: 0px; width: 867px;&quot;&gt;DDRA = 0x00;        &lt;span style=&quot;color: green;&quot;&gt;//make port a as input&lt;/span&gt;
PORTA = 0xFF;       &lt;span style=&quot;color: green;&quot;&gt;//enable all pull-ups  &lt;/span&gt;
y = PINA;           &lt;span style=&quot;color: green;&quot;&gt;//read data from port a pins&lt;/span&gt;
 &lt;/pre&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;to make port b as tri stated input&lt;div&gt;
&lt;pre style=&quot;background-color: #f4f4f4; border-style: none; color: black; font-family: consolas, &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; overflow: visible; padding: 0px; width: 867px;&quot;&gt;DDRB  = 0x00;        &lt;span style=&quot;color: green;&quot;&gt;//make port b as input&lt;/span&gt;
PORTB = 0x00;        &lt;span style=&quot;color: green;&quot;&gt;//disable pull-ups and make it tri state&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;to make lower nibble of port a as output, higher nibble as input with pull-ups enabled&lt;div&gt;
&lt;pre style=&quot;background-color: #f4f4f4; border-style: none; color: black; font-family: consolas, &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; overflow: visible; padding: 0px; width: 867px;&quot;&gt;DDRA  = 0x0F;        &lt;span style=&quot;color: green;&quot;&gt;//lower nib&amp;gt; output, higher nib&amp;gt; input&lt;/span&gt;
PORTA = 0xF0;        &lt;span style=&quot;color: green;&quot;&gt;//lower nib&amp;gt; set output pins to 0, &lt;/span&gt;
                     &lt;span style=&quot;color: green;&quot;&gt;//higher nib&amp;gt; enable pull-ups&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;background-color: #fafcff; color: #2a2a2a; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px; line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;Summery&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fafcff; color: #2a2a2a; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px; line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
Following table lists register bit settings and resulting function of port pins&lt;/div&gt;
&lt;div align=&quot;center&quot; style=&quot;background-color: #fafcff; color: #2a2a2a; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px;&quot;&gt;
&lt;table align=&quot;center&quot; border=&quot;1&quot; cellpadding=&quot;1&quot; cellspacing=&quot;0&quot; style=&quot;width: 400px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;&lt;strong&gt;register bits →&lt;br /&gt;pin function↓&lt;/strong&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;&lt;strong&gt;DDRx.n&lt;/strong&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;&lt;strong&gt;PORTx.n&lt;/strong&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;&lt;strong&gt;PINx.n&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;tri stated input&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;0&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;0&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;read data bit&lt;br /&gt;
x = PINx.n;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;pull-up input&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;0&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;1&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;read data bit&lt;br /&gt;
x = PINx.n;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;output&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;1&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;write data bit&lt;br /&gt;
PORTx.n = x;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;n/a&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: #fafcff; color: #2a2a2a; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px; line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;h2 align=&quot;center&quot; style=&quot;background-color: #fafcff; color: #606060; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 1.6em;&quot;&gt;
&lt;u&gt;&lt;strong&gt;&lt;span style=&quot;font-family: Algerian; font-size: medium;&quot;&gt;Hands on …&lt;/span&gt;&lt;/strong&gt;&lt;/u&gt;&lt;/h2&gt;
&lt;div style=&quot;background-color: #fafcff; color: #2a2a2a; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px; line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;br /&gt;
- If you don’t have development kit, simply connect 8 LEDs to PB (i.e port b).&lt;br /&gt;
- In Project&amp;gt;Configure&amp;gt;C compiler do not forget to set following options :&lt;br /&gt;
Chip&amp;nbsp;&amp;nbsp; : ATmega16 (or whatever you are using)&lt;br /&gt;
Clock : 16MHz (or whatever you are using)&lt;br /&gt;
- Experiment with these programs and try to learn more from it.&lt;/div&gt;
&lt;div style=&quot;background-color: #fafcff; color: #2a2a2a; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px; line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;1) Blink LED on PB0 at a rate of 1Hz.&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fafcff; color: #2a2a2a; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px;&quot;&gt;
&lt;pre style=&quot;background-color: #f4f4f4; border-style: none; color: black; font-family: consolas, &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; overflow: visible; padding: 0px; width: 907px;&quot;&gt;#include &amp;lt;mega16.h&amp;gt;
#include &amp;lt;delay.h&amp;gt;

&lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; main()
{
    DDRB = 0xFF;         &lt;span style=&quot;color: green;&quot;&gt;//PB as output&lt;/span&gt;
    PORTB= 0x00;         &lt;span style=&quot;color: green;&quot;&gt;//keep all LEDs off&lt;/span&gt;

    &lt;span style=&quot;color: blue;&quot;&gt;while&lt;/span&gt;(1)
    {
        PORTB.0=0;       &lt;span style=&quot;color: green;&quot;&gt;//turn LED off&lt;/span&gt;
        delay_ms(500);   &lt;span style=&quot;color: green;&quot;&gt;//wait for half second&lt;/span&gt;
        PORTB.0=1;       &lt;span style=&quot;color: green;&quot;&gt;//turn LED on &lt;/span&gt;
        delay_ms(500);   &lt;span style=&quot;color: green;&quot;&gt;//wait for half second&lt;/span&gt;
    };        
}
 &lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: #fafcff; color: #2a2a2a; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: #fafcff; color: #2a2a2a; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fafcff; color: #2a2a2a; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px; line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fafcff; color: #2a2a2a; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: #fafcff; color: #2a2a2a; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: #fafcff; color: #2a2a2a; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px;&quot;&gt;
&lt;strong&gt;2) Blink LEDs on PB with&amp;nbsp; different patterns according to given input.&lt;/strong&gt;&lt;br /&gt;
- Kit : use SW0, SW1&lt;br /&gt;
- No Kit : Connect a 2 micro-switches between pin PC0,PC2 and ground. So that when you press the switch pin is pulled low.&lt;/div&gt;
&lt;div style=&quot;background-color: #fafcff; color: #2a2a2a; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px;&quot;&gt;
&lt;pre style=&quot;background-color: #f4f4f4; border-style: none; color: black; font-family: consolas, &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; overflow: visible; padding: 0px; width: 907px;&quot;&gt;#include &amp;lt;mega16.h&amp;gt;
#include &amp;lt;delay.h&amp;gt;

&lt;span style=&quot;color: green;&quot;&gt;//declare global arrays for two patterns&lt;/span&gt;
unsigned &lt;span style=&quot;color: blue;&quot;&gt;char&lt;/span&gt; p1[4] = { 0b10000001,
                        0b01000010,    
                        0b00100100,
                        0b00011000 };

unsigned &lt;span style=&quot;color: blue;&quot;&gt;char&lt;/span&gt; p2[4] = { 0b11111111,
                        0b01111110,    
                        0b00111100,
                        0b00011000 };
&lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; main()
{
unsigned &lt;span style=&quot;color: blue;&quot;&gt;char&lt;/span&gt; i;                &lt;span style=&quot;color: green;&quot;&gt;//loop counter&lt;/span&gt;

    DDRB = 0xFF;                &lt;span style=&quot;color: green;&quot;&gt;//PB as output&lt;/span&gt;
    PORTB= 0x00;                &lt;span style=&quot;color: green;&quot;&gt;//keep all LEDs off&lt;/span&gt;

    DDRC = 0x00;                &lt;span style=&quot;color: green;&quot;&gt;//PC as input&lt;/span&gt;
    PORTC.0 = 1;                &lt;span style=&quot;color: green;&quot;&gt;//enable pull ups for&lt;/span&gt;
    PORTC.1 = 1;                &lt;span style=&quot;color: green;&quot;&gt;//only first two pins&lt;/span&gt;

    &lt;span style=&quot;color: blue;&quot;&gt;while&lt;/span&gt;(1)
    {
        &lt;span style=&quot;color: green;&quot;&gt;//# if SW0 is pressed show pattern 1&lt;/span&gt;
        &lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt;(PINC.0==0)                                           
        {
            &lt;span style=&quot;color: blue;&quot;&gt;for&lt;/span&gt;(i=0;i&amp;lt;3;i++)
            {
                PORTB=p1[i];    &lt;span style=&quot;color: green;&quot;&gt;//output data&lt;/span&gt;
                delay_ms(300);  &lt;span style=&quot;color: green;&quot;&gt;//wait for some time&lt;/span&gt;
            }
            PORTB=0;            &lt;span style=&quot;color: green;&quot;&gt;//turn off all LEDs&lt;/span&gt;
        }

        &lt;span style=&quot;color: green;&quot;&gt;//# if SW1 is pressed show pattern 2&lt;/span&gt;
        &lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt;(PINC.1==0)           
        {
            &lt;span style=&quot;color: blue;&quot;&gt;for&lt;/span&gt;(i=0;i&amp;lt;3;i++)
            {
                PORTB=p2[i];    &lt;span style=&quot;color: green;&quot;&gt;//output data&lt;/span&gt;
                delay_ms(300);  &lt;span style=&quot;color: green;&quot;&gt;//wait for some time&lt;/span&gt;
            }
            PORTB=0;            &lt;span style=&quot;color: green;&quot;&gt;//turn off all LEDs&lt;/span&gt;
        }

    };        
}
&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;wpadvert&quot; style=&quot;background-color: #fafcff; color: #2a2a2a; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px; margin: 10px auto; padding: 5px; text-align: center;&quot;&gt;
&lt;br class=&quot;Apple-interchange-newline&quot; /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://anibhaskar.blogspot.com/feeds/379760105027472476/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://anibhaskar.blogspot.com/2012/08/avr-switch-input.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7313231459909421467/posts/default/379760105027472476'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7313231459909421467/posts/default/379760105027472476'/><link rel='alternate' type='text/html' href='http://anibhaskar.blogspot.com/2012/08/avr-switch-input.html' title='avr switch input'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12437203074866629318</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7313231459909421467.post-8021619685266795873</id><published>2012-07-20T11:32:00.001-07:00</published><updated>2012-07-20T11:32:10.046-07:00</updated><title type='text'>AVR Servo motor control</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
2 servo motor interfacing with mega32/16.&lt;br /&gt;
pin PD6/PD7&lt;br /&gt;
XTL=16MHz&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;avr/io.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;util/delay.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
//Simple Wait Function&lt;br /&gt;
void Wait()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp;uint8_t i;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;for(i=0;i&amp;lt;50;i++)&lt;br /&gt;
&amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; _delay_loop_2(0);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; _delay_loop_2(0);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; _delay_loop_2(0);&lt;br /&gt;
&amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void main()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp;//Configure TIMER1&lt;br /&gt;
&amp;nbsp; &amp;nbsp;TCCR1A|=(1&amp;lt;&amp;lt;COM1A1)|(1&amp;lt;&amp;lt;COM1B1)|(1&amp;lt;&amp;lt;WGM11); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//NON Inverted PWM&lt;br /&gt;
&amp;nbsp; &amp;nbsp;TCCR1B|=(1&amp;lt;&amp;lt;WGM13)|(1&amp;lt;&amp;lt;WGM12)|(1&amp;lt;&amp;lt;CS11)|(1&amp;lt;&amp;lt;CS10); //PRESCALER=64 MODE 14(FAST PWM)&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;ICR1=4999; &amp;nbsp;//fPWM=50Hz (Period = 20ms Standard).&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;DDRD|=(1&amp;lt;&amp;lt;PD4)|(1&amp;lt;&amp;lt;PD5); &amp;nbsp; //PWM Pins as Out&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;while(1)&lt;br /&gt;
&amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; OCR1A=97; &amp;nbsp; //0 degree&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; Wait();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;background-color: white;&quot;&gt;OCR1B=97; &amp;nbsp; //0 degree&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; Wait();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; OCR1A=316; &amp;nbsp;//90 degree&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; Wait();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;OCR1B=316; &amp;nbsp;//90 degree&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; Wait();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;OCR1A=425; &amp;nbsp;//135 degree&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Wait();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;OCR1B=425; &amp;nbsp;//135 degree&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Wait();&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; OCR1A=535; &amp;nbsp;//180 degree&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; Wait();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;background-color: white;&quot;&gt;OCR1B=535; &amp;nbsp;//180 degree&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; Wait();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;}&lt;br /&gt;
}&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://anibhaskar.blogspot.com/feeds/8021619685266795873/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://anibhaskar.blogspot.com/2012/07/avr-servo-motor-control.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7313231459909421467/posts/default/8021619685266795873'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7313231459909421467/posts/default/8021619685266795873'/><link rel='alternate' type='text/html' href='http://anibhaskar.blogspot.com/2012/07/avr-servo-motor-control.html' title='AVR Servo motor control'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12437203074866629318</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7313231459909421467.post-4871549235705125553</id><published>2012-07-07T22:02:00.004-07:00</published><updated>2012-07-07T22:02:25.892-07:00</updated><title type='text'>timer configuration in AVR</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div&gt;
#include&amp;lt;avr/io.h&amp;gt;&lt;/div&gt;
&lt;div&gt;
void T0delay();&lt;/div&gt;
&lt;div&gt;
int main()&lt;/div&gt;
&lt;div&gt;
{&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;DDRA = 0xFF;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;while(1)&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;{&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;PORTA = 0x55;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;T0delay ();&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;PORTA = 0xAA;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;T0delay();&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/div&gt;
&lt;div&gt;
void T0delay()&lt;/div&gt;
&lt;div&gt;
{&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;TCNT0= 0x20;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;TCCR0 = 0x01;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;while ((TIFR&amp;amp;0*1)==0);&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;TCCR0 = 0;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;TIFR = 0x1;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://anibhaskar.blogspot.com/feeds/4871549235705125553/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://anibhaskar.blogspot.com/2012/07/timer-configuration-in-avr.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7313231459909421467/posts/default/4871549235705125553'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7313231459909421467/posts/default/4871549235705125553'/><link rel='alternate' type='text/html' href='http://anibhaskar.blogspot.com/2012/07/timer-configuration-in-avr.html' title='timer configuration in AVR'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12437203074866629318</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7313231459909421467.post-4587540298103997847</id><published>2012-06-26T22:35:00.001-07:00</published><updated>2012-06-26T22:35:13.132-07:00</updated><title type='text'>avr seven segment</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
seven segment(CC) using avr mega 16/32&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;avr/io.h&amp;gt; &amp;nbsp;&lt;br /&gt;
#include&amp;lt;util/delay.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int main(void)&lt;br /&gt;
{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;DDRB = 0xFF;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;while(1)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;PORTB = PORTB | 0b00111111;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;_delay_ms(2000);&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;PORTB = PORTB &amp;amp; 0b11000000;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;///////////&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;PORTB = PORTB | 0b00000110;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;_delay_ms(2000);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;PORTB = PORTB &amp;amp; 0b11111001;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;//////&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;PORTB = PORTB | 0b01011011;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;_delay_ms(2000);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;PORTB = PORTB &amp;amp; 0b10100100;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;///////////&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;PORTB = PORTB | 0b01001111;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;_delay_ms(2000);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;PORTB = PORTB &amp;amp; 0b10110000;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;/////////&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;PORTB = PORTB | 0b01100110;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;_delay_ms(2000);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;PORTB = PORTB &amp;amp; 0b10011001;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;//////////////&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;PORTB = PORTB | 0b01101101;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;_delay_ms(2000);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;PORTB = PORTB &amp;amp; 0b10010010;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;///////////&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;PORTB = PORTB | 0b01111101;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;_delay_ms(2000);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;PORTB = PORTB &amp;amp; 0b10000010;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;////////////&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;PORTB = PORTB | 0b00000111;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;_delay_ms(2000);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;PORTB = PORTB &amp;amp; 0b11111000;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;////////////&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;PORTB = PORTB | 0b01111111;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;_delay_ms(2000);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;PORTB = PORTB &amp;amp; 0b10000000;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;//////////////&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;PORTB = PORTB | 0b01101111;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;_delay_ms(2000);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;PORTB = PORTB &amp;amp; 0b10010000;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://anibhaskar.blogspot.com/feeds/4587540298103997847/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://anibhaskar.blogspot.com/2012/06/avr-seven-segment.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7313231459909421467/posts/default/4587540298103997847'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7313231459909421467/posts/default/4587540298103997847'/><link rel='alternate' type='text/html' href='http://anibhaskar.blogspot.com/2012/06/avr-seven-segment.html' title='avr seven segment'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12437203074866629318</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7313231459909421467.post-8246394052460434252</id><published>2012-06-25T11:05:00.001-07:00</published><updated>2012-06-25T11:05:31.027-07:00</updated><title type='text'>why coding in assembly language</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:WordDocument&gt;
  &lt;w:View&gt;Normal&lt;/w:View&gt;
  &lt;w:Zoom&gt;0&lt;/w:Zoom&gt;
  &lt;w:TrackMoves/&gt;
  &lt;w:TrackFormatting/&gt;
  &lt;w:PunctuationKerning/&gt;
  &lt;w:ValidateAgainstSchemas/&gt;
  &lt;w:SaveIfXMLInvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;
  &lt;w:IgnoreMixedContent&gt;false&lt;/w:IgnoreMixedContent&gt;
  &lt;w:AlwaysShowPlaceholderText&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;
  &lt;w:DoNotPromoteQF/&gt;
  &lt;w:LidThemeOther&gt;EN-US&lt;/w:LidThemeOther&gt;
  &lt;w:LidThemeAsian&gt;X-NONE&lt;/w:LidThemeAsian&gt;
  &lt;w:LidThemeComplexScript&gt;X-NONE&lt;/w:LidThemeComplexScript&gt;
  &lt;w:Compatibility&gt;
   &lt;w:BreakWrappedTables/&gt;
   &lt;w:SnapToGridInCell/&gt;
   &lt;w:WrapTextWithPunct/&gt;
   &lt;w:UseAsianBreakRules/&gt;
   &lt;w:DontGrowAutofit/&gt;
   &lt;w:SplitPgBreakAndParaMark/&gt;
   &lt;w:DontVertAlignCellWithSp/&gt;
   &lt;w:DontBreakConstrainedForcedTables/&gt;
   &lt;w:DontVertAlignInTxbx/&gt;
   &lt;w:Word11KerningPairs/&gt;
   &lt;w:CachedColBalance/&gt;
   &lt;w:UseFELayout/&gt;
  &lt;/w:Compatibility&gt;
  &lt;w:BrowserLevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;
  &lt;m:mathPr&gt;
   &lt;m:mathFont m:val=&quot;Cambria Math&quot;/&gt;
   &lt;m:brkBin m:val=&quot;before&quot;/&gt;
   &lt;m:brkBinSub m:val=&quot;&amp;#45;-&quot;/&gt;
   &lt;m:smallFrac m:val=&quot;off&quot;/&gt;
   &lt;m:dispDef/&gt;
   &lt;m:lMargin m:val=&quot;0&quot;/&gt;
   &lt;m:rMargin m:val=&quot;0&quot;/&gt;
   &lt;m:defJc m:val=&quot;centerGroup&quot;/&gt;
   &lt;m:wrapIndent m:val=&quot;1440&quot;/&gt;
   &lt;m:intLim m:val=&quot;subSup&quot;/&gt;
   &lt;m:naryLim m:val=&quot;undOvr&quot;/&gt;
  &lt;/m:mathPr&gt;&lt;/w:WordDocument&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:LatentStyles DefLockedState=&quot;false&quot; DefUnhideWhenUsed=&quot;true&quot;
  DefSemiHidden=&quot;true&quot; DefQFormat=&quot;false&quot; DefPriority=&quot;99&quot;
  LatentStyleCount=&quot;267&quot;&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;0&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Normal&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;heading 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 7&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 8&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 9&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 7&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 8&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 9&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;35&quot; QFormat=&quot;true&quot; Name=&quot;caption&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;10&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Title&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;1&quot; Name=&quot;Default Paragraph Font&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;11&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Subtitle&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;22&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Strong&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;20&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Emphasis&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;59&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Table Grid&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Placeholder Text&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;1&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;No Spacing&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Revision&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;34&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;List Paragraph&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;29&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Quote&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;30&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Intense Quote&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;19&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Subtle Emphasis&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;21&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Intense Emphasis&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;31&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Subtle Reference&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;32&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Intense Reference&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;33&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Book Title&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;37&quot; Name=&quot;Bibliography&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; QFormat=&quot;true&quot; Name=&quot;TOC Heading&quot;/&gt;
 &lt;/w:LatentStyles&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 10]&gt;
&lt;style&gt;
 /* Style Definitions */
 table.MsoNormalTable
 {mso-style-name:&quot;Table Normal&quot;;
 mso-tstyle-rowband-size:0;
 mso-tstyle-colband-size:0;
 mso-style-noshow:yes;
 mso-style-priority:99;
 mso-style-qformat:yes;
 mso-style-parent:&quot;&quot;;
 mso-padding-alt:0in 5.4pt 0in 5.4pt;
 mso-para-margin-top:0in;
 mso-para-margin-right:0in;
 mso-para-margin-bottom:10.0pt;
 mso-para-margin-left:0in;
 line-height:115%;
 mso-pagination:widow-orphan;
 font-size:11.0pt;
 font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
 mso-ascii-font-family:Calibri;
 mso-ascii-theme-font:minor-latin;
 mso-hansi-font-family:Calibri;
 mso-hansi-theme-font:minor-latin;
 mso-bidi-font-family:&quot;Times New Roman&quot;;
 mso-bidi-theme-font:minor-bidi;}
&lt;/style&gt;
&lt;![endif]--&gt;

&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;A FATAAK RIZN ......why m usin asm
language ????&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;AMAN:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;Why should I learn coding in assembler language? It’s a machine language
and for sure it’s very hard to learn!&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;AATISH:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;The truth is no one actually can really understand the machine language as
it only contains “0″ and “1″; or what we know as a binary, event the most
experience prog&lt;/span&gt;&lt;span style=&quot;mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;ram&lt;/span&gt;&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;mer could not understand this kind of language.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;AMAN:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;So what is actually this assembler language?&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;AATISH:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;The assembler language is the same like all other prog&lt;/span&gt;&lt;span style=&quot;mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;ram&lt;/span&gt;&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;ming language such as C, BASIC or PASCAL; every prog&lt;/span&gt;&lt;span style=&quot;mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;ram&lt;/span&gt;&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;ming language has their own dialect and syntax. But all the progAMANming
languages have the same goal that we as a human can read and write the code
using our own language.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;For example if I want to instruct someone to make me a cup of tee, I could
say like this&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;“Go to the kitchen and bring me a cup of hot tee”&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;or I could say like this&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;“Go to the kitchen”&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;“Get a cup”&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;“Get a bag of tee”&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;“Put it in the cup”&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;“Poor hot water in it”&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;“Bring it to me”&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;AMAN:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;What’s your point AATISH?&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;AATISH:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;The first instruction is just like all other high level prog&lt;/span&gt;&lt;span style=&quot;mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;ra&lt;/span&gt;&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;ming language such as BASIC and PASCAL and the second one is much more like
assembler language, while C language is in the middle of them. The more higher
the level of the progAMANming language the more easier to write the command
because they have a rich syntax which is close to the human language, on the
other hand the assembler language is only recognize the basic microcontroller
instruction syntax which mean we have to assemble it to make one useful
command.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;AMAN:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;Ok… I understand that; but what is the benefit of learning this kind of low
level language or I should say a caveman language!&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;AATISH:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;All the prog&lt;/span&gt;&lt;span style=&quot;mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;ram&lt;/span&gt;&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;ming language before they can really run by the microcontroller must go to
what is called the compiling phase; in this phase all of the human language
like code will be translated into the machine binary code.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;Now the interesting part begin; as you’ve seen from my first example the
“make a cup of tee” command; this kind of command is a much more human’s like
command and there is no machine in this world can understand it, so while in
the compiling phase the compiler designer put a lot of assuming on what the
machine should do:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;Go to the kitchen&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;if there is a door open it first&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;if we could not open, than send an error message&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;Get a cup&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;if it broken than take another cup&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;if we could not find one, than send an error message&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;Get a bag of tee&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;if we could not find it, than send an error message&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;Put it in the cup&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;Poor a hot water in it&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;if is not hot than find a hot one&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;if we could not find a hot water, than send an error message&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;Bring it to me&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;Therefore this is what the code look likes when we disassemble the higher
level language compiler generated machine code.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;AMAN:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;Why they must instruct the machine to check the door first; what if there
is no door on the way to the kitchen?&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;AATISH:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;That’s the point! In the higher level language this assumption should be
taken into consideration when compiling the prog, because what if there is a
real door or there is no hot water; but in assembler language we as progmer
that make this decision whether to put this into consideration or not. That it
is why the assembler code can be made smaller and efficient comparing to the
higher level language and of course this will affect the speed of the prog.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;AMAN:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;Ok AATISH, this is sound good, but if this assembler language it’s so good;
small, efficient and fast why not many people learn and use it?&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;AATISH:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;Good question; the disadvantage of using the assembler language is; it’s a
machine dependent language; this mean the code in assembler from one
microcontroller type like Atmel AVR and Microchip PIC is a totally different.
But in higher level language this gaps are much more closer; all the
differences issues is taking care by the compiler.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;AMAN:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;Now, I’m become more confuse; this mean if I code in the assembler language
for the Atmel AVR, I could not just recompile it to the Microchip PIC; means I
have to recode it to the Microchip PIC assembler language?&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;AATISH:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;Yes… you are right; because it’s a machine dependent language and it’s
depend on the microcontroller you use. For example the microcontroller
architecture is completely different like the AVR microcontroller use continues
memory for it’s registers while the PIC microcontroller use bank system memory
for it’s registers, even the I/O port name is totally different.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;AMAN:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;Wow… hold on; you said what?… bank?&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;AATISH:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;Sorry… I just want to explain the differences; but to my experiences once
you understand one type of microcontroller assembler language; it’s easier to
learn another type of microcontroller assembler language; the learning time
it’s lesser comparing to when you learn the assembler language for the first
time. Beside you could choose just to use one type of microcontroller; today
most of popular microcontrollers almost have similar features.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;In the real world most experience embedded prog&lt;/span&gt;&lt;span style=&quot;mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;ram&lt;/span&gt;&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;mers combine the C code with the assembler code; when they need a time
critical code; they use assembler language instead of C. Therefore basically
the best of this two world can be achieved.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;AMAN:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;Ok. Now I understand, I would like to start with AVR first&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;AATISH:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;No problem! Just bring your notebook tomorrow and don’t forget to download
the latest Atmel AVR Studio 4 and the Atmel AVR Tiny2313 datasheet from their
site.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;AMAN:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;Ok… I will…see you tomorow and thanks AATISH.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://anibhaskar.blogspot.com/feeds/8246394052460434252/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://anibhaskar.blogspot.com/2012/06/why-coding-in-assembly-language.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7313231459909421467/posts/default/8246394052460434252'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7313231459909421467/posts/default/8246394052460434252'/><link rel='alternate' type='text/html' href='http://anibhaskar.blogspot.com/2012/06/why-coding-in-assembly-language.html' title='why coding in assembly language'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12437203074866629318</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7313231459909421467.post-8330392947516208756</id><published>2012-06-25T10:56:00.000-07:00</published><updated>2012-06-25T10:56:07.545-07:00</updated><title type='text'>AVR traffic light</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
traffic light using mega 32/16&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;avr/io.h&amp;gt;&lt;br /&gt;#include &amp;lt;util/delay.h&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&lt;br /&gt;int main(void) &lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DDRB = 0xFF;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DDRC = 0xFF;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; while(1)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; PORTB = PORTB | 0b00001010;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; PORTC = PORTC | 0b00000001;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; _delay_ms(3000);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; PORTB = PORTB &amp;amp; 0b11110101;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; PORTC = PORTC &amp;amp; 0b11111110;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; ///////////////////&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; PORTB = PORTB | 0b00100100;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; PORTC = PORTC | 0b00001001;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; _delay_ms(100);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; PORTB = PORTB &amp;amp; 0b11011011;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; PORTC = PORTC &amp;amp; 0b11110110;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; ////////////////&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; PORTB = PORTB | 0b00010001;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; PORTC = PORTC | 0b00001001;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; _delay_ms(3000);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; PORTB = PORTB &amp;amp; 0b11101110;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; PORTC = PORTC &amp;amp; 0b11110110;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ////////////////////&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; PORTB = PORTB | 0b00100000;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; PORTC = PORTC | 0b00000100;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; _delay_ms(100);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; PORTB = PORTB &amp;amp; 0b11011111;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; PORTC = PORTC &amp;amp; 0b11111011;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ////////////////////&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; PORTB = PORTB | 0b00001001;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; PORTC = PORTC | 0b00001010;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; _delay_ms(3000);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; PORTB = PORTB &amp;amp; 0b11110110;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; PORTC = PORTC &amp;amp; 0b11110101;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; //////////////&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; PORTB = PORTB | 0b00001001;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; PORTC = PORTC | 0b00100100;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; _delay_ms(100);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; PORTB = PORTB &amp;amp; 0b11110110;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; PORTC = PORTC &amp;amp; 0b11011011;&lt;br /&gt;/////////////////////&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; PORTB = PORTB | 0b00001001;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; PORTC = PORTC | 0b00010001;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; _delay_ms(3000);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; PORTB = PORTB &amp;amp; 0b11110110;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; PORTC = PORTC &amp;amp; 0b11101110;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; ///////////&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; PORTB = PORTB | 0b00001100;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; PORTC = PORTC | 0b00100001;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; _delay_ms(100);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; PORTB = PORTB &amp;amp; 0b11110011;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; PORTC = PORTC &amp;amp; 0b11011110;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return 0;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;software : avr studio &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://anibhaskar.blogspot.com/feeds/8330392947516208756/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://anibhaskar.blogspot.com/2012/06/avr-traffic-light.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7313231459909421467/posts/default/8330392947516208756'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7313231459909421467/posts/default/8330392947516208756'/><link rel='alternate' type='text/html' href='http://anibhaskar.blogspot.com/2012/06/avr-traffic-light.html' title='AVR traffic light'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12437203074866629318</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7313231459909421467.post-3997016942318086308</id><published>2012-06-25T09:56:00.001-07:00</published><updated>2012-06-25T09:56:03.328-07:00</updated><title type='text'>avr led toggle</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
led toggle using avr mega16/ mega32&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;text-align: -webkit-auto; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;#include &amp;lt;avr/io.h&amp;gt;      

int main(void) 
{
 DDRA = 0xFF;      
 PORTA = 0xAA;   

 unsigned char x;

 for(x = 0; x &amp;lt; 100; x++)
 {
  PORTA = ~PORTA;
 }

 while(1);

 return 0;
}&lt;/pre&gt;
&lt;pre style=&quot;text-align: -webkit-auto; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;
&lt;/pre&gt;
&lt;pre style=&quot;text-align: -webkit-auto; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;
&lt;/pre&gt;
&lt;pre style=&quot;text-align: -webkit-auto; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;
&lt;/pre&gt;
&lt;pre style=&quot;text-align: -webkit-auto; word-wrap: break-word;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;this iz a program which is use to toggle 8 led 100 times  which are connected to port A of the avr . &lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;text-align: -webkit-auto; word-wrap: break-word;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt; &lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;text-align: -webkit-auto; word-wrap: break-word;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;text-align: -webkit-auto; word-wrap: break-word;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;software: avr studio &lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #ead1dc;&quot;&gt;&lt;br class=&quot;Apple-interchange-newline&quot; /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://anibhaskar.blogspot.com/feeds/3997016942318086308/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://anibhaskar.blogspot.com/2012/06/avr-led-toggle.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7313231459909421467/posts/default/3997016942318086308'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7313231459909421467/posts/default/3997016942318086308'/><link rel='alternate' type='text/html' href='http://anibhaskar.blogspot.com/2012/06/avr-led-toggle.html' title='avr led toggle'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12437203074866629318</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>