<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Microcontroller | Student Projects</title>
	<atom:link href="https://studentprojects.in/category/electronics/microcontroller/feed/" rel="self" type="application/rss+xml" />
	<link>https://studentprojects.in</link>
	<description>Microcontroller projects, Circuit Diagrams, Project Ideas</description>
	<lastBuildDate>Thu, 09 Jun 2022 08:36:49 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.7</generator>
	<item>
		<title>Getting Started with Arduino UNO</title>
		<link>https://studentprojects.in/electronics/microcontrollers/getting-started-with-arduino-uno/</link>
					<comments>https://studentprojects.in/electronics/microcontrollers/getting-started-with-arduino-uno/#respond</comments>
		
		<dc:creator><![CDATA[Narayana Prakash]]></dc:creator>
		<pubDate>Tue, 07 Jun 2022 05:04:46 +0000</pubDate>
				<category><![CDATA[Microcontroller]]></category>
		<category><![CDATA[Microcontroller Based Mini Projects]]></category>
		<category><![CDATA[Arduino sketch]]></category>
		<category><![CDATA[Arduino IDE]]></category>
		<category><![CDATA[Components of Arduino]]></category>
		<category><![CDATA[Physical layout of Arduino]]></category>
		<category><![CDATA[Arduino UNO]]></category>
		<guid isPermaLink="false">https://studentprojects.in/?p=9345</guid>

					<description><![CDATA[<p>What is Arduino? Arduino is an open-source electronic tool that uses a combination of hardware and software. The Arduino board can perform the required functions by sending instructions from the microcontroller on the board. This can be achieved by using the Arduino programming language and the Arduino software (IDE). Arduino finds application in everyday objects</p>
<p>The post <a href="https://studentprojects.in/electronics/microcontrollers/getting-started-with-arduino-uno/">Getting Started with Arduino UNO</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<h2>What is Arduino?</h2>


<div class="wp-block-image">
<figure class="aligncenter size-full"><a href="https://amzn.to/3xqTmKk" target="_blank" rel="Buy Arduino Uno R3 board noopener"><img decoding="async" loading="lazy" width="500" height="408" src="https://studentprojects.in/wp-content/uploads/2022/06/Arduino-Uno-R3.jpg" alt="" class="wp-image-9346" srcset="https://studentprojects.in/wp-content/uploads/2022/06/Arduino-Uno-R3.jpg 500w, https://studentprojects.in/wp-content/uploads/2022/06/Arduino-Uno-R3-300x245.jpg 300w" sizes="(max-width: 500px) 100vw, 500px" /></a><figcaption>Arduino Uno R3 board</figcaption></figure></div>


<p>Arduino is an open-source electronic tool that uses a combination of hardware and software. The Arduino board can perform the required functions by sending instructions from the microcontroller on the board. This can be achieved by using the Arduino programming language and the Arduino software (IDE).</p>



<p>Arduino finds application in everyday objects to complex scientific instruments. Arduino was designed by Ivrea Interaction Design Institute as an easy tool for fast prototyping, aimed at students without a background in electronics and programming.</p>



<h2>Advantages of using Arduino</h2>



<p>Arduino is a key tool to learn new things. Anyone &#8211; children, hobbyists, artists, programmers &#8211; can start tinkering just by following the step by step instructions of a kit, or sharing ideas online with other members of the Arduino community. Several other advantages of Arduino are:</p>



<ul><li><strong>Inexpensive:</strong> Arduino boards are relatively inexpensive.</li><li><strong>Cross-platform: </strong>The Arduino Software (IDE) runs on Windows, Macintosh OSX, and Linux operating systems.</li><li><strong>Simple, clear programming environment: </strong>The Arduino IDE is easy to use for beginners and it is very flexible.</li><li><strong>Open source and extensible software: </strong>Arduino software is an open-source tool and can be extended by users.</li><li>Open source and extensible hardware: Arduino board pins are published and experienced circuit designers can make their own design by extending and improving it.</li></ul>



<p>We start using the Arduino using the board named Arduino UNO.</p>



<h2>The physical<strong> layout of Arduino UNO</strong></h2>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><img decoding="async" loading="lazy" src="https://studentprojects.in/wp-content/uploads/2022/06/Physical-layout-of-Arduino-UNO.jpg" alt="Physical layout of Arduino UNO" class="wp-image-9366" width="625" height="399" srcset="https://studentprojects.in/wp-content/uploads/2022/06/Physical-layout-of-Arduino-UNO.jpg 625w, https://studentprojects.in/wp-content/uploads/2022/06/Physical-layout-of-Arduino-UNO-300x192.jpg 300w" sizes="(max-width: 625px) 100vw, 625px" /><figcaption>The physical layout of Arduino UNO</figcaption></figure></div>


<h2>Components of Arduino UNO</h2>



<ul><li><strong>Microcontroller: </strong>The major component of the Arduino board is the microcontroller. The microcontroller is fabricated inside an integrated chip and it performs the arithmetic/logical operation required for the particular task. Also, it communicates with peripheral devices, reads input devices and writes to output devices. Arduino UNO uses an ATmega328P microcontroller.</li><li><strong>Digital I/O pins</strong>: For connecting the sensors/input devices and output devices the board has digital I/O pins (0-13). These pins are used either as input or as output based on the requirement. Pins 0 and 1 are used in serial communication where pin 0 is used for reception serial information and pin 1 is used for transmission.</li><li><strong>Analog input pins</strong>: Analog input pins (0-5) are used to give analogue inputs directly to the board.</li><li><strong>USB plug</strong>: USB plug for uploading the program and communicating with the computer. This also provides a power supply during the development stage of a project.</li><li><strong>External power supply</strong>: This is used to power the Arduino board when it is not connected to the computer.</li><li><strong>Board power supply pins</strong>: Used to provide power to peripheral devices.</li><li><strong>Reset button</strong>: A push button is used to reset the Arduino.</li><li><strong>In-circuit serial programmer</strong></li></ul>



<h2><strong>Installing Arduino IDE</strong></h2>



<ol><li>Download the latest Arduino integrated development environment (IDE) from the link <a href="https://www.arduino.cc/en/software">https://www.arduino.cc/en/software</a> .</li><li>Click on the Arduino software.</li></ol>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img decoding="async" loading="lazy" width="415" height="285" src="https://studentprojects.in/wp-content/uploads/2022/06/Installing-Arduino-IDE-1.png" alt="" class="wp-image-9359" srcset="https://studentprojects.in/wp-content/uploads/2022/06/Installing-Arduino-IDE-1.png 415w, https://studentprojects.in/wp-content/uploads/2022/06/Installing-Arduino-IDE-1-300x206.png 300w" sizes="(max-width: 415px) 100vw, 415px" /></figure></div>


<ol start="3"><li>Click on I agree</li></ol>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img decoding="async" loading="lazy" width="419" height="288" src="https://studentprojects.in/wp-content/uploads/2022/06/Installing-Arduino-IDE-2.png" alt="" class="wp-image-9360" srcset="https://studentprojects.in/wp-content/uploads/2022/06/Installing-Arduino-IDE-2.png 419w, https://studentprojects.in/wp-content/uploads/2022/06/Installing-Arduino-IDE-2-300x206.png 300w" sizes="(max-width: 419px) 100vw, 419px" /></figure></div>


<ol start="4"><li>Click on next</li></ol>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img decoding="async" loading="lazy" width="420" height="288" src="https://studentprojects.in/wp-content/uploads/2022/06/Installing-Arduino-IDE-3.png" alt="" class="wp-image-9361" srcset="https://studentprojects.in/wp-content/uploads/2022/06/Installing-Arduino-IDE-3.png 420w, https://studentprojects.in/wp-content/uploads/2022/06/Installing-Arduino-IDE-3-300x206.png 300w" sizes="(max-width: 420px) 100vw, 420px" /></figure></div>


<ol start="5"><li>Click on install. (If you want change in the destination folder, change to required destination and click install).</li></ol>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img decoding="async" loading="lazy" width="416" height="286" src="https://studentprojects.in/wp-content/uploads/2022/06/Installing-Arduino-IDE-4.png" alt="" class="wp-image-9362" srcset="https://studentprojects.in/wp-content/uploads/2022/06/Installing-Arduino-IDE-4.png 416w, https://studentprojects.in/wp-content/uploads/2022/06/Installing-Arduino-IDE-4-300x206.png 300w" sizes="(max-width: 416px) 100vw, 416px" /></figure></div>


<ol start="6"><li>Now installation will start and wait for the completion of installation. At the end of installation following dialogs will popup. Click on install button for all the three dialogs.</li></ol>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img decoding="async" loading="lazy" width="503" height="236" src="https://studentprojects.in/wp-content/uploads/2022/06/Installing-Arduino-IDE-5.png" alt="" class="wp-image-9363" srcset="https://studentprojects.in/wp-content/uploads/2022/06/Installing-Arduino-IDE-5.png 503w, https://studentprojects.in/wp-content/uploads/2022/06/Installing-Arduino-IDE-5-300x141.png 300w" sizes="(max-width: 503px) 100vw, 503px" /></figure></div>

<div class="wp-block-image">
<figure class="aligncenter size-full"><img decoding="async" loading="lazy" width="467" height="237" src="https://studentprojects.in/wp-content/uploads/2022/06/Installing-Arduino-IDE-6.png" alt="" class="wp-image-9364" srcset="https://studentprojects.in/wp-content/uploads/2022/06/Installing-Arduino-IDE-6.png 467w, https://studentprojects.in/wp-content/uploads/2022/06/Installing-Arduino-IDE-6-300x152.png 300w" sizes="(max-width: 467px) 100vw, 467px" /></figure></div>

<div class="wp-block-image">
<figure class="aligncenter size-full"><img decoding="async" loading="lazy" width="471" height="231" src="https://studentprojects.in/wp-content/uploads/2022/06/Installing-Arduino-IDE-7.png" alt="" class="wp-image-9365" srcset="https://studentprojects.in/wp-content/uploads/2022/06/Installing-Arduino-IDE-7.png 471w, https://studentprojects.in/wp-content/uploads/2022/06/Installing-Arduino-IDE-7-300x147.png 300w" sizes="(max-width: 471px) 100vw, 471px" /></figure></div>


<h2>Connecting the Arduino UNO to the <strong>computer</strong></h2>



<p>Connect the Arduino board to the computer using a USB cable.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img decoding="async" loading="lazy" width="444" height="277" src="https://studentprojects.in/wp-content/uploads/2022/06/Arduino-UNO-to-computer-connector-USB-cable.jpeg" alt="Arduino UNO to computer connector USB cable" class="wp-image-9357" srcset="https://studentprojects.in/wp-content/uploads/2022/06/Arduino-UNO-to-computer-connector-USB-cable.jpeg 444w, https://studentprojects.in/wp-content/uploads/2022/06/Arduino-UNO-to-computer-connector-USB-cable-300x187.jpeg 300w" sizes="(max-width: 444px) 100vw, 444px" /><figcaption>Arduino UNO to computer connector USB cable</figcaption></figure></div>

<div class="wp-block-image">
<figure class="aligncenter size-full"><img decoding="async" loading="lazy" width="800" height="525" src="https://studentprojects.in/wp-content/uploads/2022/06/arduino-connected-to-pc.jpg" alt="arduino connected to pc" class="wp-image-9348" srcset="https://studentprojects.in/wp-content/uploads/2022/06/arduino-connected-to-pc.jpg 800w, https://studentprojects.in/wp-content/uploads/2022/06/arduino-connected-to-pc-300x197.jpg 300w, https://studentprojects.in/wp-content/uploads/2022/06/arduino-connected-to-pc-768x504.jpg 768w" sizes="(max-width: 800px) 100vw, 800px" /><figcaption>Arduino connected to pc</figcaption></figure></div>


<p>Now the Arduino board will be automatically detected. (The same can be verified using device manager).</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img decoding="async" loading="lazy" width="779" height="570" src="https://studentprojects.in/wp-content/uploads/2022/06/device-manager.png" alt="device manager" class="wp-image-9358" srcset="https://studentprojects.in/wp-content/uploads/2022/06/device-manager.png 779w, https://studentprojects.in/wp-content/uploads/2022/06/device-manager-300x220.png 300w, https://studentprojects.in/wp-content/uploads/2022/06/device-manager-768x562.png 768w" sizes="(max-width: 779px) 100vw, 779px" /><figcaption>device manager</figcaption></figure></div>


<h2><strong>Writing first Arduino sketch/program</strong></h2>



<p>Instruction writing to Arduino is done using the Arduino programming language. These programs are also called sketches. This section demonstrates how to write a simple Arduino program.</p>



<p><strong>Required components:</strong></p>



<ul><li>Arduino UNO board</li><li>USB cable provided with Arduino UNO board</li></ul>



<p>Arduino UNO board contains a built-in LED. This LED is connected to pin digital pin 13.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img decoding="async" loading="lazy" width="457" height="366" src="https://studentprojects.in/wp-content/uploads/2022/06/Arduino-UNO-board-contains-a-built-in-LED.jpg" alt="" class="wp-image-9356" srcset="https://studentprojects.in/wp-content/uploads/2022/06/Arduino-UNO-board-contains-a-built-in-LED.jpg 457w, https://studentprojects.in/wp-content/uploads/2022/06/Arduino-UNO-board-contains-a-built-in-LED-300x240.jpg 300w" sizes="(max-width: 457px) 100vw, 457px" /></figure></div>


<p>Therefore the simplest task performed using the Arduino is bilking that LED for a particular interval of time.</p>



<p><strong>Arduino IDE visual appearance</strong></p>



<p>Open the Arduino IDE. The following window is displayed having File, Edit, Sketch, Tools and Help options. It also has quick access buttons Verify, Upload, New, Open, Save and Serial monitor options. The editor space is provided to write the Arduino program. At the bottom, there is a message area which displays feedback of different processes performed on the sketch.</p>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img decoding="async" loading="lazy" width="1024" height="550" src="https://studentprojects.in/wp-content/uploads/2022/06/Arduino-IDE-1-1024x550.png" alt="" class="wp-image-9349" srcset="https://studentprojects.in/wp-content/uploads/2022/06/Arduino-IDE-1-1024x550.png 1024w, https://studentprojects.in/wp-content/uploads/2022/06/Arduino-IDE-1-300x161.png 300w, https://studentprojects.in/wp-content/uploads/2022/06/Arduino-IDE-1-768x413.png 768w, https://studentprojects.in/wp-content/uploads/2022/06/Arduino-IDE-1.png 1370w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure></div>


<p>The following steps are performed to write and upload the new sketch.</p>



<h4><strong>1. Writing the new sketch</strong></h4>



<p>To write a new sketch, go to File and click New (This can also be done using the New quick access button). This will create a blank sketch. Now write the Arduino program inside the sketch.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img decoding="async" loading="lazy" width="877" height="478" src="https://studentprojects.in/wp-content/uploads/2022/06/Arduino-IDE-2.png" alt="" class="wp-image-9350" srcset="https://studentprojects.in/wp-content/uploads/2022/06/Arduino-IDE-2.png 877w, https://studentprojects.in/wp-content/uploads/2022/06/Arduino-IDE-2-300x164.png 300w, https://studentprojects.in/wp-content/uploads/2022/06/Arduino-IDE-2-768x419.png 768w" sizes="(max-width: 877px) 100vw, 877px" /></figure></div>


<pre class="wp-block-code"><code lang="c" class="language-c">// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(LED_BUILTIN, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
  delay(1000); // wait for a second. The delay given in terms of milliseconds
  digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
  delay(1000); // wait for a second
}</code></pre>



<p></p>



<h4><strong>2. Saving the Sketch</strong></h4>



<p>Now go to File and save the file with the required name (This can also be performed using quick access button Save).</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img decoding="async" loading="lazy" width="750" height="408" src="https://studentprojects.in/wp-content/uploads/2022/06/Arduino-IDE-3.png" alt="" class="wp-image-9351" srcset="https://studentprojects.in/wp-content/uploads/2022/06/Arduino-IDE-3.png 750w, https://studentprojects.in/wp-content/uploads/2022/06/Arduino-IDE-3-300x163.png 300w" sizes="(max-width: 750px) 100vw, 750px" /></figure></div>


<h4><strong>3. Verifying (compiling) the sketch/Program</strong></h4>



<p>Compile the sketch by clicking verify button.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img decoding="async" loading="lazy" width="760" height="403" src="https://studentprojects.in/wp-content/uploads/2022/06/Arduino-IDE-4.png" alt="" class="wp-image-9352" srcset="https://studentprojects.in/wp-content/uploads/2022/06/Arduino-IDE-4.png 760w, https://studentprojects.in/wp-content/uploads/2022/06/Arduino-IDE-4-300x159.png 300w" sizes="(max-width: 760px) 100vw, 760px" /></figure></div>


<p>If the code gets compiled successfully, then the ‘Done compiling’ message will appear in the message area.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img decoding="async" loading="lazy" width="863" height="101" src="https://studentprojects.in/wp-content/uploads/2022/06/Arduino-IDE-5.png" alt="" class="wp-image-9353" srcset="https://studentprojects.in/wp-content/uploads/2022/06/Arduino-IDE-5.png 863w, https://studentprojects.in/wp-content/uploads/2022/06/Arduino-IDE-5-300x35.png 300w, https://studentprojects.in/wp-content/uploads/2022/06/Arduino-IDE-5-768x90.png 768w" sizes="(max-width: 863px) 100vw, 863px" /></figure></div>


<p></p>



<h4>4. <strong>Uploading the sketch</strong></h4>



<p>The upload button compiles the sketch and uploads the program to the board.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img decoding="async" loading="lazy" width="619" height="281" src="https://studentprojects.in/wp-content/uploads/2022/06/Arduino-IDE-6.png" alt="" class="wp-image-9354" srcset="https://studentprojects.in/wp-content/uploads/2022/06/Arduino-IDE-6.png 619w, https://studentprojects.in/wp-content/uploads/2022/06/Arduino-IDE-6-300x136.png 300w" sizes="(max-width: 619px) 100vw, 619px" /></figure></div>


<p>If the code gets uploaded to the Arduino board successfully, then the &#8216;Done Uploading&#8217; message will appear in the message area.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img decoding="async" loading="lazy" width="922" height="98" src="https://studentprojects.in/wp-content/uploads/2022/06/Arduino-IDE-7.png" alt="" class="wp-image-9355" srcset="https://studentprojects.in/wp-content/uploads/2022/06/Arduino-IDE-7.png 922w, https://studentprojects.in/wp-content/uploads/2022/06/Arduino-IDE-7-300x32.png 300w, https://studentprojects.in/wp-content/uploads/2022/06/Arduino-IDE-7-768x82.png 768w" sizes="(max-width: 922px) 100vw, 922px" /></figure></div>


<p>Now you can see the LED blinking for 1 second. Also, this can be re-verified for different values of delays.</p>



<p>Congratulations. You have successfully installed Arduino IDE and are ready to explore the Arduino projects.</p>



<hr class="wp-block-separator has-alpha-channel-opacity" />



<div class="is-layout-flex wp-container-3 wp-block-columns">
<div class="is-layout-flow wp-block-column">
<h3>Buy Original Arduino Uno R3 ATmega328P with USB Cable</h3>
</div>



<div class="is-layout-flow wp-block-column">
<a href="https://www.amazon.in/Arduino-Uno-ATmega328P-USB-Cable/dp/B01LCN8IRK?crid=V3NEJ9PBILJW&amp;keywords=Arduino+Uno+R3&amp;qid=1654578888&amp;s=electronics&amp;sprefix=arduino+uno+r3%2Celectronics%2C206&amp;sr=1-1&amp;linkCode=li3&amp;tag=studentproj0d-21&amp;linkId=247a0cda054cd6c246b00aeaa9907c99&amp;language=en_IN&amp;ref_=as_li_ss_il" target="_blank" rel="noopener"><img decoding="async" border="0" src="//ws-in.amazon-adsystem.com/widgets/q?_encoding=UTF8&amp;ASIN=B01LCN8IRK&amp;Format=_SL250_&amp;ID=AsinImage&amp;MarketPlace=IN&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=studentproj0d-21&amp;language=en_IN"></a><img decoding="async" loading="lazy" src="https://ir-in.amazon-adsystem.com/e/ir?t=studentproj0d-21&amp;language=en_IN&amp;l=li3&amp;o=31&amp;a=B01LCN8IRK" width="1" height="1" border="0" alt="" style="border:none !important;margin:0px !important">
</div>
</div>



<hr class="wp-block-separator has-alpha-channel-opacity" />



<div class="is-layout-flex wp-container-6 wp-block-columns">
<div class="is-layout-flow wp-block-column" style="flex-basis:50%">
<h3>Buy Starter Kit based on original Arduino UNO board 30+ DIY Projects for beginners with Video tutorials</h3>
</div>



<div class="is-layout-flow wp-block-column" style="flex-basis:50%">
<a href="https://www.amazon.in/dp/B08ZKLRNN2?_encoding=UTF8&amp;psc=1&amp;linkCode=li3&amp;tag=studentproj0d-21&amp;linkId=be684d549ea092e4f298360e8a2c7d50&amp;language=en_IN&amp;ref_=as_li_ss_il" target="_blank" rel="noopener"><img decoding="async" border="0" src="//ws-in.amazon-adsystem.com/widgets/q?_encoding=UTF8&amp;ASIN=B08ZKLRNN2&amp;Format=_SL250_&amp;ID=AsinImage&amp;MarketPlace=IN&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=studentproj0d-21&amp;language=en_IN"></a><img decoding="async" loading="lazy" src="https://ir-in.amazon-adsystem.com/e/ir?t=studentproj0d-21&amp;language=en_IN&amp;l=li3&amp;o=31&amp;a=B08ZKLRNN2" width="1" height="1" border="0" alt="" style="border:none !important;margin:0px !important">
</div>
</div>



<hr class="wp-block-separator has-alpha-channel-opacity" />



<div class="is-layout-flex wp-container-9 wp-block-columns">
<div class="is-layout-flow wp-block-column">
<h3>Buy IDUINO SMD UNO R3 Board ATmega328P Compatible with Arduino SMD Uno Cable</h3>
</div>



<div class="is-layout-flow wp-block-column">
<a href="https://www.amazon.in/dp/B09ZVLTSJT?&amp;linkCode=li3&amp;tag=studentproj0d-21&amp;linkId=1fec2ac612cd112b796f144814388793&amp;language=en_IN&amp;ref_=as_li_ss_il" target="_blank" rel="noopener"><img decoding="async" border="0" src="//ws-in.amazon-adsystem.com/widgets/q?_encoding=UTF8&amp;ASIN=B09ZVLTSJT&amp;Format=_SL250_&amp;ID=AsinImage&amp;MarketPlace=IN&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=studentproj0d-21&amp;language=en_IN"></a><img decoding="async" loading="lazy" src="https://ir-in.amazon-adsystem.com/e/ir?t=studentproj0d-21&amp;language=en_IN&amp;l=li3&amp;o=31&amp;a=B09ZVLTSJT" width="1" height="1" border="0" alt="" style="border:none !important;margin:0px !important">
</div>
</div><p>The post <a href="https://studentprojects.in/electronics/microcontrollers/getting-started-with-arduino-uno/">Getting Started with Arduino UNO</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/electronics/microcontrollers/getting-started-with-arduino-uno/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Interface stepper motor with 8051 Trainer Kit parallel port</title>
		<link>https://studentprojects.in/electronics/microcontroller/microcontroller-codes/interface-stepper-motor-with-8051-trainer-kit-parallel-port/</link>
					<comments>https://studentprojects.in/electronics/microcontroller/microcontroller-codes/interface-stepper-motor-with-8051-trainer-kit-parallel-port/#respond</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Sat, 12 Mar 2022 17:02:09 +0000</pubDate>
				<category><![CDATA[Microcontroller]]></category>
		<category><![CDATA[8051 Trainer Kit]]></category>
		<category><![CDATA[Stepper motor]]></category>
		<guid isPermaLink="false">https://studentprojects.in/?p=8687</guid>

					<description><![CDATA[<p>AIM: To interface stepper motor with 8051 parallel port and to vary speed of motor, direction of motor. APPARATUS REQUIRED: 8051 Trainer Kit Stepper Motor Interface Board THEORY: A motor in which the rotor is able to assume only discrete stationary angular position is a stepper motor. The rotor motion occurs in a stepwise manner</p>
<p>The post <a href="https://studentprojects.in/electronics/microcontroller/microcontroller-codes/interface-stepper-motor-with-8051-trainer-kit-parallel-port/">Interface stepper motor with 8051 Trainer Kit parallel port</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p><strong>AIM:</strong> To interface stepper motor with 8051 parallel port and to vary speed of motor, direction of motor.</p>



<p><strong>APPARATUS REQUIRED:</strong></p>



<ul><li>8051 Trainer Kit</li><li>Stepper Motor Interface Board</li></ul>



<p><strong>THEORY:</strong></p>



<p>A motor in which the rotor is able to assume only discrete stationary angular position is a stepper motor. The rotor motion occurs in a stepwise manner from one equilibrium position to next.</p>



<p>The motor under our consideration uses 2 – phase scheme of operation. In this scheme, any two adjacent stator windings are energized. The switching condition for the above said scheme is shown in Table.</p>



<p><strong>Clockwise</strong></p>



<figure class="wp-block-table"><table><tbody><tr><td>A1</td><td>B1</td><td>A2</td><td>B2</td></tr><tr><td>1</td><td>0</td><td>0</td><td>1</td></tr><tr><td>0</td><td>1</td><td>0</td><td>0</td></tr><tr><td>0</td><td>1</td><td>0</td><td>1</td></tr><tr><td>1</td><td>0</td><td>1</td><td>0</td></tr></tbody></table></figure>



<p><strong>Anti &#8211; Clockwise</strong></p>



<figure class="wp-block-table"><table><tbody><tr><td>A1</td><td>B1</td><td>A2</td><td>B2</td></tr><tr><td>1</td><td>0</td><td>1</td><td>0</td></tr><tr><td>0</td><td>1</td><td>0</td><td>1</td></tr><tr><td>0</td><td>1</td><td>0</td><td>0</td></tr><tr><td>1</td><td>0</td><td>0</td><td>1</td></tr></tbody></table></figure>



<p>In order to vary the speed of the motor, the values stored in the registers R1, R2, R3 can be changed appropriately.</p>



<p><strong>ALGORITHM:</strong></p>



<ol><li>Store the look up table address in DPTR</li><li>Move the count value (04) to one of the register (R0)</li><li>Load the control word for motor rotation in accumulator</li><li>Push the address in DPTR into stack</li><li>Load FFC0 in to DPTR.</li><li>Call the delay program</li><li>Send the control word for motor rotation to the external device.</li><li>Pop up the values in stack and increment it.</li><li>Decrement the count in R0. If zero go to next step else proceed to step 3.</li><li>Perform steps 1 to 9 repeatedly.</li></ol>



<p><strong>PROGRAM:</strong></p>



<pre class="wp-block-code"><code lang="wasm" class="language-wasm">START: ORG 4100
       MOV DPTR,#4500H
       MOV R0,#04
AGAIN: MOVX A,@DPTR
       PUSH DPH
       PUSH PDL
       MOV DPTR,#FFC0H
       MOV R2, 04H
       MOV R1,#FFH
DLY1:  MOV R3, #FFH
DLY:   DJNZ R3,DLY
       DJNZ R1,DLY1
       DJNZ R2,DLY1
       MOVX @DPTR,A
       POP DPL
       POP DPH
       INC DPTR
       DJNZ R0,AGAIN
       SJMP START</code></pre>



<p><strong>DATA:</strong></p>



<p>4500: 09, 05, 06, 0A</p>



<p><strong>RESULT:</strong></p>



<p>Thus the speed and direction of the motor were controlled using 8051 trainer kit.</p><p>The post <a href="https://studentprojects.in/electronics/microcontroller/microcontroller-codes/interface-stepper-motor-with-8051-trainer-kit-parallel-port/">Interface stepper motor with 8051 Trainer Kit parallel port</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/electronics/microcontroller/microcontroller-codes/interface-stepper-motor-with-8051-trainer-kit-parallel-port/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>ASM program to exhibit the RAM direct addressing</title>
		<link>https://studentprojects.in/electronics/microcontroller/microcontroller-codes/asm-program-to-exhibit-the-ram-direct-addressing/</link>
					<comments>https://studentprojects.in/electronics/microcontroller/microcontroller-codes/asm-program-to-exhibit-the-ram-direct-addressing/#respond</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Sat, 12 Mar 2022 14:48:11 +0000</pubDate>
				<category><![CDATA[Microcontroller]]></category>
		<guid isPermaLink="false">https://studentprojects.in/?p=8685</guid>

					<description><![CDATA[<p>AIM: To exhibit the RAM direct addressing and bit addressing schemes of 8051 microcontroller. ALGORITHM: For Bit addressing, Select Bank 1 of RAM by setting 3rd bit of PSW Using Register 0 of Bank 1 and accumulator perform addition For direct addressing provide the address directly (30 in this case) Use the address and Accumulator</p>
<p>The post <a href="https://studentprojects.in/electronics/microcontroller/microcontroller-codes/asm-program-to-exhibit-the-ram-direct-addressing/">ASM program to exhibit the RAM direct addressing</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p><strong>AIM:</strong> To exhibit the RAM direct addressing and bit addressing schemes of 8051 microcontroller.</p>



<p><strong>ALGORITHM:</strong></p>



<ol><li>For Bit addressing, Select Bank 1 of RAM by setting 3<sup>rd</sup> bit of PSW</li><li>Using Register 0 of Bank 1 and accumulator perform addition</li><li>For direct addressing provide the address directly (30 in this case)</li><li>Use the address and Accumulator to perform addition</li><li>Verify the results</li></ol>



<p><strong>PROGRAM:</strong></p>



<pre class="wp-block-code"><code lang="wasm" class="language-wasm">        SETB	PSW.3
        MOV	R0,#data1
        MOV	A,#data2
        ADD	A,R0
        MOV	DPTR,#4500
        MOVX	@DPTR,A
HERE:	SJMP	HERE</code></pre>



<p><strong>Direct Addressing:</strong></p>



<pre class="wp-block-code"><code lang="wasm" class="language-wasm">        MOV	30,#data1
        MOV	A,#data2
        ADD	A,30
        MOV	DPTR,#4500
        MOVX	@DPTR,A
HERE:   SJMP	HERE</code></pre>



<p><strong>OBSERVATION:</strong></p>



<p><strong>Bit addressing:</strong></p>



<figure class="wp-block-table"><table><tbody><tr><td>Input:</td><td>54</td></tr><tr><td><br></td><td>25</td></tr><tr><td>Output:</td><td>79 (4500)</td></tr></tbody></table></figure>



<p><strong>Direct addressing:</strong></p>



<figure class="wp-block-table"><table><tbody><tr><td>Input:</td><td>54</td></tr><tr><td><br></td><td>25</td></tr><tr><td>Output:</td><td>79 (4500)</td></tr></tbody></table></figure>



<p><strong>RESULT:</strong></p>



<p>Thus the program to exhibit the different RAM addressing schemes of 8051 was executed.</p><p>The post <a href="https://studentprojects.in/electronics/microcontroller/microcontroller-codes/asm-program-to-exhibit-the-ram-direct-addressing/">ASM program to exhibit the RAM direct addressing</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/electronics/microcontroller/microcontroller-codes/asm-program-to-exhibit-the-ram-direct-addressing/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>ASM program to divide two 8 bit numbers using 8051 instruction set</title>
		<link>https://studentprojects.in/electronics/microcontroller/microcontroller-codes/asm-program-to-divide-two-8-bit-numbers-using-8051/</link>
					<comments>https://studentprojects.in/electronics/microcontroller/microcontroller-codes/asm-program-to-divide-two-8-bit-numbers-using-8051/#respond</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Sat, 12 Mar 2022 14:20:50 +0000</pubDate>
				<category><![CDATA[Microcontroller]]></category>
		<guid isPermaLink="false">https://studentprojects.in/?p=8683</guid>

					<description><![CDATA[<p>AIM: To perform division of two 8 – bit numbers using 8051 instruction set. ALGORITHM: Get the data in A – reg. Get the value to be divided in B – reg. Divide the two data The quotient is in A – reg. The remainder is in B – reg. Store the results. PROGRAM: OBSERVATION:</p>
<p>The post <a href="https://studentprojects.in/electronics/microcontroller/microcontroller-codes/asm-program-to-divide-two-8-bit-numbers-using-8051/">ASM program to divide two 8 bit numbers using 8051 instruction set</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p><strong>AIM: </strong>To perform division of two 8 – bit numbers using 8051 instruction set.</p>



<p><strong>ALGORITHM:</strong></p>



<ol><li>Get the data in A – reg.</li><li>Get the value to be divided in B – reg.</li><li>Divide the two data</li><li>The quotient is in A – reg.</li><li>The remainder is in B – reg.</li><li>Store the results.</li></ol>



<p><strong>PROGRAM:</strong></p>



<pre class="wp-block-code"><code class="">        ORG	4100
        CLR	C
        MOV	A,#data1
        MOV	B,#data2
        DIV	AB
        MOV	DPTR,#4500
        MOVX	@DPTR,A
        INC	DPTR
        MOV	A,B
        MOVX	@DPTR,A
HERE:	SJMP	HERE</code></pre>



<p><strong>OBSERVATION:</strong></p>



<figure class="wp-block-table"><table><tbody><tr><td>Input:</td><td>05</td></tr><tr><td><br></td><td>03</td></tr><tr><td>Output:</td><td>01 (4500)</td></tr><tr><td><br></td><td>02 (4501)</td></tr></tbody></table></figure>



<p><strong>RESULT:</strong></p>



<p>Thus the program to perform multiplication of two 8 – bit numbers using 8051 instruction set was executed.</p><p>The post <a href="https://studentprojects.in/electronics/microcontroller/microcontroller-codes/asm-program-to-divide-two-8-bit-numbers-using-8051/">ASM program to divide two 8 bit numbers using 8051 instruction set</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/electronics/microcontroller/microcontroller-codes/asm-program-to-divide-two-8-bit-numbers-using-8051/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>ASM program to multiply two 8 bit numbers using 8051 instruction set</title>
		<link>https://studentprojects.in/electronics/microcontroller/microcontroller-codes/asm-program-to-multiply-two-8-bit-numbers-using-8051/</link>
					<comments>https://studentprojects.in/electronics/microcontroller/microcontroller-codes/asm-program-to-multiply-two-8-bit-numbers-using-8051/#respond</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Sat, 12 Mar 2022 10:43:10 +0000</pubDate>
				<category><![CDATA[Microcontroller]]></category>
		<guid isPermaLink="false">https://studentprojects.in/?p=8679</guid>

					<description><![CDATA[<p>AIM: To perform multiplication of two 8 – bit numbers using 8051 instruction set. ALGORITHM: Get the data in A – reg. Get the value to be multiplied in B – reg. Multiply the two data The higher order of the result is in B – reg. The lower order of the result is in</p>
<p>The post <a href="https://studentprojects.in/electronics/microcontroller/microcontroller-codes/asm-program-to-multiply-two-8-bit-numbers-using-8051/">ASM program to multiply two 8 bit numbers using 8051 instruction set</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p><strong>AIM:</strong> To perform multiplication of two 8 – bit numbers using 8051 instruction set.</p>



<p><strong>ALGORITHM:</strong></p>



<ol><li>Get the data in A – reg.</li><li>Get the value to be multiplied in B – reg.</li><li>Multiply the two data</li><li>The higher order of the result is in B – reg.</li><li>The lower order of the result is in A – reg.</li><li>Store the results.</li></ol>



<p><strong>PROGRAM:</strong></p>



<pre class="wp-block-code"><code lang="wasm" class="language-wasm">        ORG	4100
        CLR	C
        MOV	A,#data1
        MOV	B,#data2
        MUL	AB
        MOV	DPTR,#4500
        MOVX	@DPTR,A
        INC	DPTR
        MOV	A,B
        MOVX	@DPTR,A 
HERE:	SJMP	HERE</code></pre>



<p><strong>OBSERVATION:</strong></p>



<figure class="wp-block-table"><table><tbody><tr><td>Input:</td><td>80</td></tr><tr><td><br></td><td>80</td></tr><tr><td>Output:</td><td>00 (4500)</td></tr><tr><td><br></td><td>19 (4501)</td></tr></tbody></table></figure>



<p><strong>RESULT:</strong></p>



<p>Thus the program to perform multiplication of two 8 – bit numbers using 8051 instruction set was executed.</p><p>The post <a href="https://studentprojects.in/electronics/microcontroller/microcontroller-codes/asm-program-to-multiply-two-8-bit-numbers-using-8051/">ASM program to multiply two 8 bit numbers using 8051 instruction set</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/electronics/microcontroller/microcontroller-codes/asm-program-to-multiply-two-8-bit-numbers-using-8051/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>ASM program to add two 8 bit numbers using 8051 instruction set</title>
		<link>https://studentprojects.in/electronics/microcontroller/microcontroller-codes/asm-program-to-add-two-8-bit-numbers-8051/</link>
					<comments>https://studentprojects.in/electronics/microcontroller/microcontroller-codes/asm-program-to-add-two-8-bit-numbers-8051/#respond</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Sat, 12 Mar 2022 04:32:20 +0000</pubDate>
				<category><![CDATA[Microcontroller]]></category>
		<guid isPermaLink="false">https://studentprojects.in/?p=8675</guid>

					<description><![CDATA[<p>AIM: To perform addition of two 8 – bit numbers using 8051 instruction set. ALGORITHM: Clear C – register for Carry Get the data immediately . Add the two data Store the result in memory pointed by DPTR PROGRAM: OBSERVATION: Input: 66 23 Output: 89 (4500) RESULT: Thus the program to perform the addition of</p>
<p>The post <a href="https://studentprojects.in/electronics/microcontroller/microcontroller-codes/asm-program-to-add-two-8-bit-numbers-8051/">ASM program to add two 8 bit numbers using 8051 instruction set</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p><strong>AIM:</strong> To perform addition of two 8 – bit numbers using 8051 instruction set.</p>



<p><strong>ALGORITHM:</strong></p>



<ol><li>Clear C – register for Carry</li><li>Get the data immediately .</li><li>Add the two data</li><li>Store the result in memory pointed by DPTR</li></ol>



<p><strong>PROGRAM:</strong></p>



<pre class="wp-block-code"><code lang="wasm" class="language-wasm">        ORG	4100
        CLR	C
        MOV	A,#data1
        ADD	A,#data2
        MOV	DPTR,#4500
        MOVX	@DPTR,A 
HERE:	SJMP	HERE</code></pre>



<p><strong>OBSERVATION:</strong></p>



<figure class="wp-block-table"><table><tbody><tr><td>Input:</td><td>66</td></tr><tr><td><br></td><td>23</td></tr><tr><td>Output:</td><td>89 (4500)</td></tr></tbody></table></figure>



<p><strong>RESULT:</strong></p>



<p>Thus the program to perform the addition of two 8 – bit numbers using 8051 instruction set was executed.</p><p>The post <a href="https://studentprojects.in/electronics/microcontroller/microcontroller-codes/asm-program-to-add-two-8-bit-numbers-8051/">ASM program to add two 8 bit numbers using 8051 instruction set</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/electronics/microcontroller/microcontroller-codes/asm-program-to-add-two-8-bit-numbers-8051/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Stepper Motor Chopping Driver</title>
		<link>https://studentprojects.in/electronics/microcontroller/8051-8951/stepper-motor-chopping-driver/</link>
					<comments>https://studentprojects.in/electronics/microcontroller/8051-8951/stepper-motor-chopping-driver/#comments</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Thu, 01 Oct 2009 16:33:35 +0000</pubDate>
				<category><![CDATA[8051/8951]]></category>
		<category><![CDATA[Stepper motor]]></category>
		<category><![CDATA[circuits]]></category>
		<category><![CDATA[chopping driver]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=799</guid>

					<description><![CDATA[<p>Chopper drive circuits Chopper drive circuits are also referred to as constant current drives because they generate a somewhat constant current in each winding rather than applying a constant voltage. On each new step, a very high voltage is applied to the winding initially. This causes the current in the winding to rise quickly since</p>
<p>The post <a href="https://studentprojects.in/electronics/microcontroller/8051-8951/stepper-motor-chopping-driver/">Stepper Motor Chopping Driver</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p><strong>Chopper drive circuits<br />
</strong></p>
<p>Chopper drive circuits are also referred to as constant current drives because they generate a somewhat constant current in each winding rather than applying a constant voltage. On each new step, a very high voltage is applied to the winding initially. This causes the current in the winding to rise quickly since dI/dt = V/L where V is very large.</p>
<p>When the current exceeds a specified current limit, the voltage is turned off or &#8220;chopped&#8221; and when the winding current drops below the specified limit, the voltage is turned on again. In this way, the current is held relatively constant for a particular step position.<br />
This allows driving stepper motors with higher torque and higher speed.</p>
<p><strong>Steps:</strong></p>
<ol>
<li> Measure Inductance and resistance of motor coil.</li>
<li> Get time constant.</li>
<li> Choose voltage value and desired calculation for program variables.</li>
<li> Write chopping program.</li>
</ol>
<p><img decoding="async" loading="lazy" class="size-full wp-image-800" title="Stepper Motor Chopping Driver" src="https://studentprojects.in/wp-content/uploads/2009/10/Stepper_Motor_Chopping_Driver.jpg" alt=" " width="500" height="259" /></p>
<p>Can be done using oscilloscope and step response equation on LR circuit or from stepper motor datasheet:<br />
<img decoding="async" loading="lazy" class="aligncenter size-full wp-image-801" title="Step response equation" src="https://studentprojects.in/wp-content/uploads/2009/10/Step_response_equation.jpg" alt="Step response equation" width="268" height="71" />Put I= maximum coil current from stepper datasheet (different from Imax)<br />
R=Rc = internal resistance of the stepper coil from stepper datasheet<br />
L =Lc = inductance of stepper coil from stepper datasheet<br />
Time constant ( T ) = L/R.<br />
Put t which is the desired time to reach the step level (start of chopping)</p>
<p>From above we can get   Imax  then by multiplying  it with Rc we can get the desired Applied voltage Vs to reach the maximum current in time t.<br />
<strong><br />
Case Study:<br />
</strong><br />
Stepper motor has the following specifications<br />
Max current per phase = 1A, voltage = 5.7V, Resistance per phase = 5.7<br />
Inductance = 6.5 mH/phase</p>
<p>So its time constant = 1.14 msec<br />
We put desired t=.5 msec to reach its max current instead of taking 1.14 msec It will give us Imax = 2.8164 and Vs=16 V so we will need to apply a 16 V to reach our max current per Phase in .5 msec.</p>
<p><strong>Program for Chopping driver </strong></p>
<pre lang="c">#include &lt;16f628.h&gt;
#use delay ( clock=4M )

// GLOBAL VARIABLES /////////////
int steps[] = {1,2,4,8}; // motor steps
int step_ptr = 0;
int step = 0;
int desiredt = 500; // desired time to reach max current at start of every step 0.5 msec
int choppingt = 50; // chopping time = 0.1 desired time = 50 usec

// FUNCTIONS ////////////////////

// INTERRUPTS ///////////////////

#INT_TIMER0
void change_step ()
{
if ((++step_ptr) &gt; 3)  step_ptr=0;
step = steps[step_ptr];
output_b(step);
delay_us(desiredt);
output_b(0);
delay_us(choppingt);
}

// MAIN /////////////////////////
void main()
{
// Motor terminals are connected to Port B (Unipolar Stepper Motor)
// setup interrupt timer0 to desired stepping speed let motor change step every 2msec
// if step angle = 1.8 degree, steps per revolution = 360/1.8 = 200 steps
// time per revolution = 200 * 2 msec = 0.4 sec
// rpm = 60/0.4 = 150 rpm

setup_timer_0(RTCC_INTERNAL | RTCC_DIV_16);

// put first step//
step = steps[step_ptr];
output_b(step);
delay_us(desiredt);
output_b(0);
delay_us(choppingt);

// enable interrupt/////
enable_interrupts(GLOBAL);
enable_interrupts(INT_TIMER0);

// chopping loop//

while (1)
{
// put step (apply voltage) //
output_b(step);
// wait chopping time //
delay_us(choppingt);
// clear step ////
output_b(0);
// wait chopping time//
delay_us(choppingt);
}
}</pre>
<p>References:</p>
<p>&#8211;    Wikipedia.org<br />
&#8211;    Microchip Co. application notes.</p>
<p>Article by &#8211; Amr Ayoub</p><p>The post <a href="https://studentprojects.in/electronics/microcontroller/8051-8951/stepper-motor-chopping-driver/">Stepper Motor Chopping Driver</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/electronics/microcontroller/8051-8951/stepper-motor-chopping-driver/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Interfacing 7-segment display using 8051 Microcontroller</title>
		<link>https://studentprojects.in/electronics/microcontroller/8051-8951/interfacing-7-segment-display-using-8051-microcontroller/</link>
					<comments>https://studentprojects.in/electronics/microcontroller/8051-8951/interfacing-7-segment-display-using-8051-microcontroller/#comments</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Mon, 17 Aug 2009 13:32:44 +0000</pubDate>
				<category><![CDATA[8051/8951]]></category>
		<category><![CDATA[program to interface]]></category>
		<category><![CDATA[pin configuration]]></category>
		<category><![CDATA[Interfacing using microcontroller]]></category>
		<category><![CDATA[7447 decoder]]></category>
		<category><![CDATA[lookup table]]></category>
		<category><![CDATA[7-segment]]></category>
		<category><![CDATA[8051 Microcontroller]]></category>
		<category><![CDATA[8951 Microcontroller]]></category>
		<category><![CDATA[Seven Segment]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=673</guid>

					<description><![CDATA[<p>The Light Emitting Diode (LED), finds its place in many applications in this modern electronic fields. One of them is the Seven Segment Display. Seven-segment displays contains the arrangement of the LEDs in “Eight” (8) passion, and a Dot (.) with a common electrode, lead (Anode or Cathode). The purpose of arranging it in that</p>
<p>The post <a href="https://studentprojects.in/electronics/microcontroller/8051-8951/interfacing-7-segment-display-using-8051-microcontroller/">Interfacing 7-segment display using 8051 Microcontroller</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>The Light Emitting Diode (LED), finds its place in many applications in this modern electronic fields. One of them is the Seven Segment Display. Seven-segment displays contains the arrangement of the LEDs in “Eight” (8) passion, and a Dot (.) with a common electrode, lead (Anode or Cathode). The purpose of arranging it in that passion is that we can make any number out of that by switching ON and OFF the particular LED&#8217;s. Here is the block diagram of the Seven Segment LED arrangement.<span id="more-673"></span></p>
<p style="text-align: center;"><strong>Pin configuration of a seven segment display:</strong><br /><img decoding="async" loading="lazy" class="size-medium wp-image-475 aligncenter" title="7 segment pin configuration" src="https://studentprojects.in/wp-content/uploads/2009/04/7_seg_pin_config-300x266.gif" alt="7 segment pin configuration" width="300" height="266" /></p>
<p><strong>LED’s are basically of two types:</strong></p>
<ol>
<li>Common Cathode (CC)<br />All the 8 anode legs uses only one cathode, which is common.</li>
<li>Common Anode (CA)<br />The common leg for all the cathode is of Anode type.</li>
</ol>
<p>For the discussion purpose, we use CC LED, where by just reversing the logical voltages we can implement the same for CA LED also.</p>
<p>In a CC LED, all the 8 legs (&#8216;a&#8217; through &#8216;h&#8217;) are of anode type and the common cathode will be connected to the GND of the supply. By energizing any of the legs with +5 Volts will lead to switch the correspondent segment ON. In the microprocessor binary system, 0Volts will be considered as Binary 0, and 5Volts will be considered as Binary1. Considering these two condition, we can make an arrangement as the microcontroller gives OUT the 0s and 1s through its ports, which is connected to the 8 legs of the LED. Of course, we can control the Port Output; implicitly we can Switch-ON required legs of the display.</p>
<p>There 2 methods of interfacing LED with the Microcontroller Intel 8051/8951.</p>
<ol>
<li><a href="https://studentprojects.in/articles/electronics/microcontroller-electronics-articles/8051-8951/interfacing-7-segment-display-with-microcontroller-using-lookup-table/">Using lookup table. This uses 7 output pins of microcontroller</a></li>
<li>Using 7447 decoder. This method uses 4 output pins of microcontroller</li>
</ol>
<p>The difference between the two main methods is simple and clear. In both the cases, microcontroller communicates with external world through its ports. But, in the 1st case, we connect all the 8 pins of the port directly to the LED and control the voltage through the ports manually to display the desired number. But, in the second case, we send the BCD of the number that we wanted to display to a middleware IC 7447, the BCD to LED code converter, which by itself gives out the correspondent 7 segment codes to the LED.</p>
<p>Here we explain using lookup table. Click here for the method &#8220;using 7447 decoder&#8221;</p>
<p><strong>Using 7447 decoder:</strong></p>
<p>The IC7447 is a BCD to 7-segment pattern converter. This setup is the advanced form of the &lt;previous&gt; setup where we entered the patterns manually to display the desired character. Here in this case, the IC7447 takes the Binary Coded Decimal (BCD) as the input and outputs the relevant 7 segment code. We connect first four pins of the microcontroller Port 2  to the 7447 and the Output 8 pins of 7447 to the 8 legs of the LED as shown in the figure. Te circuit diagrams are shown below, the first figure is interfacing the CA LED where as the second is of CC LED. The number required to display is sent as the lower nibble of the Port 2 of the Microcontroller. The 7447 converts the four input bits (BCD) to their corresponding 7-segment codes. The outputs of the 7447 are connected to the 7-segment display.</p>
<figure id="attachment_674" aria-describedby="caption-attachment-674" style="width: 507px" class="wp-caption aligncenter"><img decoding="async" loading="lazy" class="size-full wp-image-674" title="Circuit diagram for interfacing Common Anode 7-Segment Display " src="https://studentprojects.in/wp-content/uploads/2009/08/7_seg_circuit_ca_7447.gif" alt="Circuit diagram for interfacing Common Anode 7-Segment Display" width="507" height="326" /><figcaption id="caption-attachment-674" class="wp-caption-text">Circuit diagram for interfacing Common Anode 7-Segment Display</figcaption></figure>
<figure id="attachment_675" aria-describedby="caption-attachment-675" style="width: 507px" class="wp-caption aligncenter"><img decoding="async" loading="lazy" class="size-full wp-image-675" title="Circuit diagram for Common Cathode 7-Segment Display" src="https://studentprojects.in/wp-content/uploads/2009/08/7_seg_circuit_cc_7447.gif" alt="Circuit diagram for Common Cathode 7-Segment Display" width="507" height="326" /><figcaption id="caption-attachment-675" class="wp-caption-text">Circuit diagram for Common Cathode 7-Segment Display</figcaption></figure>
<p><strong>Program:</strong></p>
<p lang="asm">This program displays characters 0 through 9 on seven-segment display using IC 7447 as the middle wear.</p>


<pre class="wp-block-code"><code lang="wasm" class="language-wasm">again: mov a,#00h ; Start form zero
       up: mov p2, a ; Move to Port 2 
       mov r3,#255 ; Delay 
D1:    mov r1,#255 
D:     djnz r1,D 
       djnz r3,D1 
       inc a 
       cjne a,#0ah,up 
       sjmp again</code></pre><p>The post <a href="https://studentprojects.in/electronics/microcontroller/8051-8951/interfacing-7-segment-display-using-8051-microcontroller/">Interfacing 7-segment display using 8051 Microcontroller</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/electronics/microcontroller/8051-8951/interfacing-7-segment-display-using-8051-microcontroller/feed/</wfw:commentRss>
			<slash:comments>51</slash:comments>
		
		
			</item>
		<item>
		<title>Heavy electrical device protector</title>
		<link>https://studentprojects.in/electronics/microcontroller/8051-8951/heavy-electrical-device-protector/</link>
					<comments>https://studentprojects.in/electronics/microcontroller/8051-8951/heavy-electrical-device-protector/#comments</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Sun, 16 Aug 2009 15:41:26 +0000</pubDate>
				<category><![CDATA[8051/8951]]></category>
		<category><![CDATA[Microcontroller]]></category>
		<category><![CDATA[Device protector]]></category>
		<category><![CDATA[ADC]]></category>
		<category><![CDATA[Electronic project]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=658</guid>

					<description><![CDATA[<p>Applications: In monitoring &#38; controlling of power systems such as Transformers, Generators, Motors etc. To analyze the performance of electrical machines. Can be used as a safety device to protect machines from over loading, excessive voltage etc. To make the power distribution system efficient. Recording device/Line parameters. Introduction This unit is used to protect heavy</p>
<p>The post <a href="https://studentprojects.in/electronics/microcontroller/8051-8951/heavy-electrical-device-protector/">Heavy electrical device protector</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p><strong>Applications:</strong></p>
<ol>
<li> In monitoring &amp; controlling of power systems such as Transformers, Generators, Motors etc.</li>
<li>To analyze the performance of electrical machines.</li>
<li>Can be used as a safety device to protect machines from over loading, excessive voltage etc.</li>
<li> To make the power distribution system efficient.</li>
<li>Recording device/Line parameters.</li>
</ol>
<p><strong>Introduction<br />
</strong><br />
This unit is used to protect heavy electrical machinery from damage caused by over loading. Over heating excessive voltage etc.</p>
<p>The unit works as a fuse so disconnect the device or m/c from circuit when detects abnormal condition &amp; after a fixed time (for over loading )/ or when conditions gets normal it automatically reconnects the unit or m/c to circuit.</p>
<p>Now if it detects the abnormal condition again it repeats the process again for a number of time &amp; if condition does not get normal, it disconnect &amp; locks the m/c.</p>
<p>We are also providing the facility of password protection so m/c will not run after locking without entering password.</p>
<p><strong>Auto Recloser</strong></p>
<p>In our project we designed a circuit which contains a micro controller which collects the data from sensors placed at different locations of device &amp; display them into LCD.</p>
<p>Now after collecting the data micro controller compares them with standard values (pre defined for each sensor on normal working conditions) &amp; if it detects deviation from normal values it gives a buzzer sound &amp; if it crosses the maximum limit it trip off the unit for a fixed duration &amp; records the collected data into EEPROM.<br />
Now if the number of tripping exceeds the 10 no. it  permanently trip the unit &amp; starts them only after detecting the password.</p>
<p><strong>The utility of this circuit are:</strong></p>
<ol>
<li> To warn the manufacturer at the initial stage of fault so that manufacturer can take proper corrective action before serious damage to device occurs which saves a lot of money required to reconstruct the device and other associated losses.</li>
<li> Performance observation of the device.</li>
<li> Monitoring of the device.</li>
</ol>
<p><strong>Block Diagram Explanation<br />
</strong></p>
<p><figure id="attachment_660" aria-describedby="caption-attachment-660" style="width: 264px" class="wp-caption alignleft"><img decoding="async" loading="lazy" class="size-full wp-image-660" title="Block Diagram" src="https://studentprojects.in/wp-content/uploads/2009/08/block_Diagram.jpg" alt="Block Diagram" width="264" height="492" /><figcaption id="caption-attachment-660" class="wp-caption-text">Block Diagram</figcaption></figure></p>
<p><strong>A) Sensors:</strong></p>
<p>This is the part of circuit which senses the different parameters of the unit.<br />
To make the circuit unit independent it is necessary to use a conditioning unit between sensor &amp; multiplexer. The conditioning unit will automatically maintain the output level of signals between desired limits.</p>
<p><strong>B) Multiplexer:<br />
</strong><br />
This is required to select sensors one by one for analog to digital conversion of their values (output). When we are using single ADC the multiplexer must be analog in nature because we have to connect the analog signals.</p>
<p><strong>C) A/D Converter:<br />
</strong><br />
This unit converts the analog signals coming from multiplexer in to 8bit parallel digital data which is a must for Micro controller operation because Micro controller can not work with analog signals directly.</p>
<p><strong>D) Micro controller:<br />
</strong><br />
As the name indicates this unit has the over all command of all blocks or this unit decides  when to use &amp; which unit has to be used. Since it is a programmable device it provides the facility to update the device without changes in hardware &amp; it also reduces the hardware required to implement the circuit.</p>
<p><strong>E) LCD Display:<br />
</strong><br />
Display plays an important role whenever we want a user friendly system because user can see &amp; read the information from display &amp; can get better understanding about the system. Since we want to display alphabets for massages &amp; digits for readings we required a alphanumeric LCD display so we use a 16 character , 2 line display best suitable for our requirement because our massage length to not greater then 16 character, so they can be displayed on single line only.</p>
<p><strong>F)  EEPROM R/W<br />
</strong><br />
As we consider a SIM it’s a memory card or ROM   which can be erased electrically because many EEPROM requires different voltage levels to program, we need a voltage level shifter or Converter to interface it with microcontroller which have only two level outputs 5VDC &amp; 0V DC.</p>
<p><strong>G)  EEPROM<br />
</strong><br />
It’s a two terminal memory device which stores the Information about the energy in a predefined format it contains 10, 8bit number interrelated by some mathematical function so that it can  not be charged by unauthorized persons although we have used here a chip which can be used for 256 bytes of memory so that in future we can incorporate some additional features also in same card.</p>
<p><strong>H) Key Pad<br />
</strong><br />
This section consist the keys one to reset the controller &amp; other one to provide the password.</p>
<p><strong>I) Indications &amp; Beeper<br />
</strong><br />
Although we are using here a LCD display to display the information but it is still requirement of a system that it should create the special attention of user to read same specific information on LCD this is done by this block. It generates a beeping sound on over loading mode. So that user need not to read the LCD frequently (when not required).</p>
<p><strong>J)  Relay &amp; tripping unit</strong></p>
<p>To disconnect the supply when tripped. </p><p>The post <a href="https://studentprojects.in/electronics/microcontroller/8051-8951/heavy-electrical-device-protector/">Heavy electrical device protector</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/electronics/microcontroller/8051-8951/heavy-electrical-device-protector/feed/</wfw:commentRss>
			<slash:comments>18</slash:comments>
		
		
			</item>
		<item>
		<title>PIC &#8211; Introduction</title>
		<link>https://studentprojects.in/electronics/microcontroller/pic/pic-introduction/</link>
					<comments>https://studentprojects.in/electronics/microcontroller/pic/pic-introduction/#comments</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Fri, 05 Jun 2009 09:45:33 +0000</pubDate>
				<category><![CDATA[PIC]]></category>
		<category><![CDATA[PIC Microcontrollers]]></category>
		<category><![CDATA[PIC Tutorial]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=562</guid>

					<description><![CDATA[<p>The term PIC, or Peripheral Interface Controller, has been coined by Microchip technology to identify its single chip microcontrollers. PIC microcontrollers possess an array of features that make them attractive for a wide range of applications. Furthermore these microcontrollers are available with a range of capabilities, packaged in both dual-in-line(DIP) packages and surface-mount packages. Factors</p>
<p>The post <a href="https://studentprojects.in/electronics/microcontroller/pic/pic-introduction/">PIC – Introduction</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>The term PIC, or Peripheral Interface Controller, has been coined by Microchip technology to identify its single chip microcontrollers. PIC microcontrollers possess an array of features that make them attractive for a wide range of applications. Furthermore these microcontrollers are available with a range of capabilities, packaged in both dual-in-line(DIP) packages and surface-mount packages. Factors that account for the wide popularity of PIC microcontrollers include the following:</p>
<ul>
<li><strong>Speed</strong>: When operated at its maximum clock rate, a PIC executes most of its instructions in 0.2µs, or 5 instructions per microsecond.</li>
<li><strong>Instruction set simplicity</strong>: The instruction set consists of just 35 instructions.</li>
<li><strong>Integration of operational features</strong>: Power-on Reset and Brown –out protection insure that the chip operates only when the supply voltage is within specification. A watchdog timer resets the PIC if the chip ever malfunctions and deviates from its normal operations.</li>
<li><strong>Programmable timer options</strong>: The versatile timers can characterize inputs, control outputs and provide timing for program execution.</li>
<li><strong>Interrupt control</strong>: Up to 12 independent interrupt sources can control when the CPU will deal with each source.</li>
<li><strong>Powerful output pin control</strong>: A single instruction can select and drive a single output pin high or low in its 0.2µs instruction execution time. The pin can drive a load of up to 25mA.</li>
<li><strong>I/O port expansion</strong>:  The built-in serial peripheral interface can make use of standard 16-pin shift register parts to add any number of I/O pins.</li>
<li><strong>Serial programming via two pins</strong>: The simplicity of programming hardware supports the availability of PIC programmers for under $100.</li>
</ul>
<p>PICs use a RISC instruction set, which varies in length from about 35 instructions for the low-end PICs to about 70 instructions for the high-end PICs. The instruction set includes instructions to perform a variety of operations on the accumulator and a constant or the accumulator and a memory location, as well as for conditionally executing code and jumping/calling other parts of the program and returning from them, and specific hardware features like interrupts and one low-power mode called sleep. Microchip provides a freeware IDE package called MPLAB, which also includes a software simulator as well as an assembler.</p>
<p>The word size of PICs is a source of much confusion. All PICs (except dsPICs and PIC24s) handle data in 8-bit chunks, so they should be called 8-bit microcontrollers. But unlike most CPUs, PICs use Harvard architecture, so the size of an instruction can be different from the size of the data. In fact, different PIC families use different instruction sizes, which make it a challenge to compare the code size of PICs to other microcontrollers. For example, say a microcontroller has 6144 bytes of program memory. For a 12-bit PIC, this works out to 4096 words (or assembly instructions); for a 16-bit PIC, this is 3072 words.<br />
PICmicro devices are grouped by the size of their instruction word and their instruction set. The four current PICmicro families and their instruction word length are:</p>
<ol>
<li>Base-Line:    12-bit instruction Word length</li>
<li>Mid-Range:  14-bit instruction Word length</li>
<li>High-End:     16-bit instruction Word length</li>
<li>Enhanced:    16-bit instruction Word length</li>
</ol>
<p>The PIC18FXXX MCU family belongs to the Enhanced MCU family of devices. These devices have full-speed USB support, all sorts of inbuilt hardware and are very powerful and versatile.</p>
<p>Microchip offers three program memory types. The memory type is designated in the part number by the first letter(s) after the family affiliation designators.</p>
<ol>
<li>C, as in PIC18CXXX. These devices have EEPROM type memory.</li>
<li>CR, as in PIC18CRXXX. These devices have ROM type memory.</li>
<li>F, as in PIC18FXXX. These devices have FLASH type memory.</li>
</ol>
<p>The PIC18FXXX family offers the advantages of all PIC18 microcontrollers-namely, high computational performance at an economical price-with the addition of high-endurance, Enhanced flash program memory.</p>
<p>Microchip offers a wide range of development tools that allows users to efficiently develop and debug application code. Microchip’s development tools can be broken down into four categories:</p>
<ol>
<li>Code generation</li>
<li>Hardware/Software debug</li>
<li>Device programmer</li>
<li>Product evaluation boards</li>
</ol>
<p>All tools developed by Microchip operate under the MPLAB@ Integrated Development Environment (IDE).</p><p>The post <a href="https://studentprojects.in/electronics/microcontroller/pic/pic-introduction/">PIC – Introduction</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/electronics/microcontroller/pic/pic-introduction/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
	</channel>
</rss>
