tag:blogger.com,1999:blog-61185979064839960752024-02-19T08:08:47.488-08:00Microcontroller Projects and Tutorialsstevehttp://www.blogger.com/profile/09905558157086670938noreply@blogger.comBlogger7125tag:blogger.com,1999:blog-6118597906483996075.post-11237626534005661592011-07-23T07:40:00.000-07:002011-07-23T07:40:51.812-07:00Password(code) Based Digital Locking System Using Microcontroller 89C52/89S52<div dir="ltr" style="text-align: left;" trbidi="on"><div dir="ltr" style="text-align: left;" trbidi="on"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiceFtDzPgQg29Mot7p7D5DxtjzAMnaTx-TSX0NVekrn53OVEG42F75tXKJrhl3B9eL8czsWnYV_MFC_CAGRVfWfrFdZGOEFTIJj7QIAlrO0G5L-XiTPWzhSIOAVHdZfTqxFf67PLfvgxg/s1600/digital+locking+system.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiceFtDzPgQg29Mot7p7D5DxtjzAMnaTx-TSX0NVekrn53OVEG42F75tXKJrhl3B9eL8czsWnYV_MFC_CAGRVfWfrFdZGOEFTIJj7QIAlrO0G5L-XiTPWzhSIOAVHdZfTqxFf67PLfvgxg/s320/digital+locking+system.JPG" width="320" /></a></div><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;">If you are a beginner in making micro controller projects then this mini project<br />
might just work for you. It's very simple and anybody can make it. The aim<br />
of the project is quite predictable from the title itself-you enter a wrong password<br />
the application wont work(in this case led is used as the application) and on correct<br />
entering of the password, the application as in this case "led" will glow.In this Digital locking system project you will learn more about interfacing keypad and 16x2 LCD to your micro controller along with the code.</span><br />
<span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;"><br />
</span><br />
<br />
<h2 class="module_title " style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #555555; font-family: Georgia, 'Times New Roman', serif; font-size: 1.71em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i>components required</i></h2><div><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;">For this project you will need the following components:</span></div><div><ul style="text-align: left;"><li><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif;"><span class="Apple-style-span" style="font-size: 14px; line-height: 21px;">1 microcontroller 89C52(89S52 will also do)</span></span></li>
<li><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif;"><span class="Apple-style-span" style="font-size: 14px; line-height: 21px;">1 potentiometer-10k</span></span></li>
<li><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif;"><span class="Apple-style-span" style="font-size: 14px; line-height: 21px;">2 ceramic capacitors-22pF</span></span></li>
<li><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif;"><span class="Apple-style-span" style="font-size: 14px; line-height: 21px;">1 switch(button for reset purpose)</span></span></li>
<li><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif;"><span class="Apple-style-span" style="font-size: 14px; line-height: 21px;">1 electrolytic capacitor-10uF,25V</span></span></li>
<li><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif;"><span class="Apple-style-span" style="font-size: 14px; line-height: 21px;">1 crystal oscillator-11.0592MHz</span></span></li>
<li><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif;"><span class="Apple-style-span" style="font-size: 14px; line-height: 21px;">16x2 LCD display</span></span></li>
<li><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif;"><span class="Apple-style-span" style="font-size: 14px; line-height: 21px;">1 resistor-10k</span></span></li>
<li><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif;"><span class="Apple-style-span" style="font-size: 14px; line-height: 21px;">1keypad(here, i have used a calculator keypad.In proteus you can find it by typing keypad-smallcalc)</span></span></li>
<li><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif;"><span class="Apple-style-span" style="font-size: 14px; line-height: 21px;">1 led</span></span></li>
<li><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif;"><span class="Apple-style-span" style="font-size: 14px; line-height: 21px;">1 330 ohm resistor</span></span></li>
</ul><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;"></span><br />
<h2 class="module_title " style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: large; line-height: 21px;"><i>Schematic diagram</i></span></h2><div class="separator" style="clear: both; text-align: center;"><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUUghTlKhRA63U8jyhXqBILr9i_YfYDtRLzD5mRiuDj8WvgLjXADIwuDjISqKolc2p0OU5qH1wHE2ZCfmTz0Vzs03cogswmOzac1__eY813KLLMvtELUl6Nte7EldZmkZu3YfCdGQ8xoA/s1600/schematic.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="365" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUUghTlKhRA63U8jyhXqBILr9i_YfYDtRLzD5mRiuDj8WvgLjXADIwuDjISqKolc2p0OU5qH1wHE2ZCfmTz0Vzs03cogswmOzac1__eY813KLLMvtELUl6Nte7EldZmkZu3YfCdGQ8xoA/s400/schematic.JPG" width="400" /></a></span></div><div><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;"><i><br />
</i></span></div><div><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;"><i><br />
</i></span></div><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;">Since this project has been made in proteus software you must have a prior knowledge of it. If you are unaware of the software here is a tutorial which i recommended in one of my previous articles.</span></div><div><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;"><br />
</span></div><div><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif;"><span class="Apple-style-span" style="font-size: 14px; line-height: 21px;"><a href="http://allaboutlearningandearning.blogspot.com/2011/07/proteus-tutorial.html">Click here for Proteus Tutorial</a></span></span></div><div><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif;"><br />
</span></div><div><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;"></span><br />
<h2 class="module_title " style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.71em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;"><i>The connection of the circuit is explained below:</i></span></h2></div><div><ul class="textlist_ul" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-top: 0px; padding-bottom: 14px; padding-top: 0px;"><li style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 1em; line-height: 1.5em; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">Port 1 of the microcontroller is used as the output port</li>
<li style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 1em; line-height: 1.5em; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">Port 2 of the microcontroller is used as the output port</li>
<li style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 1em; line-height: 1.5em; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">Port 3 of the microcontroller is used as the input port.</li>
<li style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 1em; line-height: 1.5em; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">The LCD is connected to port 2 since output is displayed on LCD</li>
<li style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 1em; line-height: 1.5em; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">The led is connected to port 1 which is our application in this project</li>
<li style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 1em; line-height: 1.5em; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">The keypad is connected to port 3</li>
<li style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 1em; line-height: 1.5em; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">Other components like the crystal and switch are connected for the working of the microcontroller ( minimum circuitry required for proper working of the microcontroller).</li>
</ul><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;"></span><br />
<h2 class="module_title " style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: large; line-height: 21px;"><i>working:</i></span></h2><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;">As soon as the power supply is provided to the microcontroller "password based" will be shown on the screen.This will remain for a second and after that "enter password" will be displayed as shown below.</span></div><div><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;"><br />
</span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgISFuFCUCQ6rMNUCKpYgbkOGmaEitX5ntpdRuohk4H1UHk0uEJlJ_GPNxlHPctfc3jkgk_Bbp-Pekce-5y2KKJihdAhluwjX2oz3NVR-qhMPDZkcebH8ieJdra0cIZMJD4A3NNg9wclq0/s1600/entpass.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="187" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgISFuFCUCQ6rMNUCKpYgbkOGmaEitX5ntpdRuohk4H1UHk0uEJlJ_GPNxlHPctfc3jkgk_Bbp-Pekce-5y2KKJihdAhluwjX2oz3NVR-qhMPDZkcebH8ieJdra0cIZMJD4A3NNg9wclq0/s320/entpass.JPG" width="320" /></a></div><div><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;"><br />
</span></div><div><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;"><br />
</span></div><div><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;">The "ENTER PASSWORD " statement will remain for a second and then it will vanish.At this point you will have to enter password which will be shown in terms asterisk " **** ". </span></div><div><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;"><br />
</span></div><div><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;"><br />
</span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKBC0ezsDHt5L4Ln68so6Ux8r_03ai5WNhz3bbjEtNEWTotz0In2gtDUSBGel_j65AfuoISGrM1S6ZaDUejz9qz1IwDTDRs3fQeKQyQBlT_Z_oIZ0amGsw1ekdRNPz90dpsoqpB1Saeu0/s1600/str.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="191" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKBC0ezsDHt5L4Ln68so6Ux8r_03ai5WNhz3bbjEtNEWTotz0In2gtDUSBGel_j65AfuoISGrM1S6ZaDUejz9qz1IwDTDRs3fQeKQyQBlT_Z_oIZ0amGsw1ekdRNPz90dpsoqpB1Saeu0/s320/str.JPG" width="320" /></a></div><div><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;"><br />
</span></div><div><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;"><br />
</span></div><div><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;"><br />
</span></div><div><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;">The coding of the micro-controller is done such that only four numbers can be used to enter password. If you want to increase the length of the password you can do that by adding loops in the coding which will be dealt later. Here, in this project the password is set as 1234. when this password is entered the LCD will display "correct password" as shown below and the LED will turn on which is connected at port 1. you can set your own password by changing the password in the code.<br />
<br />
If you want to set your password using the operators like " + ", " -" etc you can do it by setting the password in the code as follows:</span></div><div><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;"><br />
</span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIMT2Vf_XyT2RrEyhciqGth8zgsdCHe1E4Ua5QXgS2FkiPjZoDosjJH-jzHHg6-xxamhwK66h5dqF-9j3c0cOsNqtE1Yrkfb2JT2RajDlY0uMGJKdwORoRMJ8pW24IszjL-q9C8kNGrFQ/s1600/crtpass.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="181" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIMT2Vf_XyT2RrEyhciqGth8zgsdCHe1E4Ua5QXgS2FkiPjZoDosjJH-jzHHg6-xxamhwK66h5dqF-9j3c0cOsNqtE1Yrkfb2JT2RajDlY0uMGJKdwORoRMJ8pW24IszjL-q9C8kNGrFQ/s320/crtpass.JPG" width="320" /></a></div><div class="separator" style="clear: both; text-align: center;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><br />
</div><div><ul class="textlist_ul" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-top: 0px; padding-bottom: 14px; padding-top: 0px;"><li style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 1em; line-height: 1.5em; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">for " ON/C " =16</li>
<li style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 1em; line-height: 1.5em; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">for " + " =10</li>
<li style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 1em; line-height: 1.5em; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">for " - " =14</li>
<li style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 1em; line-height: 1.5em; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">for " = " =15</li>
<li style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 1em; line-height: 1.5em; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">for " x " =11</li>
<li style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 1em; line-height: 1.5em; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">for " รท " =13</li>
</ul><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;"></span><br />
<h2 class="module_title " style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: large; line-height: 21px;"><i>programming:</i></span></h2><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;">The programming of the microcontroller is done using keil compiler.The codings for this project is explained below:</span></div><div><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;"><br />
</span></div><div><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;"><br />
</span></div></div><br />
<div style="border-width: 1px; border: solid blue; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">#include "REGX51.H"</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">#include "delay.h" /*the header file of delay is added*/</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">#include "lcd.h" /*the header file of LCD is added*/</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">#include "keypad.h" /*the header file of keypad is added*/</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">#define relay P1_7;</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">void main()</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">{</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">int first_key,second_key,third_key,fourth_key;</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">P1=0X00; /*port 1 is defined as the output port*/</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">P2=0x00; /*port 2 is defined as the output port*/</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">P3=0xff; /*port 3 is defined as the input port*/</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">LCD_INIT();/* the LCD display is initialized */</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">LCD_STRING("PASSWORD BASED");/*displays PASSWORD BASED on the lcd*/</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">delay_sec(1); /* provides a delay of 1 second */</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">LCD_CMD(PUTLINE2);</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">LCD_STRING("LOCKING SYSTEM");</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">LCD_CLEAR(); /*clears the LCD display*/</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">LCD_STRING("ENTER PASSWORD:");</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">delay_sec(1);</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">LCD_CLEAR();</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">while(key_get()==NOKEY);</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">first_key=key;</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">LCD_STRING("*"); /*when any key is pressed display it as " * " */</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">while(key_get()==NOKEY);</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">second_key=key;</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">LCD_STRING("*");</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">while(key_get()==NOKEY);</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">third_key=key;</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">LCD_STRING("*");</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">while(key_get()==NOKEY);</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">fourth_key=key;</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">LCD_STRING("*"); /* by adding another while loop you can further increase the length of your password */</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">while(1)</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">{</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">if((first_key==1)&&(second_key==2)&&(third_key==3)&&(fourth_key==4))/*here, the password set is 1234. you can change the password over here.if you have increased your password length see that you also make changes in the If loop over here i.e by adding further &&fifth_key=....&& sixth_.. and so on */</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">{</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">LCD_CLEAR();</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">LCD_STRING("Correct Password");</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">P1_2=1; /* if correct password is entered make P1_2 high which will turn on the led */</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">delay_sec(2);</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">}</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">else</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">{</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">LCD_CLEAR();</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">LCD_STRING("Incorrect Password");</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">delay_sec(2);</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">}</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">} }</div><br />
<br />
<br />
<span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;"></span><br />
<h2 class="module_title " style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.71em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h2><h2 class="module_title " style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.71em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h2><h2 class="module_title " style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.71em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h2><h2 class="module_title " style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.71em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h2><h2 class="module_title " style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.71em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h2><h2 class="module_title " style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.71em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h2><h2 class="module_title " style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.71em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h2><h2 class="module_title " style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.71em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h2><h2 class="module_title " style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.71em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h2><h2 class="module_title " style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.71em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h2><h2 class="module_title " style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.71em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h2><h2 class="module_title " style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.71em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h2><h2 class="module_title " style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.71em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h2><h2 class="module_title " style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.71em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h2><h2 class="module_title " style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.71em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h2><h2 class="module_title " style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.71em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h2><h2 class="module_title " style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.71em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h2><h2 class="module_title " style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.71em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h2><h2 class="module_title " style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.71em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h2><h2 class="module_title " style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.71em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h2><h2 class="module_title " style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.71em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h2><h2 class="module_title " style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.71em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h2><h2 class="module_title " style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.71em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h2><h2 class="module_title " style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.71em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h2><h2 class="module_title " style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.71em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h2><h2 class="module_title " style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.71em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h2><h2 class="module_title " style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.71em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h2><h2 class="module_title " style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.71em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h2><h2 class="module_title " style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.71em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h2><h2 class="module_title " style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.71em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h2><h2 class="module_title " style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.71em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h2><h2 class="module_title " style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.71em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h2><h2 class="module_title " style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.71em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h2><h2 class="module_title " style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.71em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h2><h2 class="module_title " style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.71em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h2><h2 class="module_title " style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.71em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h2><h2 class="module_title " style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.71em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h2><h2 class="module_title " style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.71em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h2><h2 class="module_title " style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.71em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h2><h2 class="module_title " style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.71em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h2><h2 class="module_title " style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.71em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h2><h2 class="module_title " style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.71em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h2><h2 class="module_title " style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.71em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i>download files</i></h2><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;">You can download all the hex file, schematic diagram and codes over here:</span><br />
<span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;"><br />
</span><br />
<span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-weight: bold; line-height: 21px;"><a href="https://docs.google.com/leaf?id=0BzHQORJ0UNZyMTY1YmJmZjQtMDViMS00NzIyLWJjZjQtOWNjZWZlNTJjZjJl&hl=en&authkey=CPX3p54F">schematic diagram</a></span><br />
<span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-weight: bold; line-height: 21px;"><br />
</span><br />
<span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-weight: bold; line-height: 21px;"><a href="https://docs.google.com/leaf?id=0BzHQORJ0UNZyOWI4ZTg0ZjAtYjRlOC00M2ZjLWEwZjMtMTliMjU0NmNhZWNj&hl=en&authkey=CPP58NIE">codes</a></span><br />
<span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-weight: bold; line-height: 21px;"><br />
</span><br />
<span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-weight: bold; line-height: 21px;"><a href="https://docs.google.com/leaf?id=0BzHQORJ0UNZyNTQzNzcyMzgtODhkYS00NWE1LTk1YjktNzA0NjRkZTUyNzgx&hl=en&authkey=CJ3PmZIB">the .hex file</a></span><br />
<br />
<span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;">Instead of LED you can use any other application like motor which works using a relay or a buzzer and you can go on with many other application. If you have any questions with regards to the project or would like to improve this project further please feel free to comment.</span></div>stevehttp://www.blogger.com/profile/09905558157086670938noreply@blogger.com9tag:blogger.com,1999:blog-6118597906483996075.post-20270450013693134382011-07-23T06:47:00.000-07:002011-07-23T06:47:02.548-07:00Digital Clock Using Microcontroller 89C52/89S52<div dir="ltr" style="text-align: left;" trbidi="on"><div dir="ltr" style="text-align: left;" trbidi="on"><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBSi6WmBrOmBexWIprGnZbmrxlPTNVsjHGFvoQJJ6Z3TEMlwgtL-dhN-HkJpTox0wWcfZzFbFv1hK7igrp3S2bJ1Ksu2OPbdEhJZMbm2F6Su5NZkRYrVbxmOqCfkZK2eJ9fkAf19DAjtg/s1600/digital+clock.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="189" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBSi6WmBrOmBexWIprGnZbmrxlPTNVsjHGFvoQJJ6Z3TEMlwgtL-dhN-HkJpTox0wWcfZzFbFv1hK7igrp3S2bJ1Ksu2OPbdEhJZMbm2F6Su5NZkRYrVbxmOqCfkZK2eJ9fkAf19DAjtg/s320/digital+clock.JPG" width="320" /></a></div><br />
<br />
<span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;"></span><br />
<div class="module" id="lensDescription" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 30px; position: static; vertical-align: baseline;"><div class="module" id="lensDescriptionBody" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; position: static; vertical-align: baseline;"><div class="viewing" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><div class="clear" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><div id="lens_abstract_value" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 14px; line-height: 1.5em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">Are you a beginner in micro controller projects?and are you stuck where to start from?if yes,then this is one of the simplest mini projects that you can start from . This mini project will give you a clear understanding of programming your micro controller. we sometimes look at our watch and wonder " how does this thing work". Well, in this digital clock project, you will gain some insight on how micro controller can be used to make it work as a Digital Clock.</div></div></div></div></div><div id="contentModules" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><div class="module textlistmodule" id="module151086948" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 30px; position: static; vertical-align: baseline;"><div class="errors" id="module151086948Errors" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"></div><div class="editor_title" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"></div></div></div><h2 class="module_title " style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #555555; font-family: Georgia, 'Times New Roman', serif; font-size: 1.71em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i>Components required:</i></h2><div><ul style="text-align: left;"><li><i><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; line-height: 21px;">1 microcontroller 89C52(89S52 will also do)</span></i></li>
<li><i><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; line-height: 21px;">2 ceramic capacitors-22pF</span></i></li>
<li><i><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; line-height: 21px;">1 switch(button for reset purpose)</span></i></li>
<li><i><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; line-height: 21px;">1 electrolytic capacitor-10uF,25V</span></i></li>
<li><i><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; line-height: 21px;">1 crystal oscillator-11.0592MHz</span></i></li>
<li><i><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; line-height: 21px;">16x2 LCD display</span></i></li>
<li><i><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; line-height: 21px;">1 resistor-10k</span></i></li>
</ul><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif;"><span class="Apple-style-span" style="font-size: 14px; line-height: 21px;"></span></span><br />
<div><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif;"><span class="Apple-style-span" style="font-size: 14px; line-height: 21px;"><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif;"><span class="Apple-style-span" style="font-size: 14px; line-height: 21px;"><br />
</span></span></span></span></div><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;"><h2 class="module_title " style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.71em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i>Circuit diagram</i></h2><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwuHRvs0Igr8eqo5Vjz8ZWx1O89vb5vCxY-ENa1K4Zk9kkoA6WSiNcbSgJ0N8h6eDl-ipacTnMxmYvvMX7rEcCXjNti2ac9i2ld_pPmyetgkPHdnvn8oE4JnLRLktB1NUCmdZbRdYLsqQ/s1600/schematic+diagram.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="298" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwuHRvs0Igr8eqo5Vjz8ZWx1O89vb5vCxY-ENa1K4Zk9kkoA6WSiNcbSgJ0N8h6eDl-ipacTnMxmYvvMX7rEcCXjNti2ac9i2ld_pPmyetgkPHdnvn8oE4JnLRLktB1NUCmdZbRdYLsqQ/s400/schematic+diagram.JPG" width="400" /></a></div><div><i><br />
</i></div></span><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;"><h2 class="module_title " style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.71em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i>Software you will need</i></h2></span><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;">This project has been done in proteus software.If you are new to proteus software, the tutorials given below may get you started with the software.</span><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;">note:if you are familiar with proteus you can skip this part.</span></div><div><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif;"><span class="Apple-style-span" style="font-size: 14px; line-height: 21px;"><br />
</span></span></div><div><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif;"><span class="Apple-style-span" style="font-size: 14px; line-height: 21px;"><a href="http://allaboutlearningandearning.blogspot.com/2011/07/proteus-tutorial.html">Click here to get started with Proteus tutorial</a></span></span></div><div><div><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif;"><span class="Apple-style-span" style="font-size: 14px; line-height: 21px;"><br />
</span></span></div></div><div><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;">The programming of the microcontroller is done using keil compiler.port 2 of 89C52 is used as the output port.whereas port 1 is used as the input port.when P1_4 is grounded the 12 hr mode is activated and when P1_5 is grounded the 24 hr mode is activated.In the schematic diagram P1_5 is grounded so the 24hr mode is activated.it is as shown below</span></div><div><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;"><br />
</span></div><div><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;"><br />
</span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhofdFG3iH7ta-kPOlNxTQfuV2rlJijRp6Ar9eNrA9qQ_b2qoeH_NxDW4EwB3u6K8sEFPcGG_piD7sKOE0so5eXuNegsES7Hy9XO8pKjSry79mxiLmy3sIEBFacykEvJmLee5Eeof_XVR0/s1600/digtal+clock+24hrs.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhofdFG3iH7ta-kPOlNxTQfuV2rlJijRp6Ar9eNrA9qQ_b2qoeH_NxDW4EwB3u6K8sEFPcGG_piD7sKOE0so5eXuNegsES7Hy9XO8pKjSry79mxiLmy3sIEBFacykEvJmLee5Eeof_XVR0/s400/digtal+clock+24hrs.JPG" width="400" /></a></div><div><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;"></span><br />
<h2 class="module_title nopad" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.71em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px !important; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;"><i>Code:</i></span></h2><div><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;"><i><br />
</i></span></div><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;"><h3 class="module_subtitle" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.29em; font-weight: normal; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i>The detail explanation of the code is done below:</i></h3><div><i><br />
</i></div></span></div><div><span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif;"><span class="Apple-style-span" style="font-size: 14px; line-height: 21px;"><br />
</span></span></div></div><br />
<br />
<div style="border-width: 1px; border: solid blue; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">#include "REGX52.H"</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">#include "delay.h"</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">#include "lcd.h"</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">void main(void)</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">{</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">int hr=0; /*initiate hour=0 */</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">int min=0; /*initiate minutes=0 */</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">int sec=0; /*initiate seconds=0 */</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">P1=0xff; /*set port 1 as input port */</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">P2=0x00; /*set port 2 as output port*/</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">while(1)</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">{ LCD_INIT(); /*initialize LCD*/</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">if (P1_4==0)/*if P1_4 is grounded enter the 12hr loop */</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">{</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">for (sec=0;sec<60;sec )</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">{</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">LCD_DisplayNum(hr,2);</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">LCD_STRING(":");</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">LCD_DisplayNum(min,2);</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">LCD_STRING(":");</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">LCD_DisplayNum(sec,2);</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">LCD_STRING(" (12 HR)");</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">delay_sec(1);</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">LCD_CLEAR();</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">if (sec==59)</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">{</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">min=min 1;</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">if(min==60)</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">{</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">if(hr==11&&min==60&&sec==59)</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">{hr=0;min=0;sec=0;}</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">else</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">{ hr=hr 1;</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">min=0;}</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">}</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">}</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">} }</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">else</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">{</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">if(P1_5==0) /*if P1_5 is grounded enter the 24hr loop */</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">{</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">for (sec=0;sec<60;sec )</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">{</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">LCD_DisplayNum(hr,2);</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">LCD_STRING(":");</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">LCD_DisplayNum(min,2);</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">LCD_STRING(":");</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">LCD_DisplayNum(sec,2);</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">LCD_STRING(" (24 HR)");</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">delay_sec(1);</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">LCD_CLEAR();</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">if (sec==59)</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">{</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">min=min 1;</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">if(min==60)</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">{</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">if(hr==23&&min==60&&sec==59)</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">{hr=0;min=0;sec=0;}</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">else</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">{ hr=hr 1;</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">min=0;}</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">}</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">}</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">} }}</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">LCD_INIT();</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">}</div><div style="border-width: 1px; border: solid blue; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">}</div><br />
<br />
<br />
<br />
<span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;"></span><br />
<h3 class="module_subtitle" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.29em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h3><h3 class="module_subtitle" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.29em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h3><h3 class="module_subtitle" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.29em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h3><h3 class="module_subtitle" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.29em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h3><h3 class="module_subtitle" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.29em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h3><h3 class="module_subtitle" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.29em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h3><h3 class="module_subtitle" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.29em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h3><h3 class="module_subtitle" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.29em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h3><h3 class="module_subtitle" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.29em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h3><h3 class="module_subtitle" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.29em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h3><h3 class="module_subtitle" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.29em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h3><h3 class="module_subtitle" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.29em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h3><h3 class="module_subtitle" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.29em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h3><h3 class="module_subtitle" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.29em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h3><h3 class="module_subtitle" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.29em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h3><h3 class="module_subtitle" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.29em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h3><h3 class="module_subtitle" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.29em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h3><h3 class="module_subtitle" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.29em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h3><h3 class="module_subtitle" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.29em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h3><h3 class="module_subtitle" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.29em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h3><h3 class="module_subtitle" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.29em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h3><h3 class="module_subtitle" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.29em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h3><h3 class="module_subtitle" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.29em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h3><h3 class="module_subtitle" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.29em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h3><h3 class="module_subtitle" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.29em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h3><h3 class="module_subtitle" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.29em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h3><h3 class="module_subtitle" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.29em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h3><h3 class="module_subtitle" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.29em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h3><h3 class="module_subtitle" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.29em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h3><h3 class="module_subtitle" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.29em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h3><h3 class="module_subtitle" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.29em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h3><h3 class="module_subtitle" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.29em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h3><h3 class="module_subtitle" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.29em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h3><h3 class="module_subtitle" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.29em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h3><h3 class="module_subtitle" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.29em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h3><h3 class="module_subtitle" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.29em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h3><h3 class="module_subtitle" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.29em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h3><h3 class="module_subtitle" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.29em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h3><h3 class="module_subtitle" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.29em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h3><h3 class="module_subtitle" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.29em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h3><h3 class="module_subtitle" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.29em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h3><h3 class="module_subtitle" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.29em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h3><h3 class="module_subtitle" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.29em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h3><h3 class="module_subtitle" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.29em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h3><h3 class="module_subtitle" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.29em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h3><h3 class="module_subtitle" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.29em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h3><h3 class="module_subtitle" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.29em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h3><h3 class="module_subtitle" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.29em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h3><h3 class="module_subtitle" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.29em; line-height: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><i><br />
</i></h3><span class="Apple-style-span" style="color: #555555; font-family: Georgia, 'Times New Roman', serif; font-size: 18px; font-weight: bold; line-height: 21px;"><i><span class="Apple-style-span" style="color: #555555; font-family: Georgia, 'Times New Roman', serif; font-size: 18px; font-weight: bold; line-height: 21px;"><i><br />
</i></span><br />
<span class="Apple-style-span" style="color: #555555; font-family: Georgia, 'Times New Roman', serif; font-size: 18px; font-weight: bold; line-height: 21px;"><i><br />
</i></span><br />
you can download the .hex file here</i></span><br />
<span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;"><a href="https://docs.google.com/leaf?id=0BzHQORJ0UNZyMzJhMzQzMzQtYTE3Yi00ZTFjLWJkZWItY2IwN2IzYjEzMWZm&hl=en&authkey=CI_R9aQL">schematic diagram</a></span><br />
<span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-weight: bold; line-height: 21px;"><a href="https://docs.google.com/leaf?id=0BzHQORJ0UNZyMjkzNmRmZDEtYzI4My00ZjkxLTljMDQtYzYyNDE5ZGYyZjFk&hl=en&authkey=CIyyqcQK">main.c</a></span><br />
<span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;"><a href="https://docs.google.com/leaf?id=0BzHQORJ0UNZyZWQ2MDY5OTAtOGM1MC00Y2M4LTg3ODEtNmFmMDQwZDYyNWYx&hl=en&authkey=COOfjMwI">digclk.hex</a></span><br />
<br />
<br />
<span class="Apple-style-span" style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;">you can add more functions to this digital clock since 2 ports of 89C52 are still unused.For instance, you can connect a buzzer to port 4 such that the buzzer sounds at a specified time or you can connect a keypad to port 0 such you can set the timings externally.<br />
<br />
Please comment if you would further like to improve the project.</span></div>stevehttp://www.blogger.com/profile/09905558157086670938noreply@blogger.com6tag:blogger.com,1999:blog-6118597906483996075.post-17982042644354288112011-07-22T11:56:00.000-07:002011-07-22T12:24:58.395-07:00Interfacing Of a Buzzer Using Microcontroller 89C52/89S52<div dir="ltr" style="text-align: left;" trbidi="on"><div dir="ltr" style="text-align: left;" trbidi="on"><div dir="ltr" style="text-align: left;" trbidi="on"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPtWWob9F0YXcp7jyzQEqbPzI2HDHTQ0_qoZzAx-coALorIeaQSnXMVWkN8U4p_afwQL1XPstMifhH_feiTNlmNpPLTKJoCSHhrjJxd_fwPha5_o3Po4zaT2ym2IC-iAcZjvV5DTOjuHs/s1600/Buzzer.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="276" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPtWWob9F0YXcp7jyzQEqbPzI2HDHTQ0_qoZzAx-coALorIeaQSnXMVWkN8U4p_afwQL1XPstMifhH_feiTNlmNpPLTKJoCSHhrjJxd_fwPha5_o3Po4zaT2ym2IC-iAcZjvV5DTOjuHs/s400/Buzzer.JPG" width="400" /></a></div><br />
Welcome back embedded system geeks! In this article we are going to learn about the interfacing of a Buzzer with the microcontroller. But if this is your first mini-project you should probably check-out my previous article on Blinking LED'S for more understanding of the programming I will be dealing with this project. Once you get to know what Buzzer is and the programming logic behind connecting a Buzzer and a microcontroller you will able to apply the same logic to any microcontroller (i.e. your microcontroller may be a PIC or an AVR microcontroller). At the end of the explanation of the code there are some questions for you to answer which can help you to improve your programming skills.<br />
<br />
<br />
<h2 class="module_title "><i>why do we need a Buzzer?</i> </h2><div>Buzzer is used many times in embedded systems. For an instance-Digital clock with an alarm-here buzzer can be used an alarm or a fire alarm or an intruder alarm. There are so many uses.</div><h2 class="module_title "></h2><h2 class="module_title "><span class="Apple-style-span"><span class="Apple-style-span" style="font-size: large;"><i>Components required</i></span></span></h2><div style="text-align: left;"><ul style="text-align: left;"><li> 1 microcontroller 89C52(89S52 will also do) </li>
<li> 1 potentiometer-10k </li>
<li> 2 ceramic capacitors-22pF </li>
<li> 1 switch(button for reset purpose) </li>
<li> 1 electrolytic capacitor-10uF,25V </li>
<li> 1 crystal oscillator-11.0592MHz </li>
<li> 1 resistor-10k </li>
<li> 5 LED's </li>
<li> 1 resistor-1k </li>
<li> 5 330 ohm resistor </li>
<li> 1 Buzzer </li>
<li> 1 transistor-BC548</li>
</ul><h2 class="module_title "><i><span class="Apple-style-span" style="font-size: large;"><br />
</span></i></h2><h2 class="module_title "><i><span class="Apple-style-span" style="font-size: large;">Schematic Diagram </span></i></h2><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLFhJv-yOBX1Eh6ZsOpblqGX2VlYFmLbwYi1qSfbdeqsh3R752HrGkNvRwc_XBj6tkzYMy4diV_clbpAro7ucRmjVhsDNFGh1Og6FqZB2pQq-oyxUSwp0NQLWf6DOwWyr7OD0zMF4uNro/s1600/Buzzer+Schematic.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="262" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLFhJv-yOBX1Eh6ZsOpblqGX2VlYFmLbwYi1qSfbdeqsh3R752HrGkNvRwc_XBj6tkzYMy4diV_clbpAro7ucRmjVhsDNFGh1Og6FqZB2pQq-oyxUSwp0NQLWf6DOwWyr7OD0zMF4uNro/s400/Buzzer+Schematic.JPG" width="400" /></a></div><div><br />
</div></div><h2 class="module_title "> </h2><div>This project has been made using Proteus software.If you want to learn more about the software you can watch the tutorials provided below<br />
<br />
</div><div><a href="http://allaboutlearningandearning.blogspot.com/2011/07/proteus-tutorial.html">Please click here to get started with Proteus</a><br />
<br />
<br />
</div><h2 class="module_title "> <i>The connection of the circuit is explained below</i></h2><div style="text-align: left;"><ul style="text-align: left;"><li> Port 2 of the microcontroller is defined as the output port </li>
<li> Port 3 of the microntroller is defined as the output port </li>
<li> 4 LED's are connected to the four pins of the output port 2 from P2.0 TO P2.3 respectively </li>
<li> An LED is connected to the pin 3 of the output port 3 of the microcontroller </li>
<li> A Buzzer is connected to the pin 8 of the output port 3 </li>
<li> Other components connected to the microcontroller are for the working of the microcontroller. </li>
</ul> </div><div style="text-align: left;"><h2 class="module_title "><i>Working </i> </h2></div><div style="text-align: left;"> </div><div style="text-align: left;">The working of the circuit is shown with an application of a decade counter. As soon as the microcontroller receives a power supply, the counter will start counting. An image of the counter is shown below<br />
<h2 class="module_title "><br />
</h2></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRrG7SQOMijzO6W2rPjWroazCXFJT_OrkQrljN2_eRTbcg1_W4sOI7kjaUvMjyPi1e6Y4EOJOVjCqj13ntZlyd06r4maD8EQZOmH4clBOcZzN-U6eKSDZfmEED4SuYeIJ0R_8VBEnc7p8/s1600/counter.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="245" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRrG7SQOMijzO6W2rPjWroazCXFJT_OrkQrljN2_eRTbcg1_W4sOI7kjaUvMjyPi1e6Y4EOJOVjCqj13ntZlyd06r4maD8EQZOmH4clBOcZzN-U6eKSDZfmEED4SuYeIJ0R_8VBEnc7p8/s320/counter.JPG" width="320" /></a></div><h2 class="module_title "> </h2><h2 class="module_title "> </h2><div>The Decade counter will count from 0 to 9 and when the counter counts 9, the buzzer will be switched ON.The transistor connected to the buzzer acts as a switch.The programming of the microcontroller is explained below:<br />
<br />
<div dir="ltr" style="text-align: left;" trbidi="on"><div style="border-bottom-color: rgb(165, 42, 42); border-bottom-style: solid; border-left-color: rgb(165, 42, 42); border-left-style: solid; border-right-color: rgb(165, 42, 42); border-right-style: solid; border-top-color: rgb(165, 42, 42); border-top-style: solid; border-width: initial; float: left; margin-bottom: -1px; margin-left: 0px; margin-right: -1px; margin-top: 0px; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px; width: 288px;"><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">#include "REGX52.H"</div></div><div style="border-bottom-color: rgb(165, 42, 42); border-bottom-style: solid; border-left-color: rgb(165, 42, 42); border-left-style: solid; border-right-color: rgb(165, 42, 42); border-right-style: solid; border-top-color: rgb(165, 42, 42); border-top-style: solid; border-width: initial; clear: left; float: left; margin-bottom: -1px; margin-left: 0px; margin-right: -1px; margin-top: 0px; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px; width: 288px;"><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">#include "delay.h" /*delay header file is included*/</div></div><div style="border-bottom-color: rgb(165, 42, 42); border-bottom-style: solid; border-left-color: rgb(165, 42, 42); border-left-style: solid; border-right-color: rgb(165, 42, 42); border-right-style: solid; border-top-color: rgb(165, 42, 42); border-top-style: solid; border-width: initial; clear: left; float: left; margin-bottom: -1px; margin-left: 0px; margin-right: -1px; margin-top: 0px; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px; width: 288px;"><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">void main()</div></div><div style="border-bottom-color: rgb(165, 42, 42); border-bottom-style: solid; border-left-color: rgb(165, 42, 42); border-left-style: solid; border-right-color: rgb(165, 42, 42); border-right-style: solid; border-top-color: rgb(165, 42, 42); border-top-style: solid; border-width: initial; clear: left; float: left; margin-bottom: -1px; margin-left: 0px; margin-right: -1px; margin-top: 0px; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px; width: 288px;"><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">{</div></div><div style="border-bottom-color: rgb(165, 42, 42); border-bottom-style: solid; border-left-color: rgb(165, 42, 42); border-left-style: solid; border-right-color: rgb(165, 42, 42); border-right-style: solid; border-top-color: rgb(165, 42, 42); border-top-style: solid; border-width: initial; clear: left; float: left; margin-bottom: -1px; margin-left: 0px; margin-right: -1px; margin-top: 0px; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px; width: 288px;"><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">P2=0X00;/*port 2 is defined as output port*/</div></div><div style="border-bottom-color: rgb(165, 42, 42); border-bottom-style: solid; border-left-color: rgb(165, 42, 42); border-left-style: solid; border-right-color: rgb(165, 42, 42); border-right-style: solid; border-top-color: rgb(165, 42, 42); border-top-style: solid; border-width: initial; clear: left; float: left; margin-bottom: -1px; margin-left: 0px; margin-right: -1px; margin-top: 0px; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px; width: 288px;"><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">P3=0XFF;/*port 3 is defined as output as port*/</div></div><div style="border-bottom-color: rgb(165, 42, 42); border-bottom-style: solid; border-left-color: rgb(165, 42, 42); border-left-style: solid; border-right-color: rgb(165, 42, 42); border-right-style: solid; border-top-color: rgb(165, 42, 42); border-top-style: solid; border-width: initial; clear: left; float: left; margin-bottom: -1px; margin-left: 0px; margin-right: -1px; margin-top: 0px; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px; width: 288px;"><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">while(1)</div></div><div style="border-bottom-color: rgb(165, 42, 42); border-bottom-style: solid; border-left-color: rgb(165, 42, 42); border-left-style: solid; border-right-color: rgb(165, 42, 42); border-right-style: solid; border-top-color: rgb(165, 42, 42); border-top-style: solid; border-width: initial; clear: left; float: left; margin-bottom: -1px; margin-left: 0px; margin-right: -1px; margin-top: 0px; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px; width: 288px;"><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">{ P3_2=0; /*set pin 3 of port 2 to logic 0 */</div></div><div style="border-bottom-color: rgb(165, 42, 42); border-bottom-style: solid; border-left-color: rgb(165, 42, 42); border-left-style: solid; border-right-color: rgb(165, 42, 42); border-right-style: solid; border-top-color: rgb(165, 42, 42); border-top-style: solid; border-width: initial; clear: left; float: left; margin-bottom: -1px; margin-left: 0px; margin-right: -1px; margin-top: 0px; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px; width: 288px;"><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">P3_7=0; /*set pin 8 of port 2 to logic 0 */</div></div><div style="border-bottom-color: rgb(165, 42, 42); border-bottom-style: solid; border-left-color: rgb(165, 42, 42); border-left-style: solid; border-right-color: rgb(165, 42, 42); border-right-style: solid; border-top-color: rgb(165, 42, 42); border-top-style: solid; border-width: initial; clear: left; float: left; margin-bottom: -1px; margin-left: 0px; margin-right: -1px; margin-top: 0px; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px; width: 288px;"><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">P2=0X00; /*code for the decade counter begins here*/</div></div><div style="border-bottom-color: rgb(165, 42, 42); border-bottom-style: solid; border-left-color: rgb(165, 42, 42); border-left-style: solid; border-right-color: rgb(165, 42, 42); border-right-style: solid; border-top-color: rgb(165, 42, 42); border-top-style: solid; border-width: initial; clear: left; float: left; margin-bottom: -1px; margin-left: 0px; margin-right: -1px; margin-top: 0px; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px; width: 288px;"><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">delay_sec(1);</div></div><div style="border-bottom-color: rgb(165, 42, 42); border-bottom-style: solid; border-left-color: rgb(165, 42, 42); border-left-style: solid; border-right-color: rgb(165, 42, 42); border-right-style: solid; border-top-color: rgb(165, 42, 42); border-top-style: solid; border-width: initial; clear: left; float: left; margin-bottom: -1px; margin-left: 0px; margin-right: -1px; margin-top: 0px; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px; width: 288px;"><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">P2=0X01;</div></div><div style="border-bottom-color: rgb(165, 42, 42); border-bottom-style: solid; border-left-color: rgb(165, 42, 42); border-left-style: solid; border-right-color: rgb(165, 42, 42); border-right-style: solid; border-top-color: rgb(165, 42, 42); border-top-style: solid; border-width: initial; clear: left; float: left; margin-bottom: -1px; margin-left: 0px; margin-right: -1px; margin-top: 0px; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px; width: 288px;"><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">delay_sec(1);</div></div><div style="border-bottom-color: rgb(165, 42, 42); border-bottom-style: solid; border-left-color: rgb(165, 42, 42); border-left-style: solid; border-right-color: rgb(165, 42, 42); border-right-style: solid; border-top-color: rgb(165, 42, 42); border-top-style: solid; border-width: initial; clear: left; float: left; margin-bottom: -1px; margin-left: 0px; margin-right: -1px; margin-top: 0px; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px; width: 288px;"><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">P2=0X02;</div></div><div style="border-bottom-color: rgb(165, 42, 42); border-bottom-style: solid; border-left-color: rgb(165, 42, 42); border-left-style: solid; border-right-color: rgb(165, 42, 42); border-right-style: solid; border-top-color: rgb(165, 42, 42); border-top-style: solid; border-width: initial; clear: left; float: left; margin-bottom: -1px; margin-left: 0px; margin-right: -1px; margin-top: 0px; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px; width: 288px;"><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">delay_sec(1);</div></div><div style="border-bottom-color: rgb(165, 42, 42); border-bottom-style: solid; border-left-color: rgb(165, 42, 42); border-left-style: solid; border-right-color: rgb(165, 42, 42); border-right-style: solid; border-top-color: rgb(165, 42, 42); border-top-style: solid; border-width: initial; clear: left; float: left; margin-bottom: -1px; margin-left: 0px; margin-right: -1px; margin-top: 0px; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px; width: 288px;"><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">P2=0X03;</div></div><div style="border-bottom-color: rgb(165, 42, 42); border-bottom-style: solid; border-left-color: rgb(165, 42, 42); border-left-style: solid; border-right-color: rgb(165, 42, 42); border-right-style: solid; border-top-color: rgb(165, 42, 42); border-top-style: solid; border-width: initial; clear: left; float: left; margin-bottom: -1px; margin-left: 0px; margin-right: -1px; margin-top: 0px; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px; width: 288px;"><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">delay_sec(1);</div></div><div style="border-bottom-color: rgb(165, 42, 42); border-bottom-style: solid; border-left-color: rgb(165, 42, 42); border-left-style: solid; border-right-color: rgb(165, 42, 42); border-right-style: solid; border-top-color: rgb(165, 42, 42); border-top-style: solid; border-width: initial; clear: left; float: left; margin-bottom: -1px; margin-left: 0px; margin-right: -1px; margin-top: 0px; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px; width: 288px;"><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">P2=0X04;</div></div><div style="border-bottom-color: rgb(165, 42, 42); border-bottom-style: solid; border-left-color: rgb(165, 42, 42); border-left-style: solid; border-right-color: rgb(165, 42, 42); border-right-style: solid; border-top-color: rgb(165, 42, 42); border-top-style: solid; border-width: initial; clear: left; float: left; margin-bottom: -1px; margin-left: 0px; margin-right: -1px; margin-top: 0px; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px; width: 288px;"><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">delay_sec(1);</div></div><div style="border-bottom-color: rgb(165, 42, 42); border-bottom-style: solid; border-left-color: rgb(165, 42, 42); border-left-style: solid; border-right-color: rgb(165, 42, 42); border-right-style: solid; border-top-color: rgb(165, 42, 42); border-top-style: solid; border-width: initial; clear: left; float: left; margin-bottom: -1px; margin-left: 0px; margin-right: -1px; margin-top: 0px; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px; width: 288px;"><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">P2=0X05;</div></div><div style="border-bottom-color: rgb(165, 42, 42); border-bottom-style: solid; border-left-color: rgb(165, 42, 42); border-left-style: solid; border-right-color: rgb(165, 42, 42); border-right-style: solid; border-top-color: rgb(165, 42, 42); border-top-style: solid; border-width: initial; clear: left; float: left; margin-bottom: -1px; margin-left: 0px; margin-right: -1px; margin-top: 0px; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px; width: 288px;"><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">delay_sec(1);</div></div><div style="border-bottom-color: rgb(165, 42, 42); border-bottom-style: solid; border-left-color: rgb(165, 42, 42); border-left-style: solid; border-right-color: rgb(165, 42, 42); border-right-style: solid; border-top-color: rgb(165, 42, 42); border-top-style: solid; border-width: initial; clear: left; float: left; margin-bottom: -1px; margin-left: 0px; margin-right: -1px; margin-top: 0px; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px; width: 288px;"><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">P2=0X06;</div></div><div style="border-bottom-color: rgb(165, 42, 42); border-bottom-style: solid; border-left-color: rgb(165, 42, 42); border-left-style: solid; border-right-color: rgb(165, 42, 42); border-right-style: solid; border-top-color: rgb(165, 42, 42); border-top-style: solid; border-width: initial; clear: left; float: left; margin-bottom: -1px; margin-left: 0px; margin-right: -1px; margin-top: 0px; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px; width: 288px;"><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">delay_sec(1);</div></div><div style="border-bottom-color: rgb(165, 42, 42); border-bottom-style: solid; border-left-color: rgb(165, 42, 42); border-left-style: solid; border-right-color: rgb(165, 42, 42); border-right-style: solid; border-top-color: rgb(165, 42, 42); border-top-style: solid; border-width: initial; clear: left; float: left; margin-bottom: -1px; margin-left: 0px; margin-right: -1px; margin-top: 0px; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px; width: 288px;"><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">P2=0X07;</div></div><div style="border-bottom-color: rgb(165, 42, 42); border-bottom-style: solid; border-left-color: rgb(165, 42, 42); border-left-style: solid; border-right-color: rgb(165, 42, 42); border-right-style: solid; border-top-color: rgb(165, 42, 42); border-top-style: solid; border-width: initial; clear: left; float: left; margin-bottom: -1px; margin-left: 0px; margin-right: -1px; margin-top: 0px; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px; width: 288px;"><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">delay_sec(1);</div></div><div style="border-bottom-color: rgb(165, 42, 42); border-bottom-style: solid; border-left-color: rgb(165, 42, 42); border-left-style: solid; border-right-color: rgb(165, 42, 42); border-right-style: solid; border-top-color: rgb(165, 42, 42); border-top-style: solid; border-width: initial; clear: left; float: left; margin-bottom: -1px; margin-left: 0px; margin-right: -1px; margin-top: 0px; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px; width: 288px;"><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">P2=0X08;</div></div><div style="border-bottom-color: rgb(165, 42, 42); border-bottom-style: solid; border-left-color: rgb(165, 42, 42); border-left-style: solid; border-right-color: rgb(165, 42, 42); border-right-style: solid; border-top-color: rgb(165, 42, 42); border-top-style: solid; border-width: initial; clear: left; float: left; margin-bottom: -1px; margin-left: 0px; margin-right: -1px; margin-top: 0px; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px; width: 288px;"><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">delay_sec(1);</div></div><div style="border-bottom-color: rgb(165, 42, 42); border-bottom-style: solid; border-left-color: rgb(165, 42, 42); border-left-style: solid; border-right-color: rgb(165, 42, 42); border-right-style: solid; border-top-color: rgb(165, 42, 42); border-top-style: solid; border-width: initial; clear: left; float: left; margin-bottom: -1px; margin-left: 0px; margin-right: -1px; margin-top: 0px; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px; width: 288px;"><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">P2=0X09;</div></div><div style="border-bottom-color: rgb(165, 42, 42); border-bottom-style: solid; border-left-color: rgb(165, 42, 42); border-left-style: solid; border-right-color: rgb(165, 42, 42); border-right-style: solid; border-top-color: rgb(165, 42, 42); border-top-style: solid; border-width: initial; clear: left; float: left; margin-bottom: -1px; margin-left: 0px; margin-right: -1px; margin-top: 0px; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px; width: 288px;"><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">delay_sec(1); /* code for decade counter ends here*/</div></div><div style="border-bottom-color: rgb(165, 42, 42); border-bottom-style: solid; border-left-color: rgb(165, 42, 42); border-left-style: solid; border-right-color: rgb(165, 42, 42); border-right-style: solid; border-top-color: rgb(165, 42, 42); border-top-style: solid; border-width: initial; clear: left; float: left; margin-bottom: -1px; margin-left: 0px; margin-right: -1px; margin-top: 0px; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px; width: 288px;"><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">if(P2==0X09)</div></div><div style="border-bottom-color: rgb(165, 42, 42); border-bottom-style: solid; border-left-color: rgb(165, 42, 42); border-left-style: solid; border-right-color: rgb(165, 42, 42); border-right-style: solid; border-top-color: rgb(165, 42, 42); border-top-style: solid; border-width: initial; clear: left; float: left; margin-bottom: -1px; margin-left: 0px; margin-right: -1px; margin-top: 0px; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px; width: 288px;"><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">{ P3_2=1; /*LED is switched ON*/</div></div><div style="border-bottom-color: rgb(165, 42, 42); border-bottom-style: solid; border-left-color: rgb(165, 42, 42); border-left-style: solid; border-right-color: rgb(165, 42, 42); border-right-style: solid; border-top-color: rgb(165, 42, 42); border-top-style: solid; border-width: initial; clear: left; float: left; margin-bottom: -1px; margin-left: 0px; margin-right: -1px; margin-top: 0px; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px; width: 288px;"><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">P3_7=1; /*buzzer is switched ON*/</div></div><div style="border-bottom-color: rgb(165, 42, 42); border-bottom-style: solid; border-left-color: rgb(165, 42, 42); border-left-style: solid; border-right-color: rgb(165, 42, 42); border-right-style: solid; border-top-color: rgb(165, 42, 42); border-top-style: solid; border-width: initial; clear: left; float: left; margin-bottom: -1px; margin-left: 0px; margin-right: -1px; margin-top: 0px; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px; width: 288px;"><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">delay_sec(3); /*buzzer is switched ON for 3 seconds*/</div></div><div style="border-bottom-color: rgb(165, 42, 42); border-bottom-style: solid; border-left-color: rgb(165, 42, 42); border-left-style: solid; border-right-color: rgb(165, 42, 42); border-right-style: solid; border-top-color: rgb(165, 42, 42); border-top-style: solid; border-width: initial; clear: left; float: left; margin-bottom: -1px; margin-left: 0px; margin-right: -1px; margin-top: 0px; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px; width: 288px;"><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">P3_2=0; /*LED is switched OFF*/</div></div><div style="border-bottom-color: rgb(165, 42, 42); border-bottom-style: solid; border-left-color: rgb(165, 42, 42); border-left-style: solid; border-right-color: rgb(165, 42, 42); border-right-style: solid; border-top-color: rgb(165, 42, 42); border-top-style: solid; border-width: initial; clear: left; float: left; margin-bottom: -1px; margin-left: 0px; margin-right: -1px; margin-top: 0px; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px; width: 288px;"><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">P3_7=0; /*buzzer is switched OFF*/</div></div><div style="border-bottom-color: rgb(165, 42, 42); border-bottom-style: solid; border-left-color: rgb(165, 42, 42); border-left-style: solid; border-right-color: rgb(165, 42, 42); border-right-style: solid; border-top-color: rgb(165, 42, 42); border-top-style: solid; border-width: initial; clear: left; float: left; margin-bottom: -1px; margin-left: 0px; margin-right: -1px; margin-top: 0px; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px; width: 288px;"><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">}</div></div><div style="border-bottom-color: rgb(165, 42, 42); border-bottom-style: solid; border-left-color: rgb(165, 42, 42); border-left-style: solid; border-right-color: rgb(165, 42, 42); border-right-style: solid; border-top-color: rgb(165, 42, 42); border-top-style: solid; border-width: initial; clear: left; float: left; margin-bottom: -1px; margin-left: 0px; margin-right: -1px; margin-top: 0px; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px; width: 288px;"><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">}</div></div><div style="border-bottom-color: rgb(165, 42, 42); border-bottom-style: solid; border-left-color: rgb(165, 42, 42); border-left-style: solid; border-right-color: rgb(165, 42, 42); border-right-style: solid; border-top-color: rgb(165, 42, 42); border-top-style: solid; border-width: initial; clear: left; float: left; margin-bottom: -1px; margin-left: 0px; margin-right: -1px; margin-top: 0px; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px; width: 288px;"><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">}</div></div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br />
</div></div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br />
</div><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<h2 class="module_title "><i>Try this for Fun</i> </h2><div>Try to program your microcontroller in which the Buzzer is used as a musical device meaning your buzzer will output a musical tune .</div><div><br />
</div><div><h2 class="module_title "><i>Download files </i> </h2><h2 class="module_title "><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-weight: normal;"><a href="https://docs.google.com/leaf?id=0BzHQORJ0UNZyZDQ5NzEzMjQtZjgzYS00NmNiLTgxMzItYmJkNDQ0ZWJkM2Jm&hl=en_US&authkey=CIzs9rUO">schematic diagram</a></span></span></h2><div><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-weight: normal;"><a href="https://docs.google.com/leaf?id=0BzHQORJ0UNZyOWE3NzdhOTItY2E5My00MzY3LTk3MjEtNGY1MTc5MTg0MTg1&hl=en_US&authkey=CNvE3_YK">source code</a></span></span></div><div><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-weight: normal;"><br />
</span></span></div><div><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-weight: normal;"><a href="https://docs.google.com/leaf?id=0BzHQORJ0UNZyYWYxMGQzN2QtODllZS00ZDkzLTlmNzEtNzQ0NWRlZTliYjMw&hl=en_US&authkey=CIi5qy4">.hex file</a></span></span></div><div><span class="Apple-style-span" style="font-size: small;"><br />
</span></div><div><span class="Apple-style-span" style="font-size: small;"></span><br />
<h2 class="module_title "><span class="Apple-style-span" style="font-size: small;"><i>what do you feel about the article? </i> </span></h2><h2 class="module_title "><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-weight: normal;">Please comment if you have any doubts or want to improve the project further</span></span></span></h2><h2 class="module_title "><span class="Apple-style-span" style="font-size: small;"> </span></h2></div><h2 class="module_title "> </h2></div><br />
</div></div></div></div>stevehttp://www.blogger.com/profile/09905558157086670938noreply@blogger.com9tag:blogger.com,1999:blog-6118597906483996075.post-65021001347986270372011-07-22T10:48:00.000-07:002011-07-22T12:32:29.585-07:00Chasing LED's Using Microcontroller 89C52/89S52<div dir="ltr" style="text-align: left;" trbidi="on"><div dir="ltr" style="text-align: left;" trbidi="on"><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMOzONI76qZI8DQ98rVfzbmFm5X6XW3CUPatmeV15goczsWIKvaH1YWJI2JWzWd0joxzLurRKspoVLHg_0_wq7W2VoLwLDScSRxsxjGuMAsfvgbWXqsvjK2qcX9o8A3sS4SkruLVsV5Ao/s1600/intro+pic.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMOzONI76qZI8DQ98rVfzbmFm5X6XW3CUPatmeV15goczsWIKvaH1YWJI2JWzWd0joxzLurRKspoVLHg_0_wq7W2VoLwLDScSRxsxjGuMAsfvgbWXqsvjK2qcX9o8A3sS4SkruLVsV5Ao/s320/intro+pic.bmp" width="320" /></a></div><br />
This mini-project is especially meant for a newbie in Embedded Systems. This project will give you a clear idea of how to think and implement your code in practical life. In this article, we will cover the programming details for LED blinking and how you can code your microcontroller to show different patterns of LED blinking. After learning the logic for LED blinking you can code any microcontroller with the same logic.<br />
<br />
<br />
<h2 class="module_title "><i>Components</i></h2><ul class="textlist_ul"><li>1 microcontroller 89C52(89S52 will also do) </li>
<li> 1 potentiometer-10k </li>
<li> 2 ceramic capacitors-22pF </li>
<li> 1 switch(button for reset purpose) </li>
<li> 1 electrolytic capacitor-10uF,25V </li>
<li> 1 crystal oscillator-11.0592MHz </li>
<li> 1 resistor-10k </li>
<li> 8 LED's </li>
<li> 8 330 ohm resistor </li>
<li> 2 switches (SPST) </li>
</ul><h2 class="module_title "> <i>Schematic Diagram</i></h2><div><i><br />
</i></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiG5x6AVFToDssMrHOerdqT9XFyDDy2BeEi6PA-j4W4nwzf6BSm7YTi_t2u4M-fOJo1f33SQbQsb596ZTQGq_osYvRbr1nkxv3-5aaVfbLIAcB2PpybSuxa_IZaG2kyk2IZ75xLYU64NG8/s1600/schematic.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiG5x6AVFToDssMrHOerdqT9XFyDDy2BeEi6PA-j4W4nwzf6BSm7YTi_t2u4M-fOJo1f33SQbQsb596ZTQGq_osYvRbr1nkxv3-5aaVfbLIAcB2PpybSuxa_IZaG2kyk2IZ75xLYU64NG8/s400/schematic.JPG" width="400" /></a></div><h2 class="module_title "> </h2><div><br />
</div><div><br />
</div><div><br />
</div><div><br />
</div><div><br />
</div><div><br />
</div><div><br />
</div><div><br />
</div><div><br />
</div><div><h2 class="module_title "><i>Softwares Used:</i> </h2></div><div>This project is made with the help of Proteus software. If you are unaware of the software you can learn the basics by watching the video tutorial that I recommended in one of my articles.</div><div><a href="http://allaboutlearningandearning.blogspot.com/2011/07/proteus-tutorial.html">Click here for Proteus tutorial.</a></div><div><h2 class="module_title "><i><br />
</i></h2><h2 class="module_title "><i>The connection of the circuit is explained below:</i></h2><div><ul style="text-align: left;"><li> Port 1 of the microcontroller is used as the input Port </li>
<li> Port 2 of the microcontroller is used as the output Port </li>
<li> The LED's are connected to the output of Port 2 </li>
<li> Two switches are connected to the input of Port 1<br />
one switch is connected to the 5th pin of the Port 1 whereas the other switch is connected to the 8th pin of the Port 1 </li>
<li> Other components like the crystal and switch are used for the working of the microcontroller </li>
</ul><h2 class="module_title "><i><br />
</i></h2><h2 class="module_title "><i>Working:</i></h2><div>The programming is done using Keil compiler. The circuit is configured for two modes namely (1) The LED Blinking mode and the (2) Chasing LEd mode.when the switch connected to the 8th pin of the Port 1 is closed , the microcontroller works in the Blinking mode wherein all the LED's glow simultaneously for one second and remain switched off for the other one second and this process continues as long as the microcontroller is receiving the power supply .The blinking LED's are shown below:</div><h2 class="module_title "></h2><h2 class="module_title " style="font-weight: normal;"><span class="Apple-style-span" style="font-size: small;"><br />
</span></h2></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnVqnqSzlXGJmeQZoHuuHgXhZB3A6_knPI3_ZbriWOQmnuLlqhcflwI3Tdgq1SzSFHsNvPaMzy3tZRKmGci-S7yd2TcXDBbYal5PjJkARAkAcLGfd8spH_t3Iq-jbStevP0FcuwCgn8WE/s1600/blink+led%2527s.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="303" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnVqnqSzlXGJmeQZoHuuHgXhZB3A6_knPI3_ZbriWOQmnuLlqhcflwI3Tdgq1SzSFHsNvPaMzy3tZRKmGci-S7yd2TcXDBbYal5PjJkARAkAcLGfd8spH_t3Iq-jbStevP0FcuwCgn8WE/s320/blink+led%2527s.JPG" width="320" /></a></div><h2 class="module_title "> </h2></div><div>When the switch connected to the 5th pin of the micro controller is closed and the switch connected to the 8th pin is open, the micro controller works in the Chasing LED mode i.e. the LED's glow one after the another for a second and looks something like this:</div><div><br />
</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMD2gxzzMaK_QaUDiL7lRPIhIfProsf0FoSWotZ_M-h6oXbQTuAGXi9E_BnYpBeAm_lG7XAc-B9g1XYEYAVoTUmgOuPFVaAp_k4rrdeFY7CRI1aQRHU8juXBJp40gU7TfQN7CnMVEltn0/s1600/chasing+LED.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="308" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMD2gxzzMaK_QaUDiL7lRPIhIfProsf0FoSWotZ_M-h6oXbQTuAGXi9E_BnYpBeAm_lG7XAc-B9g1XYEYAVoTUmgOuPFVaAp_k4rrdeFY7CRI1aQRHU8juXBJp40gU7TfQN7CnMVEltn0/s320/chasing+LED.JPG" width="320" /></a></div><div><br />
</div><div class="separator" style="clear: both; text-align: center;"></div><div><h2 class="module_title "><i>Programming:</i></h2></div><div><i>The detail explanation of the coding is done below</i></div><div><i><br />
</i></div><div><i><br />
</i></div></div><br />
<div style="border-width: 1px; border: solid brown; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">#include <REGX52.H><regx52.h></regx52.h></div><div style="border-width: 1px; border: solid brown; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;"># include"delay.h" /* header file of the delay is added */</div><div style="border-width: 1px; border: solid brown; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">void main()</div><div style="border-width: 1px; border: solid brown; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">{ P1=0xFF; /*Port 1 is defined as input*/</div><div style="border-width: 1px; border: solid brown; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">P2=0x00; /* Port 2 is defined as output*/</div><div style="border-width: 1px; border: solid brown; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">while(1)</div><div style="border-width: 1px; border: solid brown; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">{/* code for the chasing LED's */</div><div style="border-width: 1px; border: solid brown; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">if(P1_4==0)/* if switch connected to P1_4 is closed*/</div><div style="border-width: 1px; border: solid brown; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">{ P2=0X01; /*glow the LED connected to P2_0 for 1 sec*/</div><div style="border-width: 1px; border: solid brown; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">delay_sec(1);</div><div style="border-width: 1px; border: solid brown; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">P2=0x02; /*glow the LED connected to P2_1 for 1 sec*/</div><div style="border-width: 1px; border: solid brown; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">delay_sec(1);</div><div style="border-width: 1px; border: solid brown; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">P2=0x04;</div><div style="border-width: 1px; border: solid brown; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">delay_sec(1);</div><div style="border-width: 1px; border: solid brown; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">P2=0x08;</div><div style="border-width: 1px; border: solid brown; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">delay_sec(1);</div><div style="border-width: 1px; border: solid brown; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">P2=0x10;</div><div style="border-width: 1px; border: solid brown; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">delay_sec(1);</div><div style="border-width: 1px; border: solid brown; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">P2=0x20;</div><div style="border-width: 1px; border: solid brown; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">delay_sec(1);</div><div style="border-width: 1px; border: solid brown; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">P2=0x40;</div><div style="border-width: 1px; border: solid brown; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">delay_sec(1);</div><div style="border-width: 1px; border: solid brown; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">P2=0x80;</div><div style="border-width: 1px; border: solid brown; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">delay_sec(1);/* code for chasing LED's complete*/</div><div style="border-width: 1px; border: solid brown; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">}/* codes for chasing LED's */</div><div style="border-width: 1px; border: solid brown; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">if(P1_7==0) /* if switch connected to P1_7 is closed*/</div><div style="border-width: 1px; border: solid brown; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">{ P2=0xFF; /*glow all the LED's connected to port P2 for 1 sec*/</div><div style="border-width: 1px; border: solid brown; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">delay_sec(1);</div><div style="border-width: 1px; border: solid brown; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">P2=0x00; /*switch off all the LED's connected to port P2 for 1 sec*/</div><div style="border-width: 1px; border: solid brown; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">delay_sec(1);</div><div style="border-width: 1px; border: solid brown; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">}</div><div style="border-width: 1px; border: solid brown; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">}</div><div style="border-width: 1px; border: solid brown; clear: left; float: left; margin: 0 -1px -1px 0; padding: 1px; width: 288px;">}</div><br />
<br />
<br />
<h2 class="module_title "><i><u><br />
</u></i></h2><h2 class="module_title "><i><u><br />
</u></i></h2><h2 class="module_title "><i><u><br />
</u></i></h2><h2 class="module_title "><i><u><br />
</u></i></h2><h2 class="module_title "><i><u><br />
</u></i></h2><h2 class="module_title "><i><u><br />
</u></i></h2><h2 class="module_title "><i><u><br />
</u></i></h2><h2 class="module_title "><i><u><br />
</u></i></h2><h2 class="module_title "><i><u><br />
</u></i></h2><h2 class="module_title "><i><u><br />
</u></i></h2><h2 class="module_title "><i><u><br />
</u></i></h2><h2 class="module_title "><i><u><br />
</u></i></h2><h2 class="module_title "><i><u><br />
</u></i></h2><h2 class="module_title "><i><u><br />
</u></i></h2><h2 class="module_title "><i><u><br />
</u></i></h2><h2 class="module_title "><i><u><br />
</u></i></h2><h2 class="module_title "><i><u><br />
</u></i></h2><h2 class="module_title "><i><u><br />
</u></i></h2><h2 class="module_title "><i><u><br />
</u></i></h2><h2 class="module_title "><i><u><br />
</u></i></h2><h2 class="module_title "><i><u><br />
</u></i></h2><h2 class="module_title "><i><u><br />
</u></i></h2><h2 class="module_title "><i><u><br />
</u></i></h2><h2 class="module_title "><i><u><br />
</u></i></h2><h2 class="module_title "><i><u><br />
</u></i></h2><h2 class="module_title "><i><u><br />
</u></i></h2><h2 class="module_title "><i><u><br />
</u></i></h2><h2 class="module_title "><i><u><br />
</u></i></h2><h2 class="module_title "><i><u><br />
</u></i></h2><h2 class="module_title "><i><u><br />
</u></i></h2><h2 class="module_title "><i><u><br />
</u></i></h2><h2 class="module_title "><i><u><br />
</u></i></h2><h2 class="module_title "><i><u><br />
</u></i></h2><h2 class="module_title "><i><u><br />
</u></i></h2><h2 class="module_title "><i><u><br />
</u></i></h2><h2 class="module_title "><i><u><br />
</u></i></h2><h2 class="module_title "><i><u><br />
</u></i></h2><h2 class="module_title "><i><u><br />
</u></i></h2><h2 class="module_title "><i><u><br />
</u></i></h2><h2 class="module_title "><i><u><br />
</u></i></h2><h2 class="module_title "><i><u><br />
</u></i></h2><h2 class="module_title "><i><u>Some things that you can try </u></i> </h2><div>You can play around with the code to get your own LED pattern. Try using P2=0xAA, then provide a delay of 1 second and put the value of P2 as P2=0X55 and again provide a delay of 1 second. Similarly you can try other patterns and have fun. This way you will be able to develop your skill in programming.</div><div><br />
</div><div><h2 class="module_title "><i>Download files </i> </h2><h2 class="module_title " style="text-align: left;"><ul style="text-align: left;"><li><span class="Apple-style-span" style="font-size: small; font-weight: normal;"><a href="https://docs.google.com/leaf?id=0BzHQORJ0UNZyNWJkYTZlNWUtMzRkZS00NTcwLWE0ZGMtNDkxZTg5NDYxYTdk&hl=en_US&authkey=CKjF8-EL">Schematic diagram </a></span></li>
<li><span class="Apple-style-span" style="font-size: small; font-weight: normal;"><a href="https://docs.google.com/leaf?id=0BzHQORJ0UNZyZjJlMTM5MjEtNTIxNy00NTMzLWE5MjYtMmZhZjUxMmUyNGI0&hl=en_US&authkey=CLWrwf0M">source code </a></span></li>
<li><span class="Apple-style-span" style="font-size: small; font-weight: normal;"><a href="https://docs.google.com/leaf?id=0BzHQORJ0UNZyNGQzOGRkM2ItMDBmNC00MWJkLThkNTctZjZmNjBiZGY0MDk2&hl=en_US&authkey=CJy52r0K">.HEX file</a></span></li>
</ul><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-weight: normal;">Please comment if you further want to improve the project or if you have doubts in the above code</span>.</span></h2></div><div><br />
</div><div><br />
</div></div>stevehttp://www.blogger.com/profile/09905558157086670938noreply@blogger.com2tag:blogger.com,1999:blog-6118597906483996075.post-21200754059916654902011-07-21T09:02:00.000-07:002011-07-21T09:02:10.993-07:00EAGLE Tutorial<div dir="ltr" style="text-align: left;" trbidi="on">In my last article I provided a short description of Proteus software. In this article I will talk about eagle software.Towards the end I have also provided EAGLE tutorial for the beginners.<br />
<br />
<span class="Apple-style-span">While Proteus software is used for both schematic as well as PCB designing, </span>EAGLE is solely used for PCB designing. If you want to be more precise with your PCB then you should go for EAGLE software.With EAGLE you can make your complex PCB designs and is auto-router tool makes it more flexible to use.<br />
<br />
Unlike Proteus, this is not a simulation software. You can simulate your electronic design with this software.But you can make your schematic design with the help of EAGLE.<br />
<br />
EAGLE comes in both FREE as well as PAID version.If you are a student then FREE version can work for you and you can use it to get yourself familiarized with the PCB designing.<br />
I have provided the link below to download the FREE version.<br />
<a href="http://translate.google.co.in/translate?hl=en&sl=de&u=http://www.cadsoft.de/&ei=mSIoTtPEL4i-sAONrJCJCQ&sa=X&oi=translate&ct=result&resnum=2&ved=0CC4Q7gEwAQ&prev=/search%3Fq%3Dis%2Beagle%2Bsoftware%2Ba%2Bfreeware%26hl%3Den%26biw%3D800%26bih%3D437%26prmd%3Divns">Please click here to download the FREE version of EAGLE software</a><br />
<br />
Below I have provided the Tutorials for using EAGLE software.<br />
<b><i>Please Note:The tutorials provided below have been taken from You tube. All credits to <a href="http://www.youtube.com/user/rpcelectronics">RPC Electronics.</a></i></b><br />
<b><i><br />
</i></b><br />
<b><i><u><span class="Apple-style-span" style="font-size: large;">Tutorial 1</span></u></i></b><br />
This tutorial deals with fundamentals of using EAGLE software.Here, you will learn about how to create a new project and work with schematic<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><object width="320" height="266" class="BLOGGER-youtube-video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" data-thumbnail-src="http://1.gvt0.com/vi/qG0O9LKH-_E/0.jpg"><param name="movie" value="http://www.youtube.com/v/qG0O9LKH-_E&fs=1&source=uds" /><param name="bgcolor" value="#FFFFFF" /><embed width="320" height="266" src="http://www.youtube.com/v/qG0O9LKH-_E&fs=1&source=uds" type="application/x-shockwave-flash"></embed></object></div><br />
<br />
<b><i><u><span class="Apple-style-span" style="font-size: large;">Tutorial 2</span></u></i></b><br />
<span class="Apple-style-span">In this tutorial you will learn more about schematic designing like naming your devise and configuring settings.</span><br />
<span class="Apple-style-span"><br />
</span><br />
<div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/z4Io4qZCzYI?feature=player_embedded' frameborder='0'></iframe></div><span class="Apple-style-span"><br />
</span><br />
<span class="Apple-style-span" style="font-size: large;"><b><i><u>Tutorial 3</u></i></b></span><br />
This tutorial will show you an example of a working circuit along with some pitfalls that you should avoid.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/G0bMfV3IbMo?feature=player_embedded' frameborder='0'></iframe></div><br />
<b><i><u><span class="Apple-style-span" style="font-size: large;">Tutorial 4</span></u></i></b><br />
This is the continuation of the above tutorial.Here you will learn complete the basic schematic and make some required changes.Along with this you will also about some new tips and tricks that can prove useful to you while you work with EAGLE software.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/rGiHdNyHbDM?feature=player_embedded' frameborder='0'></iframe></div><br />
<b><i><u><span class="Apple-style-span" style="font-size: large;">Tutorial 5</span></u></i></b><br />
<span class="Apple-style-span">The schematic making will be completed in this tutorial and start with the PCB making</span><br />
<span class="Apple-style-span"><br />
</span><br />
<div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/3Xj1Xrp8uso?feature=player_embedded' frameborder='0'></iframe></div><div class="separator" style="clear: both; text-align: center;"><br />
</div><span class="Apple-style-span" style="font-size: large;"><b><i><u>Tutorial 6</u></i></b></span><br />
<div class="separator" style="clear: both; text-align: center;"><object width="320" height="266" class="BLOGGER-youtube-video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" data-thumbnail-src="http://3.gvt0.com/vi/UW_Jkzuo_mc/0.jpg"><param name="movie" value="http://www.youtube.com/v/UW_Jkzuo_mc&fs=1&source=uds" /><param name="bgcolor" value="#FFFFFF" /><embed width="320" height="266" src="http://www.youtube.com/v/UW_Jkzuo_mc&fs=1&source=uds" type="application/x-shockwave-flash"></embed></object></div><span class="Apple-style-span" style="font-size: large;"><b><i><u>Tutorial 7</u></i></b></span><br />
<span class="Apple-style-span" style="font-size: large;"><b><i><u><br />
</u></i></b></span><br />
<div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/TmV9urSuSFU?feature=player_embedded' frameborder='0'></iframe></div><span class="Apple-style-span" style="font-size: large;"><b><i><u>Tutorial 8</u></i></b></span><br />
<span class="Apple-style-span" style="font-size: large;"><b><i><u><br />
</u></i></b></span><br />
<div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/4JC32tq7Ibo?feature=player_embedded' frameborder='0'></iframe></div><span class="Apple-style-span" style="font-size: large;"><b><i><u><br />
</u></i></b></span><br />
<span class="Apple-style-span" style="font-size: large;"><b><i><u>Tutorial 9</u></i></b></span><br />
<div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/4xjjahxMapc?feature=player_embedded' frameborder='0'></iframe></div><span class="Apple-style-span" style="font-size: large;"><b><i><u>Tutorial 10</u></i></b></span><br />
<div class="separator" style="clear: both; text-align: center;"><object width="320" height="266" class="BLOGGER-youtube-video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" data-thumbnail-src="http://1.gvt0.com/vi/cB5Z_fRpLrE/0.jpg"><param name="movie" value="http://www.youtube.com/v/cB5Z_fRpLrE&fs=1&source=uds" /><param name="bgcolor" value="#FFFFFF" /><embed width="320" height="266" src="http://www.youtube.com/v/cB5Z_fRpLrE&fs=1&source=uds" type="application/x-shockwave-flash"></embed></object></div>I have added here most of the tutorials in one place itself which can get you started.Again, thanks to <b>RPC electronics </b>for its wonderful contribution.<br />
<div class="separator" style="clear: both; text-align: center;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><br />
</div><span class="Apple-style-span" style="font-size: large;"><b><i><u><br />
</u></i></b></span><br />
<span class="Apple-style-span" style="font-size: large;"><b><i><u><br />
</u></i></b></span><br />
<br />
</div>stevehttp://www.blogger.com/profile/09905558157086670938noreply@blogger.com3tag:blogger.com,1999:blog-6118597906483996075.post-4030280368710992932011-07-21T05:06:00.000-07:002011-07-21T05:06:04.324-07:00Proteus Tutorial<div dir="ltr" style="text-align: left;" trbidi="on"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbR6l-EwFAJsYkcCIAbLfVMLVZPQzsHtuMtjj0AAX5Oj5yQoqz6TgIORp8oC4AKcOv9_znd73lyFAeP8DHS2D3bBy41bvixQ1LbPx15I57IMYYI-cyLTYQ16QI3qHSYoJeILqp7r7_UHM/s1600/proteus+software.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="233" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbR6l-EwFAJsYkcCIAbLfVMLVZPQzsHtuMtjj0AAX5Oj5yQoqz6TgIORp8oC4AKcOv9_znd73lyFAeP8DHS2D3bBy41bvixQ1LbPx15I57IMYYI-cyLTYQ16QI3qHSYoJeILqp7r7_UHM/s400/proteus+software.JPG" width="400" /></a><br />
<br />
<br />
<br />
<div><br />
</div><div><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
Proteus is a simulation software which is very essential for every electronics engineers and students as well.You might be reading this page because you searched for a Proteus tutorial,design a project with Proteus software or wanted to know more about Proteus software.Well, you have come to the right place and if you keep reading you will know everything about it along with the video tutorials<br />
<br />
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">Engineering students especially electronics engineers will find this software very useful for academic purpose.</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">In colleges, it is practically impossible for every engineering student to get used to with hardware's like CRO(Cathode Ray Oscilloscope), function generator and most importantly breadboard .In colleges, in electronics labs mostly students are required to form groups and work on a single breadboard.But with this kind of situation, not all the students in the group are able to grasp about the hardware and hence end up with incomplete knowledge of circuitry also.So, whenever a project work is assigned to them they may end up burning a device or wrong circuitry.To avoid this,one can make use of a simulation software like Proteus .</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">You can download the demo version of Proteus software from here.Please keep reading to get started with Proteus software.</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><a href="http://www.labcenter.com/index.cfm"> Click here to visit the official website and download the software</a></div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">Proteus software provides an interactive platform to simulate devices ranging from small transistor to microcontrollers and even serial port communication.</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">Now, since you know what the software does lets get started with the tutorial</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">The below provided tutorial is taken from Youtube </div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><b><i><u><span class="Apple-style-span" style="font-size: large;">Tutorial 1</span></u></i></b></div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">This tutorial will guide you with the basics of using the software and how to make schematic diagrams in Proteus.</div><div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/yt7Bhhvo-hU?feature=player_embedded' frameborder='0'></iframe></div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><b><i><u><span class="Apple-style-span" style="font-size: large;">Tutorial 2</span></u></i></b></div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">This tutorial is the continuation of tutorial 1.In this tutorial you will learn more about schematic making in Proteus and begin with PCB designing</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><object width="320" height="266" class="BLOGGER-youtube-video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" data-thumbnail-src="http://3.gvt0.com/vi/J1_Dn8ip5Xs/0.jpg"><param name="movie" value="http://www.youtube.com/v/J1_Dn8ip5Xs&fs=1&source=uds" /><param name="bgcolor" value="#FFFFFF" /><embed width="320" height="266" src="http://www.youtube.com/v/J1_Dn8ip5Xs&fs=1&source=uds" type="application/x-shockwave-flash"></embed></object></div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><b><i><u><span class="Apple-style-span" style="font-size: large;">Tutorial 3</span></u></i></b></div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span class="Apple-style-span">In this tutorial you will learn about PCB designing in Proteus.Along with this you will also learn about how to get the printout of your PCB.</span></div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span class="Apple-style-span"><br />
</span></div><div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/my8MpvjxMKs?feature=player_embedded' frameborder='0'></iframe></div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">I hope this article has helped you a lot.I will be posting articles on electronic projects so please keep checking this blog or you can bookmark it for your convenience.</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br />
</div></div></div>stevehttp://www.blogger.com/profile/09905558157086670938noreply@blogger.com3tag:blogger.com,1999:blog-6118597906483996075.post-47212550613289275752011-07-20T11:23:00.000-07:002011-07-20T11:23:25.645-07:00Tips On Making Your 'Will Power' strong<div dir="ltr" style="text-align: left;" trbidi="on"><div dir="ltr" style="text-align: left;" trbidi="on"><div dir="ltr" style="text-align: left;" trbidi="on">If you have ever watched the movie"Green Lantern" you will find that the main source of the Hero's power is his Will Power and his enemy is his Fear.At the end of the movie we see that Will Power is stronger than Fear and it is true.Many of us do read books and attend various programs to train our mind to become strong.However, it is our common experience that we do control our mind for some time and then we give up.<br />
<br />
Most of us especially teenagers find it very difficult to control their mind.We think that our mind is on auto-pilot and we cannot control it.Well, that is not true. If you have read the novel "The Secret" you will realize that you have missed so much by not using your Will Power and the power of your mind.<br />
Below you can watch the Trailer of the movie"The Secret". It will surely inspire you a lot.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><object class="BLOGGER-youtube-video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" data-thumbnail-src="http://3.gvt0.com/vi/_b1GKGWJbE8/0.jpg" height="266" width="320"><param name="movie" value="http://www.youtube.com/v/_b1GKGWJbE8&fs=1&source=uds" /><param name="bgcolor" value="#FFFFFF" /><embed width="320" height="266" src="http://www.youtube.com/v/_b1GKGWJbE8&fs=1&source=uds" type="application/x-shockwave-flash"></embed></object></div><br />
Well, it says that there are basically three laws--<b>Laws of Attraction</b><br />
<ul><li>First law--Think what you want.The world is your catalog and you can wish for whatever you want.</li>
<li>Second law--Believe and have faith that you will get it</li>
<li>Third law-feel good about it and think of your wish as it is on its way.</li>
</ul>You can know more about "The Secret" by buying the DVD from the link provided below:</div><div dir="ltr" style="text-align: left;" trbidi="on"><ul></ul></div><a href="http://www.amazon.com/gp/product/B000K8LV1O/ref=as_li_tf_tl?ie=UTF8&tag=hubpages0014c-20&linkCode=as2&camp=217145&creative=399377&creativeASIN=B000K8LV1O">The Secret (Extended Edition)</a><img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=hubpages0014c-20&l=as2&o=1&a=B000K8LV1O&camp=217145&creative=399377" style="border: none !important; margin: 0px !important;" width="1" /><label id="showTextCategoryLinkPreview_l1"> (See all </label><a href="http://www.amazon.com/Self-Help-Interests-DVD/b/ref=as_li_tf_tl?ie=UTF8&tag=hubpages0014c-20&linkCode=as2&camp=217145&creative=399385&creativeASIN=B000K8LV1O&ie=UTF8&node=537522">Self-Help Movies & TV</a>)<br />
<br />
Other Tips on making your 'Will' strong are:<br />
<ul style="text-align: left;"><li>Make a small diary and name it as "My Task Book" Write about your task in the diary and also the date of when you are going to accomplish it and sign on it. Now, try to accomplish your task that you intended to complete at a given time.</li>
<li>Whenever you fail to accomplish your task make a note of it.At the the end of the week, check your progress</li>
</ul><ul style="text-align: left;"><li>Remember, the more you accomplish the task you intended to complete the more your will becomes stronger.</li>
</ul>The better way to make your will strong is to know about "The Secret". I watched the movie and it made a lot of difference to me.Watch it or read it and don't forget to use it because that is how you will know about Your Secret .<br />
<br />
</div> <iframe frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="http://rcm.amazon.com/e/cm?t=hubpages0014c-20&o=1&p=8&l=as1&asins=1582701709&ref=tf_til&fc1=000000&IS2=1&lt1=_blank&m=amazon&lc1=0000FF&bc1=000000&bg1=FFFFFF&f=ifr" style="height: 240px; width: 120px;"></iframe><br />
<br />
</div>stevehttp://www.blogger.com/profile/09905558157086670938noreply@blogger.com0