<?xml version="1.0" encoding="UTF-8" standalone="no"?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0"><channel><title>Gadgetronicx</title><description>Gadgetronicx blog brings DIY Electronic circuits , tutorials and working and Gadgetronicx covers post about microcontrollers using Embedded C programming in electronics. Gadgets Reviews, technology news will be covered along with HTML and CSS programming hover codes for Bloggers.</description><managingEditor>noreply@blogger.com (Anonymous)</managingEditor><pubDate>Sun, 7 Jun 2026 15:17:40 +0530</pubDate><generator>Blogger http://www.blogger.com</generator><openSearch:totalResults xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">269</openSearch:totalResults><openSearch:startIndex xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">1</openSearch:startIndex><openSearch:itemsPerPage xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">25</openSearch:itemsPerPage><link>http://gadgetronicx.blogspot.com/</link><language>en-us</language><itunes:explicit>no</itunes:explicit><itunes:image href="http://i1153.photobucket.com/albums/p510/frankdonald/masonic-little-g.png"/><itunes:keywords>Gagdgetronicx,Electronics,Gadgets,technology,Circuits</itunes:keywords><itunes:summary>Here you can get all the latest new from around the world about gadgets and electronics.</itunes:summary><itunes:subtitle>Electronics and Gadgets</itunes:subtitle><itunes:category text="Technology"><itunes:category text="Gadgets"/></itunes:category><itunes:category text="Education"><itunes:category text="Higher Education"/></itunes:category><itunes:owner><itunes:email>Frankpunter@gmail.com</itunes:email></itunes:owner><item><title>Random Number generator using 8051 Microcontroller</title><link>http://gadgetronicx.blogspot.com/2015/03/random-number-generator-8051-microcontroller.html</link><category>8051 programs</category><pubDate>Fri, 27 Mar 2015 10:15:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-44917801884187835.post-7727003768955404060</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEi8IOyXQWVWgtBA3xP12zrvG4sMhiBxHgWUYkMLDxo3IqAFUK4WvT7uSK9SD31a1H0Br-Z2tq-WBB0tZsTs-TC5Xns9qKdb5VfzEgvTXyjp4x9ZUgxZurWYb51-75HWZyjZUBOFwnL4U/s1600/random-number-generator-circuit.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="random-number-geneartor-circuit-8051-microcontroller" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEi8IOyXQWVWgtBA3xP12zrvG4sMhiBxHgWUYkMLDxo3IqAFUK4WvT7uSK9SD31a1H0Br-Z2tq-WBB0tZsTs-TC5Xns9qKdb5VfzEgvTXyjp4x9ZUgxZurWYb51-75HWZyjZUBOFwnL4U/s1600/random-number-generator-circuit.png" height="496" title="random number genearator" width="700" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Random Number generators are something which is used to draw out a random number and use it for a specified purpose. The purpose may differ it might be lottery draw , competition or whatever it may be the above generator using 8051 will do a pretty good job also the complexity level of the program is very simple.&lt;/span&gt;&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;IC 74LS48:&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKeI3GXRzhd5WecSHhs_r52RuTIJTsamkA1LNkLPCrSF9_sXqJ52mWHeCf-52xpYWCMDgDdnBKwcCyPuwachvP9dUlCNROqk3j7Sj8NYBzLAY3LNSEEetL5n_K_QQSEUs48L0PEJMbv1k/s1600/7448diagram.GIF" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKeI3GXRzhd5WecSHhs_r52RuTIJTsamkA1LNkLPCrSF9_sXqJ52mWHeCf-52xpYWCMDgDdnBKwcCyPuwachvP9dUlCNROqk3j7Sj8NYBzLAY3LNSEEetL5n_K_QQSEUs48L0PEJMbv1k/s1600/7448diagram.GIF" height="275" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The IC 74LS48 or 7448 is a simple BCD to 7 segment decoder which was used to reduce the usage of pins dedicated to the 7 segment display. It consists of 4 input pins namely 1,2,3,4 which is used to feed 4 bit data input to the IC. The fed 4 bit input binary data in turn decoded by the IC and output is obtained from the pins a, b ..... f &amp;nbsp;which is connected to the corresponding pins of the 7 segment display. This will display the correct digit in the 7 segment display.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h3 style="text-align: justify;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;DESIGN:&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;In the above design i have used two 7448 IC to interface two 7 segments in a single port, this will save the pin usage from the microcontroller. You can also go for direct interfacing of &amp;nbsp;a 7 segment with a dedicated port if you don't have 7448 IC in your possession.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Interrupt 0 feature of the Microcontroller was used here, therefore a simple push button was interfaced with the pin INT0 pin of the 8051 controller. Reset button was used with the pin 9 to reset the operation and start running the program from the beginning.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;NUMBER GENERATION PROCESS:&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Initially the number keeps running from 0 to 99 in the display at high speed in a loop, so it will barely visible to human eye.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Pressing the interrupt button fetches the random number and displays it in the 7 segment display.&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The the reset button should be pressed to initialize the program and counting again.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;i&gt;&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;/h3&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;i&gt;&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;CODE:&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;This code was built using Keil Uvision 4&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;table style="background-color: #3c98ff; width: 100%;"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;ol style="color: white; text-align: left;"&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;#include&amp;lt;regx51.h&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;int a,b;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;void delay();&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;void main()&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; IE=0x81;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //External interrupt activation&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; while(1)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; {&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; for(a=0;a&amp;lt;=9;a++) &amp;nbsp; &amp;nbsp; //Number generation&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; {&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;for(b=0;b&amp;lt;=9;b++)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; P2=a|b&amp;lt;&amp;lt;4;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; delay();&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; }&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;}&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;void delay()&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; int i;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; for(i=0;i&amp;lt;=400;i++);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;}&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;void extr0(void) interrupt 0 &amp;nbsp; &amp;nbsp; //Subroutine EX0 with interrupt number '0'&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; P2=a|b&amp;lt;&amp;lt;4;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;&lt;span style="white-space: pre;"&gt;&amp;nbsp;&lt;/span&gt;while(1);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;}&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;NOTE:&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;div style="text-align: left;"&gt;
&lt;/div&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Resistors for 7 segment are omitted for the simplicity of the schematic diagram, hook up a 470 ohm resistor to each pins connecting from 74LS48 to 7 segment pins.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEi8IOyXQWVWgtBA3xP12zrvG4sMhiBxHgWUYkMLDxo3IqAFUK4WvT7uSK9SD31a1H0Br-Z2tq-WBB0tZsTs-TC5Xns9qKdb5VfzEgvTXyjp4x9ZUgxZurWYb51-75HWZyjZUBOFwnL4U/s72-c/random-number-generator-circuit.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><author>Frankpunter@gmail.com (Anonymous)</author></item><item><title>Electronic Dice Circuit using IC CD4017</title><link>http://gadgetronicx.blogspot.com/2015/03/electronic-dice-circuit-using-ic-cd4017.html</link><category>hobby circuits</category><category>LED circuits</category><pubDate>Sun, 22 Mar 2015 16:40:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-44917801884187835.post-176374949776420770</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiM2DSBWo3Ppv5VdTyoRiIrDfuMiBlymZ-wTc_asNFCxWYllr0_7vUCukIoA_mPhiaL7bdBY3WBDUjy-LaT4mKJLCVVgLvjTyA2D_l8JLglFlkBGhVPNFxz_7UZL96wCwwn_cCHs0lb7rs/s1600/electronic-dice-circuit-schematic.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="electronic-dice-circuit-diagram-schematic" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiM2DSBWo3Ppv5VdTyoRiIrDfuMiBlymZ-wTc_asNFCxWYllr0_7vUCukIoA_mPhiaL7bdBY3WBDUjy-LaT4mKJLCVVgLvjTyA2D_l8JLglFlkBGhVPNFxz_7UZL96wCwwn_cCHs0lb7rs/s1600/electronic-dice-circuit-schematic.png" height="364" title="electronic dice" width="700" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Dice are very well known in all parts of the world as there are plenty of games played using it. The purpose of dice is to pick a number randomly and play game proceed based on the picked number. But when using primitive dice there is a chance that player can cheat the opposition with spinning techniques. The above provided circuit can be used to avoid cheating since it depends on the push of a button.&lt;/span&gt;&lt;/div&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;h3 style="text-align: justify;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;h3 style="text-align: justify;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;WORKING OF CIRCUIT:&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The working of the circuit starts with a astable multivibrator using a simple 555 timer IC. This gives out series of clock pulses as output. And the frequency of the output pulse depends of resistor and capacitor connected to the IC 555. You can choose the resistor and capacitor connected to the 555 of your wish but make sure the frequency is high enough to dodge the human eyes.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The IC 4017 forms the next part of this circuit. IC 4017 also known as Johnson counter is capable of counting the incoming pulses fed to its CLK pin and with each increment in clock cycles the high signal output goes from Q0 to Q9. That is during the first positive edge of the cycle the ouput Q0 pin gives logic high and Q1 during the second edge and it goes on till Q9. This logic forms the backbone of the above circuit.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif; text-align: justify;"&gt;Six LED's are arranged from 1 to 6 where each LED's positions represent the number that can be drawn out of the die. Current limiting resistors of 470 ohm was added to limit the current and protect the circuit from damage.&lt;/span&gt;&lt;br /&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif; text-align: justify;"&gt;Initially when the Spin switch is in open state the output of &amp;nbsp;ICC 555 will be high and static. But the moment the button is pressed the LED's started running due to the high frequency input from the 555. And when spin button is released, a random LED's gets lighted and the position of the number represents the number drawn out of the die. And you can play the game with the number drawn from it.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style="text-align: justify;"&gt;
&lt;/div&gt;
&lt;h3 style="text-align: justify;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;NOTE:&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Pick Resistor R1,R2 and C2 is such a way that the output frequency is high and the running of LED's &amp;nbsp;is barely visible to the eyes.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiM2DSBWo3Ppv5VdTyoRiIrDfuMiBlymZ-wTc_asNFCxWYllr0_7vUCukIoA_mPhiaL7bdBY3WBDUjy-LaT4mKJLCVVgLvjTyA2D_l8JLglFlkBGhVPNFxz_7UZL96wCwwn_cCHs0lb7rs/s72-c/electronic-dice-circuit-schematic.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>Frankpunter@gmail.com (Anonymous)</author></item><item><title>Analog to Digital converter circuit using ADC0808</title><link>http://gadgetronicx.blogspot.com/2015/03/analog-digital-circuit-ic-adc0808.html</link><category>convertor circuits</category><category>electronic circuits</category><pubDate>Tue, 17 Mar 2015 20:54:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-44917801884187835.post-7109654510738626204</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjd-Sh8I9Cw8gLCjSKTwsTdjOSYkV7vZg7mHH3rCOf4Q_dtgXi2lcd9ZidNwhyphenhyphenh0jiFOZvs4TLzXVUambhGT-d1KYULm-bH3YvUBeyFnmHEanoUPrxm7QCeh9owVD6_wkxh4o4mXMaRgwo/s1600/analog-digital-converter-circuit-diagram.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjd-Sh8I9Cw8gLCjSKTwsTdjOSYkV7vZg7mHH3rCOf4Q_dtgXi2lcd9ZidNwhyphenhyphenh0jiFOZvs4TLzXVUambhGT-d1KYULm-bH3YvUBeyFnmHEanoUPrxm7QCeh9owVD6_wkxh4o4mXMaRgwo/s1600/analog-digital-converter-circuit-diagram.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The Analog to digital converters are very useful in a digital system where the conversion of raw analog signal to digital data bits possess a notable significance. ADC's are also quite familiar in several microcontrollers, but using a ADC in micrcontroller requires programming skills and not everyone love to go in to programming. The circuit shown above will offer a solution for those who don't have any sort of programming skills.&lt;/span&gt;&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h3 style="text-align: justify;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;IC ADC0808:&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;This IC was a simple Analog to Digital converter which provides a resulting 8 bit data for input analog signal. The pins OUT1 to OUT8 gives the output data bits in binary form whereas IN0 to IN7 allows user to feed their analog signal. User can use only one input channel at a time and the channel selection was done by using the pins ADDA to ADDC. The various logic states at these three pins will enable us to select one out of 8 different channels.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The ALE (Address latch enable) pin should be made high to enable the selection of input channels. The EOC(End of conversion) and Start pins are used to control the data conversion. The EOC pin gives high state after conversion and the start of conversion can be initiated by feeding the low pulse to the active low Start pin of the IC. The OE(output Enable pin) was used to enable the digitized output and Clock pin to feed the clock pulse for chip operation.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h3 style="text-align: justify;"&gt;
&lt;i&gt;&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;WORKING OF CIRCUIT:&lt;/span&gt;&lt;/i&gt;&lt;/h3&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The working of the circuit starts with making ALE and OE pins high which are meant to choose the channel and also enable output. 5 V was the default reference voltage and it can be altered by feeding the voltage of our desire to the pins Vref+ and Vref-. The Channel selection should be done by using the pin ADDA to ADDC pins and here in this circuit diagram input channel 1 was selected. The below table will give the logic states of all pins and their respective channel selection.&lt;/span&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLHwJUvhx9Fpey1bELwKuH72m2zIyLnKjSwCiHQc4rscainSn2lNje2Fku2Ch0eiFGs5pbrKp-cZg_7f31d8-jvRQav8CCSSvILPmCeVpJmjREyOSQGRekXAE4hb_2lccIjllbVCcvZPc/s1600/channel-selection.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;img alt="channel-selection-table" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLHwJUvhx9Fpey1bELwKuH72m2zIyLnKjSwCiHQc4rscainSn2lNje2Fku2Ch0eiFGs5pbrKp-cZg_7f31d8-jvRQav8CCSSvILPmCeVpJmjREyOSQGRekXAE4hb_2lccIjllbVCcvZPc/s1600/channel-selection.JPG" height="233" title="logic table" width="320" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Now the Analog signal is fed into the channel you selected and then the state of the pin START should be made low from high to start for activation. And after the conversion the EOC pin goes high and it indicates the conversion is over. The EOC pin retains it low state as soon the next pulse is encountered. As you can see in the above circuit the EOC pin was connected to start pin which triggers a chain reaction resulting in continuous conversion to take place. &amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Finally we will get a 8 bit data from the pins OUT1 to OUT8 which can be used for further processing and display. You can even connect the LED's to these pins and visually view the output binary data, Led On indicates binary 1 and off indicates binary 0 data.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h3 style="text-align: justify;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;NOTE:&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;You can control the data conversion by adding a button to the start button which connects to the ground when pressed.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Adding a indicator LED to EOC pin will help to notify the end of conversion.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Change the combination of switches as per the logic table to select through the various input channels.&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Since it was a 8 bit ADC the resulting increment in output data will vary per Vref/256 i.e 2^8.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&amp;nbsp;&amp;nbsp;&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjd-Sh8I9Cw8gLCjSKTwsTdjOSYkV7vZg7mHH3rCOf4Q_dtgXi2lcd9ZidNwhyphenhyphenh0jiFOZvs4TLzXVUambhGT-d1KYULm-bH3YvUBeyFnmHEanoUPrxm7QCeh9owVD6_wkxh4o4mXMaRgwo/s72-c/analog-digital-converter-circuit-diagram.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>Frankpunter@gmail.com (Anonymous)</author></item><item><title>Creating Pac man custom pattern and animation in LCD display</title><link>http://gadgetronicx.blogspot.com/2015/03/creating-custom-character-animation-lcd.html</link><category>avr microcontroller</category><pubDate>Thu, 12 Mar 2015 11:04:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-44917801884187835.post-66234403297529786</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjw_rxCnhgO1pFoDilwFc9ngtFK3RtnRh-ePxykTHFHrBV0sSfwfUxwFYue-JpOvnvOJU64oe9uVFiRkWvDVE0LFgj3bekEgCERP3yA1294O192g9GF5s25lWjbIThwL6b-MSh6ot2iYgs/s1600/pacman-151558_640.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="pac-man-icon-game" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjw_rxCnhgO1pFoDilwFc9ngtFK3RtnRh-ePxykTHFHrBV0sSfwfUxwFYue-JpOvnvOJU64oe9uVFiRkWvDVE0LFgj3bekEgCERP3yA1294O192g9GF5s25lWjbIThwL6b-MSh6ot2iYgs/s1600/pacman-151558_640.png" height="292" title="pac man" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;LCD modules are widely used to display calculated data's, user references and much more. In addition all character based LCD which uses HD44780 controller consists of a special RAM known as CGRAM which allows user to create custom patterns. This tutorial will teach you to create your desired pattern as well running it as a simple animation.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;DESIGN:&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhABq1xO2jNYiOS68-HdUyaTtcIlvjY7LyE1yCNv5HXsF1DJjw94VamMNUPulkJvoCXyiYJpdkXefLWVpJ8hk-__b4MG5pIGFDhj69LDHnTzJhp2N3bkKmBbN5HWbY5Fkk6glkuFhhzZIc/s1600/lcd-custom-character.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"&gt;&lt;img alt="custom-character-lcd-interface-avr-microcontroller" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhABq1xO2jNYiOS68-HdUyaTtcIlvjY7LyE1yCNv5HXsF1DJjw94VamMNUPulkJvoCXyiYJpdkXefLWVpJ8hk-__b4MG5pIGFDhj69LDHnTzJhp2N3bkKmBbN5HWbY5Fkk6glkuFhhzZIc/s1600/lcd-custom-character.png" height="353" title="AVR custom chracter" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h3 style="text-align: justify;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;h3 style="text-align: justify;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;CGROM:&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;CG ROM is nothing but a memory which holds the pattern of the characters as predefined lcd font. Ever wondered how LCD displays the corresponding font when you pass the ASCII value of a particular character. This job was done by means of this CGROM memory.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h3 style="text-align: justify;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;DDRAM:&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;This memory holds the characters which are currently displayed on the screen. That is whenever a character is about to displayed the contents of the CGROM will be loaded to the DDRAM and in this way the characters can be displayed in the screen.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;&lt;b&gt;CGRAM:&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;CGRAM is the memory in the LCD module which allows user to create custom characters by rewriting the character patterns in the program.&lt;/span&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Generally we will initialize the LCD by using "0x80" command which will point the DDRAM address and from there the LCD allows us to display predefined &amp;nbsp;characters which is stored in the CGROM.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;In order to create custom pattern we should initialize the device to point the CGRAM address ranging from 0x00 to 0x07 in the LCD. This can be done by using the command "0x40", which forces the device to point CGRAM address. Refer the instruction set of LCD for better understanding. Remember there is a difference between instruction "0x40" and address "0x00" try not to get confused.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;So whenever you writes the instruction 0x40 it will allow us to create the predefined character in the CGRAM address 0x00. The command 0x48 will allows us to store the pattern in the address 0x01. In this way we can create up to 8 character patterns. So we now know what is CGRAM and how to initialize it for storing our custom character. Now lets see how to create the pattern in it.&lt;/span&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXfhD0uy7KAVGfi44e7cWELvP6Fn43zTalr0KAj_7D6dEAWOfxKKwixtQ3NlhPLwgAZwbMwAz_hIKy71diTwCYRcY5VPBgPx35H579M3_i73_IeJIkBxVDb8-T0Zk94utyRUlJy4xhlXU/s1600/single+block.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="lcd-pixel" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXfhD0uy7KAVGfi44e7cWELvP6Fn43zTalr0KAj_7D6dEAWOfxKKwixtQ3NlhPLwgAZwbMwAz_hIKy71diTwCYRcY5VPBgPx35H579M3_i73_IeJIkBxVDb8-T0Zk94utyRUlJy4xhlXU/s1600/single+block.JPG" title="pixel" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The above block represents a single elements of an LCD and it contains 5 columns and 8 rows in it. &amp;nbsp;And we are going to create pattern by sending corresponding byte for each row. For example we need to make first three columns to lighten up then we should send "XXX11100" byte to the LCD, the first three bytes are don't care. Next we should do the same for the remaining rows. So after sending 8 bytes of data we will finish up with storing a Custom pattern in the CGRAM address. For next pattern we should move on to the next address with instruction 0x48 and so on.&lt;/span&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2MKcs6QOKJw2bGmqBbDOAEECan5g708DO0pnYO21tR8Es8EnLuaIWs7Wa3NcjnHuSDozbUzdHaeg2H_wuZB1xRh-krdw5gol4D2ViwWzauvwXkCgbxJwNBKGGRLf8fwH4sPz_as0jwGk/s1600/pac+man+character+generation.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="custom-font-character-generation-tool" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2MKcs6QOKJw2bGmqBbDOAEECan5g708DO0pnYO21tR8Es8EnLuaIWs7Wa3NcjnHuSDozbUzdHaeg2H_wuZB1xRh-krdw5gol4D2ViwWzauvwXkCgbxJwNBKGGRLf8fwH4sPz_as0jwGk/s1600/pac+man+character+generation.JPG" height="246" title="custom pattern" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Here is a Custom generated Pac man icon using a simple web tool. Not to worry it looks lot better while displaying it in the LCD.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;So we are now done with the chracter generation and all its left now is to display it. It can be done by using calling the CCRAM address as data in the program lcd_data(0x00,1) will print the pattern you have previously stored in the CGRAM address 0x00 by using the instruction 0x40. And 0x01 will print the pattern you stored using the instrcution 0x48 and so on.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;i&gt;&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;STEPS TO CREATE PATTERN :&lt;/span&gt;&lt;/i&gt;&lt;/h3&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Initialize the LCD as you do it generally.&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Pass the command 0x40 to point the CGRAM address.&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Now create your desired custom pattern by using the above method.&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;After finishing your pattern return to the DDRAM location by giving the command 0x80 to the LCD.&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;And now print the pattern in any location by passing the CGRAM address 0x00,0x01 to 0x07 as data (i.e with RS pin high state) to the LCD.&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;You will get your pattern now.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;i&gt;&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;/h3&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;i&gt;&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;ANIMATING THE PATTERNS:&lt;/span&gt;&lt;/i&gt;&lt;/h3&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Animating the patterns is not a big task create some of your desired patterns and program it to display the patterns in a sequence and you will get your animation. For example i have created two patterns of Pac man one is normal icon and another one is with its mouth wide open. All i am going to do it display these two patterns one by one in a sequence with specific delay. Through this am going to make it look like eating out the word "WELCOME" in the lcd, Sounds cool isn't it.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjG9MZzVcY-9KRxNfi4BkAIUWjMTSKHAqlu2guTp3bjyIQlPh6TEeD4p7ROGKmm7SjGFKlIP0SrcFYWjG0RIGfOUbz3cGGwPNRE5-MmgwTX7pAUFksvVRyyWqsEu_kdbfDNCoeo8weBKE/s1600/pac-man-animation.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="animated-pacman-output" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjG9MZzVcY-9KRxNfi4BkAIUWjMTSKHAqlu2guTp3bjyIQlPh6TEeD4p7ROGKmm7SjGFKlIP0SrcFYWjG0RIGfOUbz3cGGwPNRE5-MmgwTX7pAUFksvVRyyWqsEu_kdbfDNCoeo8weBKE/s1600/pac-man-animation.JPG" title="Animated-output" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;CODE:&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;This code was built using AVR studio. You can built this LCD animation using any controller 8051,PIC, ARM etc by following the pattern creation logic.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;table style="background-color: #3c98ff; width: 100%;"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;ol style="color: white; text-align: left;"&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;#include&amp;lt;avr/io.h&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;#define F_CPU 8000000UL&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;#include&amp;lt;util/delay.h&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;unsigned char font1[8]={0x0F,0x1E,0x1C,0x18,0x18,0x1C,0x1E,0x0F};&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;unsigned char font2[8]={0x0E,0x1F,0x1B,0x1F,0x1C,0x1F,0x1F,0x0E};&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;unsigned char word2[]={"WELCOME"};&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;int i;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;char position;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;void lcd_data (char a,int b) &amp;nbsp; &amp;nbsp; &amp;nbsp; //LCD routine &amp;nbsp;for data and command&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;{ &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;PORTA=a; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;if(b==0) &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;{ &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;PORTB&amp;amp;=~(1&amp;lt;&amp;lt;0); &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;} &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;else &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;{ &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;PORTB|=(1&amp;lt;&amp;lt;0); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;} &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;PORTB|=(1&amp;lt;&amp;lt;1); &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;_delay_ms(2); &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;PORTB&amp;amp;=~(1&amp;lt;&amp;lt;1); &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;_delay_ms(2); &amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;}&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;void lcd_init () &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;{ &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;lcd_data(0x3C,0); &amp;nbsp; &amp;nbsp; &amp;nbsp; // 4-bit mode - 2 line - 5x10 font. &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;lcd_data(0x0C,0); &amp;nbsp; &amp;nbsp; &amp;nbsp; // Display cursor with blink. &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;lcd_data(0x06,0); &amp;nbsp; &amp;nbsp; &amp;nbsp; // Automatic Increment - No Display shift. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;lcd_data(0x01,0); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;lcd_data(0x02,0); &amp;nbsp; &amp;nbsp; &amp;nbsp; //Clear screen and return home &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;}&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;int main()&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;DDRA=0xff;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; DDRB=0x03;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;lcd_init();&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;lcd_data(0x40,0);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;for(i=0;i&amp;lt;=7;i++)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;lcd_data(font1[i],1);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;lcd_data(0x48,0);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;for(i=0;i&amp;lt;=7;i++)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;lcd_data(font2[i],1);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;lcd_data(0xc5,0);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;for(i=0;i&amp;lt;=6;i++)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;lcd_data(word2[i],1);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;i=0;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;position=0xC4;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;while(i&amp;lt;=6) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Pac man eating out the letters animation sequence&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; lcd_data(position,0); &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; lcd_data(0x01,1); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;//Displaying first pattern&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; _delay_ms(150);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; lcd_data(position,0);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; lcd_data(0x00,1); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Displaying second pattern with delay&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; _delay_ms(300);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; lcd_data(position,0);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; lcd_data(' ',1);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; i++;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; position++;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;lcd_data(0x01,1);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;return 0;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;while(1);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;}&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;br /&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;i&gt;&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;WORKING VIDEO:&lt;/span&gt;&lt;/i&gt;&lt;/h3&gt;
&lt;br /&gt;
&lt;div align="center"&gt;
&lt;iframe allowfullscreen="" frameborder="0" height="475" src="https://www.youtube.com/embed/5KhsDZZMYuo" width="580"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;b&gt;&lt;i&gt;&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/h3&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;b&gt;&lt;i&gt;&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;NOTE:&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Use 5x10 matrix to use the complete pixel for your pattern.&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Specify appropriate time delay when running your pattern as an animation.&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Working video of this animation will be added shortly.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjw_rxCnhgO1pFoDilwFc9ngtFK3RtnRh-ePxykTHFHrBV0sSfwfUxwFYue-JpOvnvOJU64oe9uVFiRkWvDVE0LFgj3bekEgCERP3yA1294O192g9GF5s25lWjbIThwL6b-MSh6ot2iYgs/s72-c/pacman-151558_640.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>Frankpunter@gmail.com (Anonymous)</author></item><item><title>Musical Greeting Card circuit using UM66 IC</title><link>http://gadgetronicx.blogspot.com/2015/03/musical-greeting-card-circuit-um66t-ic.html</link><category>audio circuits</category><category>electronic circuits</category><category>hobby circuits</category><pubDate>Fri, 6 Mar 2015 09:14:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-44917801884187835.post-2617388837502410450</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpz0uj9MKhLBCVBNAHSeISxNAsdIklOfTMUCuohvAflHftfy_CVUyZkDAKolxzAuK8xq2P-SV18A4qrbu-4ljfMchsXOBQ-6_reTHh6d9i2NUlN4Doa1puBqXglLyfSCBC9eUw6RmoTW4/s1600/love-card_niketavora28_paper-quilling01.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="greeting-card" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpz0uj9MKhLBCVBNAHSeISxNAsdIklOfTMUCuohvAflHftfy_CVUyZkDAKolxzAuK8xq2P-SV18A4qrbu-4ljfMchsXOBQ-6_reTHh6d9i2NUlN4Doa1puBqXglLyfSCBC9eUw6RmoTW4/s1600/love-card_niketavora28_paper-quilling01.jpg" height="405" title="musical greeting card" width="580" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Musical greeting cards quite are popular during special occasions all around the world and we all would have presented this thing to our dear ones. But ever tried making one by your own if not, its time to build one. Here is a simple Musical greeting circuit you can try out easily in your home, also the cost required to build this thing is pretty low.&lt;/span&gt;&lt;/div&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;i&gt;&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;SCHEMATIC:&lt;/span&gt;&lt;/i&gt;&lt;/h3&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJ-c6G5_etnlyYx-1ma3KLrmZl_XKNA-MOj0BTdEHiBm18I9hhAPJ5p_Um9a_buUyU5OxShlGWOkqC9ZNsDAczCLHukf3itXwNX6MSpEPhayavnKzLymVbgYaBYUdTVXrPg1As_3U73kg/s1600/musical-greeting-card-circuit.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"&gt;&lt;img alt="make-diy-musical-greeting-card-circuit-diagram" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJ-c6G5_etnlyYx-1ma3KLrmZl_XKNA-MOj0BTdEHiBm18I9hhAPJ5p_Um9a_buUyU5OxShlGWOkqC9ZNsDAczCLHukf3itXwNX6MSpEPhayavnKzLymVbgYaBYUdTVXrPg1As_3U73kg/s1600/musical-greeting-card-circuit.png" height="456" title="diy musical greeting card circuit" width="640" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;i&gt;&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;UM66TXX SERIES IC's:&lt;/span&gt;&lt;/i&gt;&lt;/h3&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The UM66TXX is a simple CMOS IC which was designed specifically to be used in this kind of simple melody/tone generation circuits. It consists of a on chip ROM programmed with particular music or tone and named based on the tone. Since it was produced by using CMOS technology it consumes only less power which proves to be a great advantage. Here is the list of IC's with programmed tones.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: left;"&gt;
&lt;/div&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;UM66T01 - Jingle bells + Santa is coming to town + We wish you a merry xmas&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;UM66T02 - Jingle Bells&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;UM66T04 - Jingle Bells + Rudolph the red nosed reindeer + Joy to the world&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;UM66T05 - Home sweet home&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;UM66T06 - Let me call you Sweetheart&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;UM66T08 - Happy Birthday to you &amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;UM66T09 - Wedding march &amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;UM66T11 - Love Me Tender, Love me True&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;UM66T13 - Easter Paradise&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;UM66T19 - For Elise&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;UM66T32 - Waltz &amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;UM66T33 - Mary Had a little Lamb&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;UM66T34 - The train is Running fast UM66T68&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;i&gt;&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;/h3&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;i&gt;&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;USE OF REED SWITCH:&lt;/span&gt;&lt;/i&gt;&lt;/h3&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWrRhSsvG1P6qNaEaU2yl0Di2n3zcPLdV6XioNUdGvc26vP6Gm2Lpb3KAePrg7w-c9ELN4Tdl_ImiNPc7AiST-HZ6pjqEekwckgfPtFkR9XOAZX3Pv3A1ZGTTeO45yj1C_oEI3Jd5-UJE/s1600/reed-switch2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="reed-switch-diagram" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWrRhSsvG1P6qNaEaU2yl0Di2n3zcPLdV6XioNUdGvc26vP6Gm2Lpb3KAePrg7w-c9ELN4Tdl_ImiNPc7AiST-HZ6pjqEekwckgfPtFkR9XOAZX3Pv3A1ZGTTeO45yj1C_oEI3Jd5-UJE/s1600/reed-switch2.jpg" height="256" title="reed switch" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;You might have seen that musical greeting card uses leaf or slider switch which activates the toner when you open it. The major problem with those type of switches is that the link gets weaker with time due to usage and gradually the circuit gets activated even when the card is in closed position. This will be annoying most of the times.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;To overcome the above drawback reed switch was used here which uses magnetic force for activation. So there won't be any undesirable activation of the tone generator part in our circuit. Place the magnet in one side of the card and the rest of the circuit in opposite side. Make sure that magnet touches the reed switch when the card is closed.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h3 style="text-align: justify;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;WORKING OF CIRCUIT:&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The working of the circuit begins with the Reed switch which gets activated whenever it comes in contact with a magnet. Affix the magnet in one side of the card and the entire circuit is other side of your card. When the card was in closed state, reed switch will be in closed state and this makes the base of the PNP transistor to be in positive potential i.e more than 0.7 v which forces it to off state.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Opening of the card will force the magnet to break its force of attraction and the reed switch will be in open state now. Then the resistor R2 will pull the base to ground potential. This makes the PNP transistor Q2 2N3906 to switch on and this in turn turns the IC UM66T08 on.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;When the IC is turned on The output of IC was fed in to the base of the NPN transistor Q1 &amp;nbsp;and this supplies the required current for the sounding element to operate. Finally we can get our desired tone/melody from the piezo sounder. In the above circuit IC UM66T08 was used which contains "Happy Birthday to you" tone programmed within it.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3 style="text-align: justify;"&gt;
&lt;i&gt;&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;NOTE:&lt;/span&gt;&lt;/i&gt;&lt;/h3&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;You can use the primitive leaf or slider switch with the above circuit instead of reed switch, in that case eliminate R1,R2 and Q2 and connect the switch end directly to the VCC pin of the IC.&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Make sure that the magnet and switch was placed in such a way that it touches each other when the card is closed.&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The above circuit generates "Happy Birthday tone", however if you need any other tone choose the respective UM66TXX IC from the above given list.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpz0uj9MKhLBCVBNAHSeISxNAsdIklOfTMUCuohvAflHftfy_CVUyZkDAKolxzAuK8xq2P-SV18A4qrbu-4ljfMchsXOBQ-6_reTHh6d9i2NUlN4Doa1puBqXglLyfSCBC9eUw6RmoTW4/s72-c/love-card_niketavora28_paper-quilling01.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>Frankpunter@gmail.com (Anonymous)</author></item><item><title>Vertical Flip with Caption display using CSS and HTML</title><link>http://gadgetronicx.blogspot.com/2015/02/vertical-flip-caption-hover-effect-css.html</link><category>CSS codes</category><category>HTML codes</category><pubDate>Fri, 27 Feb 2015 20:39:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-44917801884187835.post-3874959421576541338</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhf2fr5V98b2kR-MANBlJquJj2FjtE1MK0UocPAFPQaaqNR6Owb0OsqYLBdyYE7Yp_G3EdIHjWdGb_pSG4via329-6kFykVk3fwzdowW6hmUlv4rsQKkp1-Kp3IdboVaNc7dOTfOYeyWxU/s1600/o-140556731-900.jpg" imageanchor="1"&gt;&lt;img alt="ice-cave-cool-image-hover-effect-css-html" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhf2fr5V98b2kR-MANBlJquJj2FjtE1MK0UocPAFPQaaqNR6Owb0OsqYLBdyYE7Yp_G3EdIHjWdGb_pSG4via329-6kFykVk3fwzdowW6hmUlv4rsQKkp1-Kp3IdboVaNc7dOTfOYeyWxU/s1600/o-140556731-900.jpg" height="426" title="Ice cave" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Captions play a significant role in almost all the pictures in a website. So it is important to add one to our images and will be even cooler if we add it along with a hover effect. This article will demonstrate demonstrate the method of adding caption to your image with a vertical flip hover effect.&lt;/span&gt;&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: center;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;a class="button-blue" href="http://www.gadgetronicx.com/p/blog-page_9.html" rel="nofollow" style="color: white; text-style: none;" target="_blank"&gt;VIEW DEMO&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;h3&gt;
&lt;i&gt;&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;CSS CODE:&lt;/span&gt;&lt;/i&gt;&lt;/h3&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;table style="background-color: #3c98ff; width: 100%;"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;ol style="color: white; text-align: left;"&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;#card {&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;width:250px;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;height:250px;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;position:relative;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;-webkit-transform-style: preserve-3d;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;-webkit-transform-origin: 100% 75px;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;-webkit-transition: all 0.7s ease;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;transform-style: preserve-3d;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;transform-origin: 100% 75px;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;transition: all 0.7s ease;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;#frame:hover #card {&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;-webkit-transform: rotateX(-180deg);&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;transform: rotateX(-180deg);&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;#front_pos, #back_pos {&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;width:250px;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;height:250px;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;position:absolute;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;left:0;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;-webkit-backface-visibility:hidden;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;backface-visibility:hidden;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;#back_pos {&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;position:absolute;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;bottom:170px;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;font-size:30px;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;color:#fff;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;-webkit-transform: rotateX(180deg);&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;transform: rotateX(180deg);&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;text-align:center;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The property "&lt;span style="background-color: #cfe2f3;"&gt;transform:rotateY(-180deg)&lt;/span&gt;" flips the front image to 180 degree revealing the image in the back when the container is hovered. "&lt;span style="background-color: #cfe2f3;"&gt;backface-visibility:hidden&lt;/span&gt;" is used to hide the alternate image so that a single image is displayed at an instant. The "&lt;span style="background-color: #cfe2f3;"&gt;#front_pos&lt;/span&gt;" and "&lt;span style="background-color: #cfe2f3;"&gt;#back_pos&lt;/span&gt;" defines the properties of the image before flipping and after flipping.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;h3&gt;
&lt;i&gt;&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;HTML CODE:&lt;/span&gt;&lt;/i&gt;&lt;/h3&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;table style="background-color: #3c98ff; width: 100%;"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;ol style="color: white; text-align: left;"&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;lt;div id="frame"&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;lt;div id="card"&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;img id="front_pos" src="Your image URL" alt="img"/&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;p id="back_pos"&amp;gt;Your text&amp;lt;/p&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The HTML part of this code is pretty straightforward. All you have to do is to place the elements in "div" container with respective ID's.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhf2fr5V98b2kR-MANBlJquJj2FjtE1MK0UocPAFPQaaqNR6Owb0OsqYLBdyYE7Yp_G3EdIHjWdGb_pSG4via329-6kFykVk3fwzdowW6hmUlv4rsQKkp1-Kp3IdboVaNc7dOTfOYeyWxU/s72-c/o-140556731-900.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>Frankpunter@gmail.com (Anonymous)</author></item><item><title>60W simple inverter using Transistors </title><link>http://gadgetronicx.blogspot.com/2015/02/60w-simple-inverter-using-transistors.html</link><category>electronic circuits</category><category>Inverter circuits</category><pubDate>Sun, 22 Feb 2015 18:21:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-44917801884187835.post-4097160980803170111</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrnm4v1BYzZD-kSdbgfpgUq3rzBb8eYFZqom6JF4lU3zluy_eQqbhgavXxtdcnPhNk2HohpfK4l5gcZVpWXMtKii7awMJ8TWF0nFjZl6sNH42hhg8Htf1MfTf-ZikmdSuC-35-nImK1EE/s1600/60w-inverter-using-transistors.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="60-watt-inverter-using-transistors" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrnm4v1BYzZD-kSdbgfpgUq3rzBb8eYFZqom6JF4lU3zluy_eQqbhgavXxtdcnPhNk2HohpfK4l5gcZVpWXMtKii7awMJ8TWF0nFjZl6sNH42hhg8Htf1MfTf-ZikmdSuC-35-nImK1EE/s1600/60w-inverter-using-transistors.png" height="364" title="60W inverter" width="700" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Inverters are handy piece of equipment we could use whenever we face a power shut down or in a place where wiring is not possible. There are many types of inverters available in market from cheap one to expensive ones. Each differ with their functionality and the load they could handle. This tutorial brings out the design to build a simple inverter using transistors.&lt;/span&gt;&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h3 style="text-align: justify;"&gt;
&lt;i&gt;&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;WORKING:&lt;/span&gt;&lt;/i&gt;&lt;/h3&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Astable multivibrator using transistor will form the backbone of the above circuit. The complementary pulse output and the normal pulse is fed into the darlington pair of transistors formed by Q3 &amp;amp; Q4 and Q5 &amp;amp; Q6 . In darlington pair two transistors was connected in such a way current amplified by the first transistor is further amplified by the second one. Two dalrington pairs was used here since the current given the multivibrator is very less.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The signal from the darlington pair of transitsors was then fed to transistors Q7 and Q8 which was wired in push pull configuration. Each of the transistor Q8 and Q7 will amplify the positive and negative half cycles of the input wave. The amplified output is then fed to the transformer and then to the load.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;As the astable multivibrator switches back and forth, it alternately turns on the two power transistors. The current in the transformer flows from the tap to the ends of the windings in opposite directions, causing the output to the desired AC. The current flows from +12V, through the windings, through the power transistors to ground.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;12V center tapped transformer was used in this circuit. The current rating of the transformer can be chosen based on the load you are about to use along with this circuit. Heatsinks can be added along with the output stage transistors to avoid overheating. This inverter is also called digital inverter since it was driven by square wave rather than by using a sine wave.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrnm4v1BYzZD-kSdbgfpgUq3rzBb8eYFZqom6JF4lU3zluy_eQqbhgavXxtdcnPhNk2HohpfK4l5gcZVpWXMtKii7awMJ8TWF0nFjZl6sNH42hhg8Htf1MfTf-ZikmdSuC-35-nImK1EE/s72-c/60w-inverter-using-transistors.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>Frankpunter@gmail.com (Anonymous)</author></item><item><title>4 Bit LCD interface and programming with PIC Microcontroller</title><link>http://gadgetronicx.blogspot.com/2015/02/4-bit-lcd-interface-programming-pic.html</link><category>embedded C tutorials</category><category>PIC Microcontroller</category><pubDate>Thu, 19 Feb 2015 20:56:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-44917801884187835.post-3002859294501107131</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div dir="ltr"&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHEmYvt-mDhB4BVpG-Lg3hCnMbnZYYkeLIzJ1foHV2ptsO75C_gksXfFMpEqVNYVyKAGhFPQsHy61bFsfSU6FIDIAjGPQsNswZYUtyrS8F_HYk9dbM6L55HcUsEsX2WxZstnJAaqePrpU/s1600/4-bit-lcd-interface.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="4-bit-lcd-programming-pic-microcontroller-interfacing" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHEmYvt-mDhB4BVpG-Lg3hCnMbnZYYkeLIzJ1foHV2ptsO75C_gksXfFMpEqVNYVyKAGhFPQsHy61bFsfSU6FIDIAjGPQsNswZYUtyrS8F_HYk9dbM6L55HcUsEsX2WxZstnJAaqePrpU/s1600/4-bit-lcd-interface.png" height="440" title="4 bit lcd programming with pic" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;LCD displays operate in two modes 4 bit and 8 bit mode. We all might have been familiar with 8 bit mode which is used widely in several systems. But 4 bit mode is something which many of us is not aware of. This mode has some advantages over the 8 bit mode out of which reduction of dedicated data pins is most important.&amp;nbsp;This tutorial will teach you to interface the LCD in 4 bit with your controller as well as programming it.&lt;/span&gt;&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h3 style="text-align: justify;"&gt;
&lt;i&gt;&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;WHAT IS 4 BIT MODE:&lt;/span&gt;&lt;/i&gt;&lt;/h3&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;We all knew that LCD consists of 8 data pins D0-D7 to receive the data and commands from the Microcontroller. However when developing a complex systems dedicating a complete port i.e 8 pins might be a drawback. To overcome this the LCD controller is capable of running in dual modes 8 bit and 4 bit mode.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;8 Bit mode is a normal mode which uses 8 data lines, rs and enable for lcd functioning, see &lt;a href="http://www.gadgetronicx.com/2014/08/16x2-lcd-keypad-interface-pic-microcontroller.html" rel="nofollow" target="_blank"&gt;programming LCD in 8 bit mode&lt;/a&gt;. However in 4 bit mode only 4 lines D4-D7, along with RS,RW and EN pins are used. This will save us 4 pins of our controller which we might employ it for other purpose.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;In 4 Bit mode the data bytes are sliced into two four bits and are transferred in the form of &amp;nbsp;a nibble. And the rest of the pin functions such as RS,RW and EN remains same. The above design illustrates the connection diagram of a 16x2 LCD with PIC microcontroller in 4 bit mode.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h3 style="text-align: justify;"&gt;
&lt;i&gt;&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;INITIALIZING THE LCD:&lt;/span&gt;&lt;/i&gt;&lt;/h3&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The first step in coding the LCD is initializing the LCD connected by giving the commands as input through the data line D4-D7 in the fom of Nibbles. For initializing the LCD following a specific reset sequence should be given and then initialized to follow the 4 bit mode.&lt;/span&gt;&lt;/div&gt;
&lt;ol style="text-align: left;"&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Place the byte in D4-D7 pins of LCD and set the EN pin to high and then make it low with time delay of 10ms between them.&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Send 28H command to use 2 lines 5x7 matrix in 4 bit mode.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Send 0FH for making the LCD,cursor and Cursor blinking ON.&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Send 06H for incrementing cursor position.&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Finally 01 and 02 for clearing screen and returning home.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;h3 style="text-align: justify;"&gt;
&lt;i&gt;&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;DATA/COMMAND TRANSMISSION TO THE LCD:&lt;/span&gt;&lt;/i&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The data transmission to a LCD must be performed by means of assigning logic states to three pins RS and E. R/W pin is not needed so we can ground it as shown in the schematic diagram. The data is send to the module by following these steps.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ol style="text-align: left;"&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;RS pin should be high to convey LCD a data transmission is going to take place.&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Place the Upper nibble in the lower four bits of Port 2 by means of bit shifting and mask the upper four bits.&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Pulse En pin from high to low with certain time delay for transmission to complete.&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Now place the lower nibble and mask the rest of the bits, then repeat step 3.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;CODE:&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;This code was built using CCS compiler for PIC microcontroller.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;table style="background-color: #3c98ff; width: 100%;"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;ol style="color: white; text-align: left;"&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;#include &amp;lt;4_bit_lcd.h&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;#byte LCD=0x08&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;#byte TRIS_LCD=0x88&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;#define ENABLE 0x20&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;#define REG_SL 0x10&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;void lcd_reset() &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Reset sequence as stated in the LCD datasheet&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;{&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;LCD = 0xFF; &amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;LCD = 0x03|ENABLE;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;delay_ms(2);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;LCD = 0x03;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;delay_ms(2);&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;LCD = 0x03|ENABLE;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;delay_ms(2);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;LCD = 0x03;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;delay_ms(2);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;LCD = 0x03|ENABLE;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;delay_ms(2);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;LCD = 0x03;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;delay_ms(2);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;LCD = 0x02|ENABLE;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;delay_ms(2);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;LCD = 0x02;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;delay_ms(2);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;}&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;void lcd_cmd(char cmd) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Subroutine to send command &amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;{ &amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; LCD = ((cmd&amp;gt;&amp;gt;4)&amp;amp;0x0F)|ENABLE;//Sending higher nibble by shifting with Pulsing ENABLE high delay();&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; delay_ms(2);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; LCD = ((cmd&amp;gt;&amp;gt;4)&amp;amp;0x0F);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; delay_ms(2);&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; LCD = (cmd &amp;amp; 0x0F)|ENABLE;//Sending lower nibble ENABLE low&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; delay_ms(2);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; LCD = (cmd &amp;amp; 0x0F);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; delay_ms(2);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;}&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;void lcd_data (char *dat) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Subroutine to send data &amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;{ &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; while(*dat!='\0')&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;LCD = ((*dat&amp;gt;&amp;gt;4)&amp;amp;0x0F)|0x30;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;delay_ms(2);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;LCD = (((*dat&amp;gt;&amp;gt;4)&amp;amp;0x0F)|REG_SL);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;delay_ms(2);&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;LCD = ((*dat &amp;amp; 0x0F)|ENABLE|REG_SL);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;delay_ms(2);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;LCD = ((*dat &amp;amp; 0x0F)|REG_SL);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;delay_ms(2);&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;dat++;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;delay_ms(2);&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;}&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;void lcd_init () &amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;{&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;lcd_cmd(0x28); &amp;nbsp; &amp;nbsp; &amp;nbsp; // 4-bit mode - 2 line - 5x7 font. &amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;lcd_cmd(0x0F); &amp;nbsp; &amp;nbsp; &amp;nbsp; // Display cursor with blink.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;lcd_cmd(0x06); &amp;nbsp; &amp;nbsp; &amp;nbsp; // Automatic Increment - No Display shift. &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;lcd_cmd(0x01); &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;lcd_cmd(0x02); &amp;nbsp; &amp;nbsp; &amp;nbsp; //Clear screen and return home&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;lcd_cmd(0x80); &amp;nbsp; &amp;nbsp; &amp;nbsp; // First row first column &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;} &amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;void main() &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;{ &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;char msg[]="GADGETRONICX";&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;TRIS_LCD=0x00;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;lcd_reset(); &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;lcd_init(); &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;lcd_data(msg); &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;while(TRUE); &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;}&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;br /&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;i&gt;&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;NOTE:&lt;/span&gt;&lt;/i&gt;&lt;/h3&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The delay required by the LCD for processing data and command depends on the LCD. So in case if you face any trouble in displaying character on LCD try increasing the delay between the enable pulse.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHEmYvt-mDhB4BVpG-Lg3hCnMbnZYYkeLIzJ1foHV2ptsO75C_gksXfFMpEqVNYVyKAGhFPQsHy61bFsfSU6FIDIAjGPQsNswZYUtyrS8F_HYk9dbM6L55HcUsEsX2WxZstnJAaqePrpU/s72-c/4-bit-lcd-interface.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>Frankpunter@gmail.com (Anonymous)</author></item><item><title>Code lock circuit using dual flip flop IC CD4013</title><link>http://gadgetronicx.blogspot.com/2015/02/code-lock-circuit-dual-flip-flop-cd4013.html</link><category>electronic circuits</category><category>locking circuits</category><pubDate>Sun, 15 Feb 2015 16:06:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-44917801884187835.post-2198727703078642929</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvCQnaZpZy1CkP_L7yJhV8Hm4Y4M0pZQcmXn1DBHL8iLsEk0Gd89xJhje1X-Grd24ZraYOBOUG3yaEU3ZZFePEiNO7Rk7EYbxNGel-mkh8jAwPipUl_sCI67pCDo9-2SuScBKAtmARs1M/s1600/code-lock-circuit-diagram.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="code-lock-electronic-lock-circuit-cd4013" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvCQnaZpZy1CkP_L7yJhV8Hm4Y4M0pZQcmXn1DBHL8iLsEk0Gd89xJhje1X-Grd24ZraYOBOUG3yaEU3ZZFePEiNO7Rk7EYbxNGel-mkh8jAwPipUl_sCI67pCDo9-2SuScBKAtmARs1M/s1600/code-lock-circuit-diagram.png" height="480" style="margin-left: -20px;" title="Code lock e lock" width="750" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Electronic Locks are highly useful to protect our possession and it was widely used in all places. The demand for Electronic locks is high since it offer high security and easy to handle rather than the mechanical locks. Most of the E-locks in the market are cost more and not everyone could afford buying these locks. The circuit above can be a best solution for those who want to build an effective and low cost Electronic lock.&lt;/span&gt;&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h3 style="text-align: justify;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;WORKING OF CIRCUIT:&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;This code lock circuit was build around two D type Flip Flops IC's CD4013. The operation of a single D type Flip flop unit is very important to understand the working principle of the above circuit. The operation of a D type Flip flop is as follows: Any input appearing at the data input D during present state will appear at pin Q &amp;nbsp;during the next clock cycle. This operation principle forms backbone of the above code locker. The below truth table of IC CD4013 might give you the idea of its working.&lt;/span&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipEGIE-gMFET7LTMHBZyyXko0_MC8WN06ldPo-4gYNhvCb6I0qKj1RcY3VmgjfBUNuAq3s1IxmwoYTNCuCwlZMVbdpPHI6a0e22QTl9J6CLIo0P_57JIA7FG0ntpOlBN_d4GHcGpJYaVo/s1600/truth-table-cd4013.JPG" imageanchor="1"&gt;&lt;img alt="excitation-table-cd4013" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipEGIE-gMFET7LTMHBZyyXko0_MC8WN06ldPo-4gYNhvCb6I0qKj1RcY3VmgjfBUNuAq3s1IxmwoYTNCuCwlZMVbdpPHI6a0e22QTl9J6CLIo0P_57JIA7FG0ntpOlBN_d4GHcGpJYaVo/s1600/truth-table-cd4013.JPG" height="226" title="excitation table" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;In the above circuit the Switches 1,3,5,8 are wired to feed the clock pulse to each flip flop units U1:A,U1:B,U2:A and U2:B. Therefore the password for the above locker is "1358" and should be pressed in the given sequence. Now take a look at the first state of the given table where it was stated that when positive edge clock was fed in to the CLK pin of the IC when Data pin D was in low 0 state will result in Low and high state in Q and Q' pins of the IC. This state was used in the whole circuit.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Initially D pin of the U1:A is grounded and this in turn gives low output at pin 1 Q when positive edge is encountered in the CLK pin of U1:A by pressing switch 1. The Pin 1(Q) was wired to the Data pin 9 of U1:B, this will place the low signal in it. When switch 3 is pressed the positive edge clock is fed to U1:B, this will force the Q pin of U1:B to exhibit low state which was fed in its data input. This process will continue as you press 5 and 8 switches. Finally after switch 8 is pressed the Q pin 13 of U2:B will gives a low signal which in turn turns the PNP transistor ON and therefore the relay gets activated.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;When anything other than the Password switches "1358" is pressed Q pin of the &amp;nbsp;all the flips flops will obtain high 1 state as shown in the above table. Therefore the locker will remain in lock state. Pull down resistors R2,R3,R4 and R5 was used to ensure that the CLK pin was in low state before feeding the input pulse. A diode was added along with the relay to prevent the reverse flow of current which might damage the IC.&lt;/span&gt;&lt;/div&gt;
&lt;h3 style="text-align: justify;"&gt;
&lt;i&gt;&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;/h3&gt;
&lt;h3 style="text-align: justify;"&gt;
&lt;i&gt;&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;NOTE:&lt;/span&gt;&lt;/i&gt;&lt;/h3&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;You can change the password sequence by appropriate wiring to the CLK pins of each flip flop units.&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The VDD(power) and VSS(ground) pins of the IC was omitted for simplification of the schematic.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Sometimes the IC 4013 may not start with high state on start up, in that case add a power on reset circuitry to the reset pins of flip flops.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvCQnaZpZy1CkP_L7yJhV8Hm4Y4M0pZQcmXn1DBHL8iLsEk0Gd89xJhje1X-Grd24ZraYOBOUG3yaEU3ZZFePEiNO7Rk7EYbxNGel-mkh8jAwPipUl_sCI67pCDo9-2SuScBKAtmARs1M/s72-c/code-lock-circuit-diagram.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>Frankpunter@gmail.com (Anonymous)</author></item><item><title>How to build a multiple effect lighting circuit</title><link>http://gadgetronicx.blogspot.com/2015/02/build-multiple-effect-led-lighting-circuit.html</link><category>electronic circuits</category><category>IC 555 circuits</category><category>LED circuits</category><pubDate>Sun, 8 Feb 2015 17:38:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-44917801884187835.post-372126507686805243</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div class="blogaway-section"&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjT_vlYgVv1ujNKKpG6MHUKnvtiHM9wG0IsnHpofpjBwhdLzItNjF5OuJTqsf0vOT1YZpg9PwgbDSBrqOsDJy466q-KmSxPqtr1_4mFqMDoH5MPAhBm5C3ibUQHEfBBW0JrxaZSeKgwPS8/s1600/Custom_RC_LED_Light_Set_you_design.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="decorative-leds-room-home" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjT_vlYgVv1ujNKKpG6MHUKnvtiHM9wG0IsnHpofpjBwhdLzItNjF5OuJTqsf0vOT1YZpg9PwgbDSBrqOsDJy466q-KmSxPqtr1_4mFqMDoH5MPAhBm5C3ibUQHEfBBW0JrxaZSeKgwPS8/s1600/Custom_RC_LED_Light_Set_you_design.jpg" height="410" title="decorative led" width="570" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif; text-align: justify;"&gt;LED lighting have a great demand since it consumes less power also have a increased life time. Also LED allows us to create beautiful lighting than the normal ones. Here is a similar lighting circuit which uses the concept of PWM to alter the LED lighting rate which in turn gives multiple lighting effects and be used to decorate your home.&lt;/span&gt;&lt;/div&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;i&gt;&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;CIRCUIT DESIGN:&lt;/span&gt;&lt;/i&gt;&lt;/h3&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTr3w3XlSN0OPCHBwGopKIXEwXgwcJzNHxtfB-c4xpRBDh4knSAFrcsxuOmYRF-ZQ_awrVZBZrotzHbFLhC5Dp-EbdER_Zm2t7CPYD4XkW2mLKGdiJlPcFD5HBmczpEJ-GbRwi0dwSno8/s1600/multiple-effects-led-circuits-555.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"&gt;&lt;img alt="multiple-led-lighting-circuit-ic-555" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTr3w3XlSN0OPCHBwGopKIXEwXgwcJzNHxtfB-c4xpRBDh4knSAFrcsxuOmYRF-ZQ_awrVZBZrotzHbFLhC5Dp-EbdER_Zm2t7CPYD4XkW2mLKGdiJlPcFD5HBmczpEJ-GbRwi0dwSno8/s1600/multiple-effects-led-circuits-555.png" height="518" title="multiple led lighting" width="720" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;i&gt;&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;WORKING OF CIRCUIT:&lt;/span&gt;&lt;/i&gt;&lt;/h3&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;555 Timer IC forms the center piece which was wired as a simple astable multivibrator in the above circuit. We all are aware that the astable mutivibrator gives out square pulse as output. The frequency, time period and duty cycle of the pulse was decided by the three Key components R1, R2 and C2. These components affects the capacitor charging rate and time taken to switch output states in a timer IC.&lt;/span&gt;&lt;br /&gt;
&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJ50MrSri-5jNZuFBOHn-Jq1H6UcETGh_s1iCdf7x5QAjVwLDZK3PaoP1lh_1hPiM9MwWoYmEhnOMGql_uvYmAjWylOBFPRCKYDTtgXgWokJNI-ocu0IH9K2vZO4zSVbb0RGBUdvqgO8M/s1600/pwm-signal.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img alt="PWM-signal-diagram" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJ50MrSri-5jNZuFBOHn-Jq1H6UcETGh_s1iCdf7x5QAjVwLDZK3PaoP1lh_1hPiM9MwWoYmEhnOMGql_uvYmAjWylOBFPRCKYDTtgXgWokJNI-ocu0IH9K2vZO4zSVbb0RGBUdvqgO8M/s1600/pwm-signal.png" height="236" title="PWM-signal" width="400" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class="tr-caption" style="font-size: 12.8000001907349px;"&gt;PWM signal&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;This is where the PWM is employed which alters the duty cycle of the output pulse. Duty cycle defined as the time period in which the signal is active, expressed in percentage (%). Altering the duty cycle will provide variation in LED on times and this provides a beautiful lighting effect. The duty cycle of the 555 was governed by the equation&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: center;"&gt;
&lt;span style="font-family: Times, Times New Roman, serif;"&gt;&lt;b&gt;&lt;i&gt;Duty Cycle = (R1+R2) / (R1+2R2) %&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The above circuit was provided with a simple single pole triple throw rotary switches which allow us to alter the duty cycle with ease. According to the equation given above the R1 and R2 decides the duty cycle fatcor in the outout pulse. So when&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;R1=200 ohm and R2=5K the duty cycle will be&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: center;"&gt;
&lt;span style="font-family: Times, Times New Roman, serif;"&gt;&lt;b&gt;&lt;i&gt;Duty cycle = (200+5K)/(200+2(5K))= 50 %&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Likewise 2.7K and 10K of R1 will result in 60 and 70 percentage of duty cycle. Capacitor C2 can be changed if you need to alter the frequency of the output waveform.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Next comes the lighting stage, the output of the 555 is not enough to drive many LED's to produce the lighting. So transistors was used as a switch to turn ON the LED's connected to it. Two transistors NPN and PNP was used in the above circuit to make the lighting effect even cooler.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The NPN transistor &amp;amp;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;the LED's connected to it&lt;/span&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;turns on whenever there is a high pulse from the 555 and it &amp;nbsp;will stay on as long as the high pulse remains. And when the 555 switches its state to low the transistor Q1 and led's connected to it turns off &amp;nbsp;but PNP transistor Q2 and led's connected to it gets lighten up producing a beautiful lighting effect.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The circuit is capable of producing effects like wave, disco and lots more. Try wiring the LED's in different patterns to get even cooler lighting effects.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h3 style="text-align: justify;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;NOTE:&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;You can increase add or change resistors R1 based on the calculations to obtain altered duty cycle in the output.&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Additional capacitors C2 and rotary switches can be added to get altered frequency in the output.&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Multiple combination of LED's can be used in the above circuit.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjT_vlYgVv1ujNKKpG6MHUKnvtiHM9wG0IsnHpofpjBwhdLzItNjF5OuJTqsf0vOT1YZpg9PwgbDSBrqOsDJy466q-KmSxPqtr1_4mFqMDoH5MPAhBm5C3ibUQHEfBBW0JrxaZSeKgwPS8/s72-c/Custom_RC_LED_Light_Set_you_design.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>Frankpunter@gmail.com (Anonymous)</author></item><item><title>Interfacing Bluetooth module HC05 with 8051 Microcontroller</title><link>http://gadgetronicx.blogspot.com/2015/02/interfacing-hc05-bluetooth-module-8051.html</link><category>8051 programs</category><category>embedded C tutorials</category><pubDate>Wed, 4 Feb 2015 10:30:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-44917801884187835.post-6671035319056546097</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfi26IJfLcyZ7GPiwFecmIe0GbAiMFqmLnHrXfh3ZyOYirAOU0pxit11P9e_MYZUqyxWjgVdNVBt0fV5GtJvvOIWiGEGn1p8YpX-klO-bS3limY2YRpo9IPvyADTXzqKPCwYkPhYL8DeU/s1600/HC-05-Wireless-Bluetooth-Transceiver-Modul-RS232-TTL-Host-Slave-Integration_b2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="HC05-bluetooth-BT-module-pin-diagram" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfi26IJfLcyZ7GPiwFecmIe0GbAiMFqmLnHrXfh3ZyOYirAOU0pxit11P9e_MYZUqyxWjgVdNVBt0fV5GtJvvOIWiGEGn1p8YpX-klO-bS3limY2YRpo9IPvyADTXzqKPCwYkPhYL8DeU/s1600/HC-05-Wireless-Bluetooth-Transceiver-Modul-RS232-TTL-Host-Slave-Integration_b2.jpg" height="350" title="Bluetooth Module" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div dir="ltr"&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Bluetooth technology creates a big evolution in way the devices communicate with each other. So it is important to learn interfacing Bluetooth with our MCU's to build extended system also it offers facility to wireless control. This tutorial focuses in interfacing Bluetooth module HC05 with 8051 microcontroller.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div dir="ltr"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir="ltr"&gt;
&lt;i&gt;&lt;b&gt;&lt;span style="font-family: Times, Times New Roman, serif;"&gt;At the end of this tutorial you will be able to: &lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;div style="text-align: justify;"&gt;
- &lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Program and interface Bluetooth module with 8051 &lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;- Send and receive data's using 8051 via Bluetooth. &lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;- Build and control any system using Bluetooth devices such as mobile phone ,PC, tablets etc.&lt;/span&gt;&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div dir="ltr"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir="ltr"&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;HC05:&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;/div&gt;
&lt;div dir="ltr"&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;A Bluetooth module widely used with Microcontroller to enable Bluetooth communication. This module cam be interfaced using the UART in 8051 microcontroller where the data are transmitted in the form of packets. The pins TX and RX pin of the HC 05&amp;nbsp; form the path for data transmission and reception. These TX pin&amp;nbsp; of &amp;nbsp;HC05 must be connected to the RX pin of 8051 and vice versa. Whereas the key pin of the module is used to set the password for pairing the module with our devices.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style="text-align: center;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;a class="button-blue" href="http://www.rcscomponents.kiev.ua/datasheets/hc_hc-05-user-instructions-bluetooth.pdf" rel="nofollow" target="_blank"&gt;DATASHEET&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div dir="ltr"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir="ltr"&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;APPLICATION:&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;/div&gt;
&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCd1CeMqsJNWiC0wOt7hIENcA5ljpA9_4zk81lAQVCXToX2NMGGZHcPRXkzI7B5IAr9jhlr76U5Y2GZsVgTUS9BcKqcTDJUjg0iEt1uUq7-DUMIaVrk_pAIoEEineaauxrTeGoydo_9kM/s1600/unnamed.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img alt="Bluetooth-terminal-application" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCd1CeMqsJNWiC0wOt7hIENcA5ljpA9_4zk81lAQVCXToX2NMGGZHcPRXkzI7B5IAr9jhlr76U5Y2GZsVgTUS9BcKqcTDJUjg0iEt1uUq7-DUMIaVrk_pAIoEEineaauxrTeGoydo_9kM/s1600/unnamed.png" height="213" title="BT terminal app" width="320" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Snapshot of BT terminal Application&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div dir="ltr"&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Our devices such as mobile and PC's need special applications known as "Bluetooth Terminal" to communicate with our microcontrollers via Bluetooth. Not to worry, there are plenty of apps you can find in the internet. These apps are available in plenty irrespective of the you device OS Android, Windows , Mac whatever it may be. Just run a search such as Bluetooth Terminal for "OS name" and search engines will take you to the destination.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div dir="ltr"&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div dir="ltr"&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;These applications are developed in such a way to send characters through your device BT which was received by the BT module connected with our controller. Even some apps offers some interactive GUI buttons which transmits specific characters with the press of each buttons. Later the received character can be processed in our code and force the controller to perform tasks based on the received character. We can use the Bluetooth communication in two ways, either we can use it to receive data from the Controller or control the system using our device Bluetooth.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div dir="ltr"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir="ltr"&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;DESIGN:&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;/div&gt;
&lt;div dir="ltr"&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSbzI1_SOPnfa8P4e82IJScos6-euDll0gCg1iUBIC3Rf1H7WJpONaLXJdmPO9DnxAYe_qOIE8Srjazr7U8QQEtisoygaIuKjQXbo1nXwtl8k75SXzVD_uq5tghp7A_1VscRNXnCmiqPk/s1600/BT-interface-with-8051-microcontroller.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="bluetooth-interface-with-8051-microcontroller" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSbzI1_SOPnfa8P4e82IJScos6-euDll0gCg1iUBIC3Rf1H7WJpONaLXJdmPO9DnxAYe_qOIE8Srjazr7U8QQEtisoygaIuKjQXbo1nXwtl8k75SXzVD_uq5tghp7A_1VscRNXnCmiqPk/s1600/BT-interface-with-8051-microcontroller.png" height="466" title="BT interface with 8051" width="690" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir="ltr"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir="ltr"&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;i&gt;&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;STEPS TO PROGRAM:&lt;/span&gt;&lt;/i&gt;&lt;/h3&gt;
&lt;/div&gt;
&lt;div dir="ltr"&gt;
&lt;/div&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;This uses Serial Communication or UART protocol in the 8051 , so those who are not familiar with this kindly go through this article on "UART tutorial in 8051" and "UART interrupt" before getting started with BT interface.&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Initialize the Serial communication in 8051 using Timer and serial registers.&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Generate the required baud rate for the communication to take place. The default baud rate of the HC05 is 9600.&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Initialize serial interrupts in case you need to control the tasks performed by your microcontroller or receive data when requested.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;i&gt;&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;SAMPLE CODE:&lt;/span&gt;&lt;/i&gt;&lt;/h3&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The below code was built using Keil uVision 4.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;i&gt;&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;FOR RECEIVING DATA FROM CONTROLLER VIA BT:&lt;/span&gt;&lt;/i&gt;&lt;/h3&gt;
&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Here a specific data can be transmitted whenever a interrupt request occurred from our device via bluetooth. In the below code a processed data was transmitted to our device from the controller when a serial interrupt occurs.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;table style="background-color: #3c98ff; width: 100%;"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;ol style="color: white;"&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;#include&amp;lt;regx51.h&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;int a,b,ans;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;char data[4];&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;void main() &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;{ &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;a=80;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;b=40;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;ans=a+b;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;sprintf(data, "%d", ans);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;TMOD=0x20; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Choosing Timer mode &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;TH1=0xFD; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Selecting Baud Rate &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;SCON=0x50; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Serial mode selection &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;TR1=1; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;IE=0x90; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Enabling Serial Interrupt &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;while(1); &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;}&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;void ser_intr(void)interrupt 4 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Subroutine for Interrupt &amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;IE=0x00;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;short int i;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;for(i=0;i&amp;lt;=2;i++) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Transmitting data&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;SBUF=data[i];&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;while(TI==0);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;TI=0;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;}&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;IE=0x90;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;}&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;div&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;i&gt;&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;/h3&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;i&gt;&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;CODE FOR CONTROLLING CONTROLLER TASKS VIA BT:&lt;/span&gt;&lt;/i&gt;&lt;/h3&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Here a specific task is performed on interrupt occurence in the controller via BT. Consider a Motor was connected in P2.0 &amp;amp; P2.1 of the controller and we are about to control its direction of rotation via BT from our device. Sending character "F" will make the motor to rotate clockwise whereas "R" will make the motor to rotate in anti clockwise direction.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;table style="background-color: #3c98ff; width: 100%;"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;ol style="color: white;"&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;#include&amp;lt;regx51.h&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;sbit mot1=P2^0;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;sbit mot2=P2^1;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;void main()&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;//////////&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;Initialize serial communication and activate interrupts.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;//////////&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;}&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;void ser_intr(void)interrupt 4 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Subroutine for Interrupt &amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;char c;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;IE=0x00;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;while(RI==0);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;c=SBUF;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;if(c=='F'); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Controlling motor&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;mot1=1;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;mot2=0;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;}&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;else if(c=='R')&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;mot1=0;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;mot2=1;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;}&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;IE=0x90;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;}&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;div&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Hope you like this tutorial, leave your queries and feedback in the below comment box.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfi26IJfLcyZ7GPiwFecmIe0GbAiMFqmLnHrXfh3ZyOYirAOU0pxit11P9e_MYZUqyxWjgVdNVBt0fV5GtJvvOIWiGEGn1p8YpX-klO-bS3limY2YRpo9IPvyADTXzqKPCwYkPhYL8DeU/s72-c/HC-05-Wireless-Bluetooth-Transceiver-Modul-RS232-TTL-Host-Slave-Integration_b2.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">5</thr:total><author>Frankpunter@gmail.com (Anonymous)</author><enclosure length="960556" type="application/pdf" url="http://www.rcscomponents.kiev.ua/datasheets/hc_hc-05-user-instructions-bluetooth.pdf"/><itunes:explicit>no</itunes:explicit><itunes:subtitle>Bluetooth technology creates a big evolution in way the devices communicate with each other. So it is important to learn interfacing Bluetooth with our MCU's to build extended system also it offers facility to wireless control. This tutorial focuses in interfacing Bluetooth module HC05 with 8051 microcontroller. At the end of this tutorial you will be able to: - Program and interface Bluetooth module with 8051 - Send and receive data's using 8051 via Bluetooth. - Build and control any system using Bluetooth devices such as mobile phone ,PC, tablets etc. HC05: A Bluetooth module widely used with Microcontroller to enable Bluetooth communication. This module cam be interfaced using the UART in 8051 microcontroller where the data are transmitted in the form of packets. The pins TX and RX pin of the HC 05&amp;nbsp; form the path for data transmission and reception. These TX pin&amp;nbsp; of &amp;nbsp;HC05 must be connected to the RX pin of 8051 and vice versa. Whereas the key pin of the module is used to set the password for pairing the module with our devices. DATASHEET&amp;nbsp; APPLICATION: Snapshot of BT terminal Application Our devices such as mobile and PC's need special applications known as "Bluetooth Terminal" to communicate with our microcontrollers via Bluetooth. Not to worry, there are plenty of apps you can find in the internet. These apps are available in plenty irrespective of the you device OS Android, Windows , Mac whatever it may be. Just run a search such as Bluetooth Terminal for "OS name" and search engines will take you to the destination. These applications are developed in such a way to send characters through your device BT which was received by the BT module connected with our controller. Even some apps offers some interactive GUI buttons which transmits specific characters with the press of each buttons. Later the received character can be processed in our code and force the controller to perform tasks based on the received character. We can use the Bluetooth communication in two ways, either we can use it to receive data from the Controller or control the system using our device Bluetooth. DESIGN: STEPS TO PROGRAM: This uses Serial Communication or UART protocol in the 8051 , so those who are not familiar with this kindly go through this article on "UART tutorial in 8051" and "UART interrupt" before getting started with BT interface. Initialize the Serial communication in 8051 using Timer and serial registers. Generate the required baud rate for the communication to take place. The default baud rate of the HC05 is 9600. Initialize serial interrupts in case you need to control the tasks performed by your microcontroller or receive data when requested. SAMPLE CODE: The below code was built using Keil uVision 4. FOR RECEIVING DATA FROM CONTROLLER VIA BT: Here a specific data can be transmitted whenever a interrupt request occurred from our device via bluetooth. In the below code a processed data was transmitted to our device from the controller when a serial interrupt occurs. #include&amp;lt;regx51.h&amp;gt;&amp;nbsp; int a,b,ans; char data[4]; void main() &amp;nbsp;&amp;nbsp; { &amp;nbsp; &amp;nbsp; a=80; b=40; ans=a+b; sprintf(data, "%d", ans); TMOD=0x20; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Choosing Timer mode &amp;nbsp; &amp;nbsp; TH1=0xFD; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Selecting Baud Rate &amp;nbsp; &amp;nbsp; SCON=0x50; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Serial mode selection &amp;nbsp; &amp;nbsp; TR1=1; &amp;nbsp; &amp;nbsp; IE=0x90; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Enabling Serial Interrupt &amp;nbsp; &amp;nbsp; while(1); &amp;nbsp; &amp;nbsp; } void ser_intr(void)interrupt 4 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Subroutine for Interrupt &amp;nbsp; { IE=0x00; short int i; for(i=0;i&amp;lt;=2;i++) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Transmitting data { SBUF=data[i]; while(TI==0); TI=0; } IE=0x90; } CODE FOR CONTROLLING CONTROLLER TASKS VIA BT: Here a specific task is performed on interrupt occurence in the controller via BT. Consider a Motor was connected in P2.0 &amp;amp; P2.1 of the controller and we are about to control its direction of rotation via BT from our device. Sending character "F" will make the motor to rotate clockwise whereas "R" will make the motor to rotate in anti clockwise direction. #include&amp;lt;regx51.h&amp;gt;&amp;nbsp; sbit mot1=P2^0; sbit mot2=P2^1; void main() { ////////// Initialize serial communication and activate interrupts. ////////// } void ser_intr(void)interrupt 4 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Subroutine for Interrupt &amp;nbsp; { char c; IE=0x00; while(RI==0); c=SBUF; if(c=='F'); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Controlling motor { mot1=1; mot2=0; } else if(c=='R') { mot1=0; mot2=1; } IE=0x90; } Hope you like this tutorial, leave your queries and feedback in the below comment box.</itunes:subtitle><itunes:author>Frankpunter@gmail.com (Anonymous)</itunes:author><itunes:summary>Bluetooth technology creates a big evolution in way the devices communicate with each other. So it is important to learn interfacing Bluetooth with our MCU's to build extended system also it offers facility to wireless control. This tutorial focuses in interfacing Bluetooth module HC05 with 8051 microcontroller. At the end of this tutorial you will be able to: - Program and interface Bluetooth module with 8051 - Send and receive data's using 8051 via Bluetooth. - Build and control any system using Bluetooth devices such as mobile phone ,PC, tablets etc. HC05: A Bluetooth module widely used with Microcontroller to enable Bluetooth communication. This module cam be interfaced using the UART in 8051 microcontroller where the data are transmitted in the form of packets. The pins TX and RX pin of the HC 05&amp;nbsp; form the path for data transmission and reception. These TX pin&amp;nbsp; of &amp;nbsp;HC05 must be connected to the RX pin of 8051 and vice versa. Whereas the key pin of the module is used to set the password for pairing the module with our devices. DATASHEET&amp;nbsp; APPLICATION: Snapshot of BT terminal Application Our devices such as mobile and PC's need special applications known as "Bluetooth Terminal" to communicate with our microcontrollers via Bluetooth. Not to worry, there are plenty of apps you can find in the internet. These apps are available in plenty irrespective of the you device OS Android, Windows , Mac whatever it may be. Just run a search such as Bluetooth Terminal for "OS name" and search engines will take you to the destination. These applications are developed in such a way to send characters through your device BT which was received by the BT module connected with our controller. Even some apps offers some interactive GUI buttons which transmits specific characters with the press of each buttons. Later the received character can be processed in our code and force the controller to perform tasks based on the received character. We can use the Bluetooth communication in two ways, either we can use it to receive data from the Controller or control the system using our device Bluetooth. DESIGN: STEPS TO PROGRAM: This uses Serial Communication or UART protocol in the 8051 , so those who are not familiar with this kindly go through this article on "UART tutorial in 8051" and "UART interrupt" before getting started with BT interface. Initialize the Serial communication in 8051 using Timer and serial registers. Generate the required baud rate for the communication to take place. The default baud rate of the HC05 is 9600. Initialize serial interrupts in case you need to control the tasks performed by your microcontroller or receive data when requested. SAMPLE CODE: The below code was built using Keil uVision 4. FOR RECEIVING DATA FROM CONTROLLER VIA BT: Here a specific data can be transmitted whenever a interrupt request occurred from our device via bluetooth. In the below code a processed data was transmitted to our device from the controller when a serial interrupt occurs. #include&amp;lt;regx51.h&amp;gt;&amp;nbsp; int a,b,ans; char data[4]; void main() &amp;nbsp;&amp;nbsp; { &amp;nbsp; &amp;nbsp; a=80; b=40; ans=a+b; sprintf(data, "%d", ans); TMOD=0x20; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Choosing Timer mode &amp;nbsp; &amp;nbsp; TH1=0xFD; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Selecting Baud Rate &amp;nbsp; &amp;nbsp; SCON=0x50; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Serial mode selection &amp;nbsp; &amp;nbsp; TR1=1; &amp;nbsp; &amp;nbsp; IE=0x90; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Enabling Serial Interrupt &amp;nbsp; &amp;nbsp; while(1); &amp;nbsp; &amp;nbsp; } void ser_intr(void)interrupt 4 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Subroutine for Interrupt &amp;nbsp; { IE=0x00; short int i; for(i=0;i&amp;lt;=2;i++) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Transmitting data { SBUF=data[i]; while(TI==0); TI=0; } IE=0x90; } CODE FOR CONTROLLING CONTROLLER TASKS VIA BT: Here a specific task is performed on interrupt occurence in the controller via BT. Consider a Motor was connected in P2.0 &amp;amp; P2.1 of the controller and we are about to control its direction of rotation via BT from our device. Sending character "F" will make the motor to rotate clockwise whereas "R" will make the motor to rotate in anti clockwise direction. #include&amp;lt;regx51.h&amp;gt;&amp;nbsp; sbit mot1=P2^0; sbit mot2=P2^1; void main() { ////////// Initialize serial communication and activate interrupts. ////////// } void ser_intr(void)interrupt 4 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Subroutine for Interrupt &amp;nbsp; { char c; IE=0x00; while(RI==0); c=SBUF; if(c=='F'); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Controlling motor { mot1=1; mot2=0; } else if(c=='R') { mot1=0; mot2=1; } IE=0x90; } Hope you like this tutorial, leave your queries and feedback in the below comment box.</itunes:summary><itunes:keywords>Gagdgetronicx,Electronics,Gadgets,technology,Circuits</itunes:keywords></item><item><title>Ultrasonic receiver circuit using Opamp LM324</title><link>http://gadgetronicx.blogspot.com/2015/01/ultrasonic-receiver-circuit-opamp-ic.html</link><category>electronic circuits</category><category>Transceiver circuits</category><pubDate>Fri, 30 Jan 2015 10:44:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-44917801884187835.post-6941601011405242753</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div dir="ltr"&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijhNO8w9dhlGw827Vz-gWl9VJbIWBoF6qdQ-4I5FcuMRLv9JKircYsH8ASgsG3r7VBs8mkbtgZ9Sxkmoyf0eEsH8hQV9CbX_MqPcN6V-1ZMRCRHwYlegtLDoKcL2tKhsFZgqsm5hKjkBI/s1600/ultrasonic-receiver-circuit.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="ultrasonic-receiver-using-opamp-ic-lm324" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijhNO8w9dhlGw827Vz-gWl9VJbIWBoF6qdQ-4I5FcuMRLv9JKircYsH8ASgsG3r7VBs8mkbtgZ9Sxkmoyf0eEsH8hQV9CbX_MqPcN6V-1ZMRCRHwYlegtLDoKcL2tKhsFZgqsm5hKjkBI/s1600/ultrasonic-receiver-circuit.png" height="462" title="Ultrasonic receiver" width="710" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir="ltr"&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Ultrasonic sound waves are high frequency waves which is inaudible to human ear. It also had hell lot of applications in this world like range detection,machinery flaw detection etc. This circuit demonstrates the building of ultrasonic wave receiver which matches with the transmitter which was published previously in our site.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style="text-align: center;"&gt;
&lt;a class="button-blue" href="http://www.gadgetronicx.com/2015/01/ultrasonic-transmitter-circuit-ic-555.html" rel="nofollow" target="_blank"&gt;Ultrasonic Receiver circuit&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div dir="ltr"&gt;
&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;h3 style="text-align: left;"&gt;
&lt;i style="color: #3c98ff; font-family: Times, 'Times New Roman', serif;"&gt;WORKING:&lt;/i&gt;&lt;/h3&gt;
&lt;/div&gt;
&lt;div dir="ltr"&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;This circuit uses a simple ultrasonic receiver ( transducer) which converts the incoming ultrasonic wave to equivalent voltage. The signal was then passed through a non inverting amplifier built using Quad Op amp IC LM324. The gain of the amplifier can be controlled using a feedback resistor R3 connected from output to the inverting terminal.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div dir="ltr"&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div dir="ltr"&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Then this signal is further passed to the next stage of non inverting amplifier. There the signal was further amplified and the output was obtained from the pin 7 of the LM324 IC . The signal is then rectified using a diode and passed through a Resistor R5 and Capacitor C2 to prevent the false triggering in the output.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Final stage of the op amp was wired as an comparator which gives high output when ever a ultrasonic wave is detected by the transducer and low signal whenever there is no wave detected by the transducer.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;This circuit along with the transmitter can be used to build simple robots in which it will assist the robot to evade the obstacles lying ahead them. Also can be used in range detection when used with a Microcontroller.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijhNO8w9dhlGw827Vz-gWl9VJbIWBoF6qdQ-4I5FcuMRLv9JKircYsH8ASgsG3r7VBs8mkbtgZ9Sxkmoyf0eEsH8hQV9CbX_MqPcN6V-1ZMRCRHwYlegtLDoKcL2tKhsFZgqsm5hKjkBI/s72-c/ultrasonic-receiver-circuit.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>Frankpunter@gmail.com (Anonymous)</author></item><item><title>Ultrasonic transmitter circuit using IC 555</title><link>http://gadgetronicx.blogspot.com/2015/01/ultrasonic-transmitter-circuit-ic-555.html</link><category>electronic circuits</category><category>Frank Donald</category><category>IC 555 circuits</category><category>Transceiver circuits</category><pubDate>Thu, 22 Jan 2015 11:47:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-44917801884187835.post-2794672974074742007</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3qVnpjm7aIoZaEbLqd35phaNj6gMoADQpUhVkB5VdSFha9ZwGFAx5rVZo_pCHIR7uajiPdjrzp9_gJwnuv7OTIVImnoTuIL_XNlYjDtZwY0-cg2K99KaopNm7jlNwzGp9sWcWn90kMjg/s1600/ultrasonic-transmitter.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="ultrasonic-transmitter-electronic-circuit-design-555" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3qVnpjm7aIoZaEbLqd35phaNj6gMoADQpUhVkB5VdSFha9ZwGFAx5rVZo_pCHIR7uajiPdjrzp9_gJwnuv7OTIVImnoTuIL_XNlYjDtZwY0-cg2K99KaopNm7jlNwzGp9sWcWn90kMjg/s1600/ultrasonic-transmitter.png" height="540" title="ultrasonic transmitter" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Ultrasonic waves are defined as the sound waves whose frequency is greater than 20Khz and it is not audible to the normal human ears. This ultrasonic possess wide variety of applications from industries (to detect flaws in machineries ) to medicine(for treating and detecting ailments). In fact some animals like Bats, dolphin etc uses these waves to interact with the external environment. This circuit demonstrate constructing a simple 40KHz ultrasonic transmitter built around timer ic 555.&lt;/span&gt;&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;WORKING:&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The IC 555 was wired to work as an astable multivibrator which forms the oscillator part of the above circuit. This IC U1 was configured to produce a continuous serial square wave pulses of 40KHZ. And the output frequency was governed by the equation F= 1..44/((R2+2R1)C2) . In the above circuit the components R1,R2 and C2 was selected to give 40KHZ square wave as output.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;i&gt;&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;ULTRASONIC TRANSDUCER:&lt;/span&gt;&lt;/i&gt;&lt;/h3&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhimhCBsKoLs8JOqleNtPtt2XJjj8KAK4T_Iy_fhyjWNWsC6yBLhW2SzdN6k1p4bA_ZkkVSS2ZwGSIid5P7zxO6b3sHwNoLo5b7UkMZB12lBRWBRP6k3JZ1LzOGALBsHEBDlhrKJ6Qb6fk/s1600/40Khz+Ultrasonic+Transducer+Pair-700x700.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="ultrasonic-transducer" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhimhCBsKoLs8JOqleNtPtt2XJjj8KAK4T_Iy_fhyjWNWsC6yBLhW2SzdN6k1p4bA_ZkkVSS2ZwGSIid5P7zxO6b3sHwNoLo5b7UkMZB12lBRWBRP6k3JZ1LzOGALBsHEBDlhrKJ6Qb6fk/s1600/40Khz+Ultrasonic+Transducer+Pair-700x700.jpg" height="200" title="transducer" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;This is the main component of the above circuit which is responsible for converting the input pulse to Ultrasonic waves of equivalent frequency. Usually it was made up of Piezoelectric crystals which have the property of changing size when voltage is applied. Apply input signal will cause them to oscillate and in turn produces high frequency sound waves. &amp;nbsp;Also some components adapt other methods to produce ultrasonic waves. You can also buy one of these in &lt;a href="http://www.ebay.com/itm/2-Pairs-TCT40-16R-T-40KHZ-Ultrasonic-Transducer-Sensors-output-Brand-New-/391034943395" rel="nofollow" target="_blank"&gt;ebay&lt;/a&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The transistor 2N2222 was used to drive the transducer used. You can also replace the 555 oscillator with oscillators built around crystals for long sustained oscillations.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;i&gt;&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;PCB DESIGN:&lt;/span&gt;&lt;/i&gt;&lt;/h3&gt;
&lt;br /&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="width: 50%;"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgd0r2ilib2XfQ732DoO97yBq67n8wetsvGle7oEIFxVVpuGIHkUCx0NQYkbvA0ubBtkVxVQVyCYjfLeI3E18Z_1SsUwwTQM3Wk2vwBPXahHwLh0J08zteaWNEa-30c34-OAoYYmlztufM/s1600/pcb.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img alt="pcb-design-ultrasonic-transmitter" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgd0r2ilib2XfQ732DoO97yBq67n8wetsvGle7oEIFxVVpuGIHkUCx0NQYkbvA0ubBtkVxVQVyCYjfLeI3E18Z_1SsUwwTQM3Wk2vwBPXahHwLh0J08zteaWNEa-30c34-OAoYYmlztufM/s1600/pcb.png" height="226" title="pcb-design" width="360" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;DESIGN ( &amp;nbsp;RED LINE - TOP COPPER)&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/td&gt;
&lt;td&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgstN8eEafCpblVXyjldb_jXyD-dZgRv1CtiZ70d-RL-wfeCCC3vbyxPYAuLnf6aBYyX2iUMl3l1U6DODA4h0fiFkoiLpALGK4rXmsw0HCaIpXnILJLXJetrvHM-G6yTan3G8LK_4NZy-Q/s1600/pcb.bmp" imageanchor="1" style="margin-left: auto; margin-right: -1em;"&gt;&lt;img alt="ultrasonic-bottom-copper-pcb" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgstN8eEafCpblVXyjldb_jXyD-dZgRv1CtiZ70d-RL-wfeCCC3vbyxPYAuLnf6aBYyX2iUMl3l1U6DODA4h0fiFkoiLpALGK4rXmsw0HCaIpXnILJLXJetrvHM-G6yTan3G8LK_4NZy-Q/s1600/pcb.bmp" height="226" title="bottom copper" width="360" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;BOTTOM VIEW&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCTUDYyBdY5GxYYEwfvJy7USkA_LJSZpyAT3-CB2-oEA2UROGVSSVOiYDAY_CWjHQvs11nFDwaGsJuXEujPX7kKUQA1k4rBTZTZeIeS-HBeaaW9CYYb9SFnvTtwJWkulzrHJmmYW6MLRM/s1600/pcb.bmp" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img alt="top-copper-ultrasonic-transmitter" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCTUDYyBdY5GxYYEwfvJy7USkA_LJSZpyAT3-CB2-oEA2UROGVSSVOiYDAY_CWjHQvs11nFDwaGsJuXEujPX7kKUQA1k4rBTZTZeIeS-HBeaaW9CYYb9SFnvTtwJWkulzrHJmmYW6MLRM/s1600/pcb.bmp" height="192" title="top-copper" width="320" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;TOP VIEW&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3qVnpjm7aIoZaEbLqd35phaNj6gMoADQpUhVkB5VdSFha9ZwGFAx5rVZo_pCHIR7uajiPdjrzp9_gJwnuv7OTIVImnoTuIL_XNlYjDtZwY0-cg2K99KaopNm7jlNwzGp9sWcWn90kMjg/s72-c/ultrasonic-transmitter.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>Frankpunter@gmail.com (Anonymous)</author></item><item><title>Clap activated light circuit </title><link>http://gadgetronicx.blogspot.com/2015/01/clap-activated-switch-light-circuit.html</link><category>electronic circuits</category><category>Frank Donald</category><category>sensor circuits</category><pubDate>Wed, 14 Jan 2015 08:27:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-44917801884187835.post-8587042647976424887</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div dir="ltr"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjW6WL77A0ELCQbrP0zyQYvArh_Hc6mOd5cMDjqpXyuAYJBPuU8gP0yHEul9LdmizgAuu5VBX6PWJTzmxDlqCTE0Rrt9stg3iasMq3mimsMp-MbdwuJG6C9AYpTuHBjBh6q1AD7TeZ4ih0/s1600/clap-activated-light.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="clap-activated-light-switch-electronic-circuit-diagram" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjW6WL77A0ELCQbrP0zyQYvArh_Hc6mOd5cMDjqpXyuAYJBPuU8gP0yHEul9LdmizgAuu5VBX6PWJTzmxDlqCTE0Rrt9stg3iasMq3mimsMp-MbdwuJG6C9AYpTuHBjBh6q1AD7TeZ4ih0/s1600/clap-activated-light.png" height="402" title="Clap activated light" width="710" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div dir="ltr"&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Clap activated circuits are&amp;nbsp; something which is used to activate or turn on by means of a simple clap. You might have seen some of this before but building one could be really fun. This clap activated switch circuit can be used for any means of activation not just to turn on the lights. Let's look into the working of this cool &amp;nbsp;circuit.&lt;/span&gt;&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div dir="ltr"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div dir="ltr"&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;WORKING OF CIRCUIT:&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;/div&gt;
&lt;div dir="ltr"&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The working of this circuit starts with Microphone which is used to sense the clap. The output of the Microphone was fed into a non inverting pin 3 of a simple operational amplifier. While a voltage divider network using R2 and RV1 provides the reference voltage for the non inverting pin 2 of the op amp.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Clap generally occurs in a short burst of time with high pitch, hence it results in a peak voltage across the pin 3 of the op amp over a short interval of time. So adjust the reference voltage of the non inverting pin accordingly so that the circuit activates only when senses a clap and not to other speech signals.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Now when no clap is sensed there will no voltage across the pin 2 hence output of the op amp remains in low state. A pull down resistor R3 was used to make sure that the pin 6 stays low in the absence of any input signal. When a clap is sensed the output of the Op amp goes high and feeds a positive high output to the flip flop connected to it.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;A simple JK flip IC 74109 was used as an activator here where it was wired to toggle it's output state with every edge of the high input. So whenever a clap is sensed the output of the op amp triggers the flip flop and activates the relay by means of a transistor switch. This state will remain until another clap is sensed and the flip flop will toggle its output state (i.e turn off the relay/light) as soon it encounters another clap.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;A simple LED with a current limiting resistor was added for indication and a 5V relay was used as an activator here for the light. You can replace the light with the thing you desire to activate it on a clap.&lt;/span&gt;&lt;/div&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;NOTE:&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The clap activation must be done with the trial and error method by adjusting the VR1 until the light gets activated with just clap.&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Make sure your switching transistor Q1 current rating is good enough to handle the relay.&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;You can use any Op-amp and JK flip flop IC here.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjW6WL77A0ELCQbrP0zyQYvArh_Hc6mOd5cMDjqpXyuAYJBPuU8gP0yHEul9LdmizgAuu5VBX6PWJTzmxDlqCTE0Rrt9stg3iasMq3mimsMp-MbdwuJG6C9AYpTuHBjBh6q1AD7TeZ4ih0/s72-c/clap-activated-light.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><author>Frankpunter@gmail.com (Anonymous)</author></item><item><title>How to program I2C protocol in ARM Microcontroller</title><link>http://gadgetronicx.blogspot.com/2015/01/how-to-program-i2c-arm-microcontroller-tutorial.html</link><category>ARM Microcontroller</category><category>Frank Donald</category><pubDate>Sun, 11 Jan 2015 12:33:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-44917801884187835.post-8881213101184896566</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXE55gqNi2EItlK6fz05mxa43quu2LyHhkgySmNkoGJ8tlm-gnVKFVc7eksCqhXhePjxCuQQ6iS4DvX86pbewQ7nVEZ7waNVtELbFBn6jMav7mcjBNNfCKxYgale7lXn9R4NoBrwM_f-4/s1600/i2c-tutorial-arm-controller.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="i2C-programming-tutorial- in-arm-microcontrollers" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXE55gqNi2EItlK6fz05mxa43quu2LyHhkgySmNkoGJ8tlm-gnVKFVc7eksCqhXhePjxCuQQ6iS4DvX86pbewQ7nVEZ7waNVtELbFBn6jMav7mcjBNNfCKxYgale7lXn9R4NoBrwM_f-4/s1600/i2c-tutorial-arm-controller.png" height="430" title="I2c protocol" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;I2C (Inter Integrated Circuit) also known as TWI (Two wire Interface) is a bus interface connection that is used in many devices such as Sensors, RTC and EEPROM. Unlike SPI this protocol only uses two wires to establish the connection and hence known as Two wire interface. This protocol will come in handy when the designer needs to conserve the number of pins used to perform the communication. This tutorial will teach you to program I2C protocol in ARM7 Microcontrollers.&lt;/span&gt;&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;i&gt;&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;I2C PROTOCOL:&lt;/span&gt;&lt;/i&gt;&lt;/h3&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjk7uAyKgDX7kWXwB_F7TND0TxQJfOVAHezN68_C1uwQBcPjYdZzp3lCugfcANbqtO7SXxb-803tLCQ1eStFT30yLkh1llJxoo-ZOoeW_piQAu6NL5e7tD_SVSfGHyjZDDwUm0mNs3ggl8/s1600/i2c-protocol.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="i2c-protocol-working" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjk7uAyKgDX7kWXwB_F7TND0TxQJfOVAHezN68_C1uwQBcPjYdZzp3lCugfcANbqtO7SXxb-803tLCQ1eStFT30yLkh1llJxoo-ZOoeW_piQAu6NL5e7tD_SVSfGHyjZDDwUm0mNs3ggl8/s1600/i2c-protocol.png" height="161" title="i2C protocol" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;This protocol uses 2 bidirectional open drain pins SDA and SCK for data communication. SCL( Serial Clock) is used to synchronize the data transfer between these &amp;nbsp;two chips and SDA to transfer the data to the devices. Therefore this protocol will allow us to reduce communication pins, package size and power consumption drastically. Each devices connected to the I2C line is known as nodes and the communication lines should be activated by means of a pull up resistor.Each data bit is transferred on the SDA line is synchronized by a high to low pulse clock on the SCL line. And the data line cannot change when the clock line is low.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;i&gt;&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;START AND STOP CONDITIONS:&lt;/span&gt;&lt;/i&gt;&lt;/h3&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;I2C communications are initiated and terminated by means of a START and STOP Conditions. START condition is generated by a high to low change in SDA line when SCL is high wheras STOP condition is generated by low to high change in SDA line when SCL is low.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;SLAVE ADDRESSING:&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;In I2C each slave device should possess an unique address which will be used by the master to address the slave and transmit the data to it. Usually the communication begins with start condition followed by the slave address of the slave and then comes the data.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;I hope i have enough information to get you started with I2C, but i advise you to go through this article &lt;a href="http://bit.ly/1AzJ9FK" rel="nofollow" target="_blank"&gt;I2C bus specification&lt;/a&gt;&amp;nbsp;to get a deeper understanding in its working and addressing schemes.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;REGISTERS USED:&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;br /&gt;
&lt;div style="text-align: justify;"&gt;
&lt;i&gt;&lt;b&gt;&lt;span style="font-family: Times, Times New Roman, serif;"&gt;I2CONSET:&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt; &amp;nbsp;I2C control register is an 8 bit register which holds the holds the bits to control the I2C communication.&lt;/span&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgS9MaJbv8UkxlqhdgipyZZ7Zno1cuFUkTfprf-j5xdVZIGDp9PqMGjiyzD8jYyLA0bVmCubT7UXjE2a3yZcYaHaLF8XJNYwcBFsNqyFWk7opC4MUnjM5-jLZIoaQMRbnay_8ycLSMV2sQ/s1600/i2conset+register.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="i2cconset regsiter" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgS9MaJbv8UkxlqhdgipyZZ7Zno1cuFUkTfprf-j5xdVZIGDp9PqMGjiyzD8jYyLA0bVmCubT7UXjE2a3yZcYaHaLF8XJNYwcBFsNqyFWk7opC4MUnjM5-jLZIoaQMRbnay_8ycLSMV2sQ/s1600/i2conset+register.JPG" height="256" title="i2cconset regsiter" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style="text-align: justify;"&gt;
&lt;b&gt;&lt;i&gt;&lt;span style="font-family: Times, Times New Roman, serif;"&gt;I2STAT:&lt;/span&gt;&lt;/i&gt;&lt;/b&gt; &lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;This is an 8 bit read only register which contains the key information and status of the I2C register. The bits in these registers must be checked periodically.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style="text-align: justify;"&gt;
&lt;b&gt;&lt;i&gt;&lt;span style="font-family: Times, Times New Roman, serif;"&gt;I2DAT:&lt;/span&gt;&lt;/i&gt;&lt;/b&gt; &lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;This register holds the data to be transmitted or received. This register can be accessed only when the SI bit is set.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style="text-align: justify;"&gt;
&lt;b&gt;&lt;i&gt;&lt;span style="font-family: Times, Times New Roman, serif;"&gt;I2ADR:&lt;/span&gt;&lt;/i&gt;&lt;/b&gt; &lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;This register &amp;nbsp;holds the slave mode address and used only when the I2C is set to the slave mode.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style="text-align: justify;"&gt;
&lt;b&gt;&lt;i&gt;&lt;span style="font-family: Times, Times New Roman, serif;"&gt;I2SCLH &amp;amp; I2SCLL:&lt;/span&gt;&lt;/i&gt;&lt;/b&gt; &lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The values in these two registers will be used to set the data rate of the I2C communication. The bit frequency is given the formula&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: center;"&gt;
&lt;span style="font-family: Times, Times New Roman, serif;"&gt;&lt;b&gt;&lt;i&gt;Bit Frequency = Fclk / (I2SCLH+I2SCLL)&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;i&gt;&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;I2CONCLR:&lt;/span&gt;&lt;/i&gt;&lt;/h3&gt;
&lt;img alt="I2CCONCLR-regsiter" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmQWjVjDNiWjtlTGl6GMM45d-LDjq2Tvojz9u0Vr1Gen3a4f2ZHQS6SGzpbPkH-ZDL5XIvA9CZyk2W-DMJPcu-xwRbYaWQrWzwxL2YbrC2LdXCYaCJDqTJ5LQU4_00W8HpzOepfsJRMsY/s1600/i2conclr+register.JPG" height="326" title="I2CCONCLR regsiter" width="640" /&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;I2C control clear register used to clear the controls of the I2C set using the I2CONSET register&lt;/span&gt;.&lt;br /&gt;
&lt;div style="text-align: justify;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3 style="text-align: justify;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;STEPS TO PROGRAM I2C:&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;br /&gt;
&lt;span style="font-family: Times, Times New Roman, serif;"&gt;&lt;b&gt;&lt;i&gt;MASTER MODE:&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ol style="text-align: left;"&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Load the values in the I2SCLH and I2SCLL register to set the required bit frequency.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Enable the I2EN bit in the I2CONSET register.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Set the Acknowledgement bit and start bit in the I2CONSET register.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Check for the status 0x08 in the I2STAT register which was defined in the datasheet.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Transmit the slave address, followed by the databytes.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Send the stop signal by activating the bit STO in the I2CONSET register.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Disable the I2C by writing 1 to the bit I2EN in the I2CONCLR register,&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;b&gt;&lt;i&gt;&lt;span style="font-family: Times, Times New Roman, serif;"&gt;SLAVE MODE:&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ol style="text-align: left;"&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Slave address register should be loaded with the slave address.&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The I2EN bit must be set to enable the I2C function and AA bit must be set to acknowledge general address or call address.&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Receive or transmit data based on the direction bit received along with the slave address.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Kindly refer the datasheet for all modes of program, since the topic is vast and cannot be covered within this article. Also datasheet did an exceptional job in explaining the registers and modes of I2C operation. The link to download the datasheet is available below.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;a class="button-blue" href="http://bit.ly/gadgetronicx" rel="nofollow" style="align: center; color: white; text-decoration: none;" target="_blank"&gt;DATASHEET DOWNLOAD&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;SAMPLE CODE:&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;This sample code gives you an idea of programming I2C and transmitting bytes of data in master mode and the slave controller retrieves it and displays it in its Port1. This code was built using Keil uVision 4.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;table style="background-color: #3c98ff; width: 100%;"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;ol style="color: white; text-align: left;"&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;#include&amp;lt;lpc21xx.h&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;#define AA 2&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;#define SI 3&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;#define STO 4&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;#define STA 5&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;#define I2EN 6&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;void wait(unsigned int delay)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;while(delay--);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;}&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;void i2c_init(void) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //I2C initilaization&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;I2SCLH=100; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Bit frequency calculated value&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;I2SCLL=100;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;I2CONSET=1&amp;lt;&amp;lt;I2EN;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;}&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;int i2c_start() &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//I2C communication start&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;I2CONCLR=1&amp;lt;&amp;lt;3;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;I2CONSET=1&amp;lt;&amp;lt;STA;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;while(!(I2STAT==0x08));&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;return 0;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;}&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;int i2c_write(unsigned char buff) &amp;nbsp; &amp;nbsp; &amp;nbsp;//Data writing through I2C&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;I2CONSET|=1&amp;lt;&amp;lt;SI;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;I2DAT=buff;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;wait(5000);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;I2CONCLR=1&amp;lt;&amp;lt;SI;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;wait(5000);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;return 0;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;}&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;void i2c_stop(void) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Stop the I2C communication&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;I2CONSET=(1&amp;lt;&amp;lt;STO);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;I2CONCLR=(1&amp;lt;&amp;lt;I2EN);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;}&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;int main(void)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;VPBDIV=0x02; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Setting FCLK frequency&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;PINSEL0=1&amp;lt;&amp;lt;4|1&amp;lt;&amp;lt;6; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Selecting I2C communication pins&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;i2c_init();&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;i2c_start();&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;i2c_write(0x00);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;i2c_write('A');&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;i2c_write('B');&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;i2c_write('C');&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;i2c_stop();&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;while(1);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;}&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;i&gt;&lt;span style="color: #3c98ff;"&gt;NOTE:&lt;/span&gt;&lt;/i&gt;&lt;/h3&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The Bit rate frequency of the I2C must not exceed 400KHZ so make the calculation to follow this criteria.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Make Changes in the above code as stated in the steps for slave mode to obtain the code for slave controller.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Pull Up resistors should be used to activate the communication lines.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXE55gqNi2EItlK6fz05mxa43quu2LyHhkgySmNkoGJ8tlm-gnVKFVc7eksCqhXhePjxCuQQ6iS4DvX86pbewQ7nVEZ7waNVtELbFBn6jMav7mcjBNNfCKxYgale7lXn9R4NoBrwM_f-4/s72-c/i2c-tutorial-arm-controller.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>Frankpunter@gmail.com (Anonymous)</author><enclosure length="1440925" type="application/pdf" url="http://bit.ly/gadgetronicx"/><itunes:explicit>no</itunes:explicit><itunes:subtitle>I2C (Inter Integrated Circuit) also known as TWI (Two wire Interface) is a bus interface connection that is used in many devices such as Sensors, RTC and EEPROM. Unlike SPI this protocol only uses two wires to establish the connection and hence known as Two wire interface. This protocol will come in handy when the designer needs to conserve the number of pins used to perform the communication. This tutorial will teach you to program I2C protocol in ARM7 Microcontrollers. I2C PROTOCOL: This protocol uses 2 bidirectional open drain pins SDA and SCK for data communication. SCL( Serial Clock) is used to synchronize the data transfer between these &amp;nbsp;two chips and SDA to transfer the data to the devices. Therefore this protocol will allow us to reduce communication pins, package size and power consumption drastically. Each devices connected to the I2C line is known as nodes and the communication lines should be activated by means of a pull up resistor.Each data bit is transferred on the SDA line is synchronized by a high to low pulse clock on the SCL line. And the data line cannot change when the clock line is low. START AND STOP CONDITIONS: I2C communications are initiated and terminated by means of a START and STOP Conditions. START condition is generated by a high to low change in SDA line when SCL is high wheras STOP condition is generated by low to high change in SDA line when SCL is low. SLAVE ADDRESSING: In I2C each slave device should possess an unique address which will be used by the master to address the slave and transmit the data to it. Usually the communication begins with start condition followed by the slave address of the slave and then comes the data. I hope i have enough information to get you started with I2C, but i advise you to go through this article I2C bus specification&amp;nbsp;to get a deeper understanding in its working and addressing schemes. REGISTERS USED: I2CONSET: &amp;nbsp;I2C control register is an 8 bit register which holds the holds the bits to control the I2C communication. I2STAT: This is an 8 bit read only register which contains the key information and status of the I2C register. The bits in these registers must be checked periodically. I2DAT: This register holds the data to be transmitted or received. This register can be accessed only when the SI bit is set. I2ADR: This register &amp;nbsp;holds the slave mode address and used only when the I2C is set to the slave mode. I2SCLH &amp;amp; I2SCLL: The values in these two registers will be used to set the data rate of the I2C communication. The bit frequency is given the formula Bit Frequency = Fclk / (I2SCLH+I2SCLL) I2CONCLR: I2C control clear register used to clear the controls of the I2C set using the I2CONSET register. STEPS TO PROGRAM I2C: MASTER MODE: Load the values in the I2SCLH and I2SCLL register to set the required bit frequency. Enable the I2EN bit in the I2CONSET register. Set the Acknowledgement bit and start bit in the I2CONSET register. Check for the status 0x08 in the I2STAT register which was defined in the datasheet. Transmit the slave address, followed by the databytes. Send the stop signal by activating the bit STO in the I2CONSET register. Disable the I2C by writing 1 to the bit I2EN in the I2CONCLR register, SLAVE MODE: Slave address register should be loaded with the slave address. The I2EN bit must be set to enable the I2C function and AA bit must be set to acknowledge general address or call address. Receive or transmit data based on the direction bit received along with the slave address. Kindly refer the datasheet for all modes of program, since the topic is vast and cannot be covered within this article. Also datasheet did an exceptional job in explaining the registers and modes of I2C operation. The link to download the datasheet is available below. DATASHEET DOWNLOAD SAMPLE CODE: This sample code gives you an idea of programming I2C and transmitting bytes of data in master mode and the slave controller retrieves it and displays it in its Port1. This code was built using Keil uVision 4. #include&amp;lt;lpc21xx.h&amp;gt; #define AA 2 #define SI 3 #define STO 4 #define STA 5 #define I2EN 6 void wait(unsigned int delay) { while(delay--); } void i2c_init(void) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //I2C initilaization { I2SCLH=100; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Bit frequency calculated value I2SCLL=100; I2CONSET=1&amp;lt;&amp;lt;I2EN; } int i2c_start() &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//I2C communication start { I2CONCLR=1&amp;lt;&amp;lt;3; I2CONSET=1&amp;lt;&amp;lt;STA; while(!(I2STAT==0x08)); return 0; } int i2c_write(unsigned char buff) &amp;nbsp; &amp;nbsp; &amp;nbsp;//Data writing through I2C { I2CONSET|=1&amp;lt;&amp;lt;SI; I2DAT=buff; wait(5000); I2CONCLR=1&amp;lt;&amp;lt;SI; wait(5000); return 0; } void i2c_stop(void) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Stop the I2C communication { &amp;nbsp;I2CONSET=(1&amp;lt;&amp;lt;STO); &amp;nbsp;I2CONCLR=(1&amp;lt;&amp;lt;I2EN); } int main(void) { VPBDIV=0x02; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Setting FCLK frequency PINSEL0=1&amp;lt;&amp;lt;4|1&amp;lt;&amp;lt;6; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Selecting I2C communication pins i2c_init(); i2c_start(); i2c_write(0x00); i2c_write('A'); i2c_write('B'); i2c_write('C'); i2c_stop(); while(1); } NOTE: The Bit rate frequency of the I2C must not exceed 400KHZ so make the calculation to follow this criteria. Make Changes in the above code as stated in the steps for slave mode to obtain the code for slave controller. Pull Up resistors should be used to activate the communication lines.</itunes:subtitle><itunes:author>Frankpunter@gmail.com (Anonymous)</itunes:author><itunes:summary>I2C (Inter Integrated Circuit) also known as TWI (Two wire Interface) is a bus interface connection that is used in many devices such as Sensors, RTC and EEPROM. Unlike SPI this protocol only uses two wires to establish the connection and hence known as Two wire interface. This protocol will come in handy when the designer needs to conserve the number of pins used to perform the communication. This tutorial will teach you to program I2C protocol in ARM7 Microcontrollers. I2C PROTOCOL: This protocol uses 2 bidirectional open drain pins SDA and SCK for data communication. SCL( Serial Clock) is used to synchronize the data transfer between these &amp;nbsp;two chips and SDA to transfer the data to the devices. Therefore this protocol will allow us to reduce communication pins, package size and power consumption drastically. Each devices connected to the I2C line is known as nodes and the communication lines should be activated by means of a pull up resistor.Each data bit is transferred on the SDA line is synchronized by a high to low pulse clock on the SCL line. And the data line cannot change when the clock line is low. START AND STOP CONDITIONS: I2C communications are initiated and terminated by means of a START and STOP Conditions. START condition is generated by a high to low change in SDA line when SCL is high wheras STOP condition is generated by low to high change in SDA line when SCL is low. SLAVE ADDRESSING: In I2C each slave device should possess an unique address which will be used by the master to address the slave and transmit the data to it. Usually the communication begins with start condition followed by the slave address of the slave and then comes the data. I hope i have enough information to get you started with I2C, but i advise you to go through this article I2C bus specification&amp;nbsp;to get a deeper understanding in its working and addressing schemes. REGISTERS USED: I2CONSET: &amp;nbsp;I2C control register is an 8 bit register which holds the holds the bits to control the I2C communication. I2STAT: This is an 8 bit read only register which contains the key information and status of the I2C register. The bits in these registers must be checked periodically. I2DAT: This register holds the data to be transmitted or received. This register can be accessed only when the SI bit is set. I2ADR: This register &amp;nbsp;holds the slave mode address and used only when the I2C is set to the slave mode. I2SCLH &amp;amp; I2SCLL: The values in these two registers will be used to set the data rate of the I2C communication. The bit frequency is given the formula Bit Frequency = Fclk / (I2SCLH+I2SCLL) I2CONCLR: I2C control clear register used to clear the controls of the I2C set using the I2CONSET register. STEPS TO PROGRAM I2C: MASTER MODE: Load the values in the I2SCLH and I2SCLL register to set the required bit frequency. Enable the I2EN bit in the I2CONSET register. Set the Acknowledgement bit and start bit in the I2CONSET register. Check for the status 0x08 in the I2STAT register which was defined in the datasheet. Transmit the slave address, followed by the databytes. Send the stop signal by activating the bit STO in the I2CONSET register. Disable the I2C by writing 1 to the bit I2EN in the I2CONCLR register, SLAVE MODE: Slave address register should be loaded with the slave address. The I2EN bit must be set to enable the I2C function and AA bit must be set to acknowledge general address or call address. Receive or transmit data based on the direction bit received along with the slave address. Kindly refer the datasheet for all modes of program, since the topic is vast and cannot be covered within this article. Also datasheet did an exceptional job in explaining the registers and modes of I2C operation. The link to download the datasheet is available below. DATASHEET DOWNLOAD SAMPLE CODE: This sample code gives you an idea of programming I2C and transmitting bytes of data in master mode and the slave controller retrieves it and displays it in its Port1. This code was built using Keil uVision 4. #include&amp;lt;lpc21xx.h&amp;gt; #define AA 2 #define SI 3 #define STO 4 #define STA 5 #define I2EN 6 void wait(unsigned int delay) { while(delay--); } void i2c_init(void) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //I2C initilaization { I2SCLH=100; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Bit frequency calculated value I2SCLL=100; I2CONSET=1&amp;lt;&amp;lt;I2EN; } int i2c_start() &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//I2C communication start { I2CONCLR=1&amp;lt;&amp;lt;3; I2CONSET=1&amp;lt;&amp;lt;STA; while(!(I2STAT==0x08)); return 0; } int i2c_write(unsigned char buff) &amp;nbsp; &amp;nbsp; &amp;nbsp;//Data writing through I2C { I2CONSET|=1&amp;lt;&amp;lt;SI; I2DAT=buff; wait(5000); I2CONCLR=1&amp;lt;&amp;lt;SI; wait(5000); return 0; } void i2c_stop(void) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Stop the I2C communication { &amp;nbsp;I2CONSET=(1&amp;lt;&amp;lt;STO); &amp;nbsp;I2CONCLR=(1&amp;lt;&amp;lt;I2EN); } int main(void) { VPBDIV=0x02; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Setting FCLK frequency PINSEL0=1&amp;lt;&amp;lt;4|1&amp;lt;&amp;lt;6; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Selecting I2C communication pins i2c_init(); i2c_start(); i2c_write(0x00); i2c_write('A'); i2c_write('B'); i2c_write('C'); i2c_stop(); while(1); } NOTE: The Bit rate frequency of the I2C must not exceed 400KHZ so make the calculation to follow this criteria. Make Changes in the above code as stated in the steps for slave mode to obtain the code for slave controller. Pull Up resistors should be used to activate the communication lines.</itunes:summary><itunes:keywords>Gagdgetronicx,Electronics,Gadgets,technology,Circuits</itunes:keywords></item><item><title>Simple Voting Machine using 8051 Microcontroller</title><link>http://gadgetronicx.blogspot.com/2015/01/voting-machine-using-8051-microcontroller-code.html</link><category>8051 programs</category><category>Frank Donald</category><pubDate>Fri, 2 Jan 2015 09:27:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-44917801884187835.post-2175850014144440716</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7VOK2w1QprynzGau0F0xS2ptqTUplheg2-A8_tju-QMK3nHtS2tB0Jo1wVCdQl6BvadiG6JSJxTthVwdJAKzgFPUCmfWGE_Tpymw35y_31sUP8WSK6mrgsUI_xHwrzxD0Tpo8DO9Neco/s1600/voting-machine'.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="voting-machine-8051-microcontroller-circuit-system" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7VOK2w1QprynzGau0F0xS2ptqTUplheg2-A8_tju-QMK3nHtS2tB0Jo1wVCdQl6BvadiG6JSJxTthVwdJAKzgFPUCmfWGE_Tpymw35y_31sUP8WSK6mrgsUI_xHwrzxD0Tpo8DO9Neco/s1600/voting-machine'.png" height="450" title="Voting machine" width="700" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Voting or polling machines is one of the finest example for the application of a Microcontroller. This project brings you the design and programming of building a very simple, cost effective polling machines which can do great job for elections in schools, colleges or particular locality. The highlighting feature of this system is that the results of the poll can be viewed instantly also can be monitored from time to time over the period of the poll.&lt;/span&gt;&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;This voting machine was built around 8051 Microcontroller which uses 8 push buttons Poll 1 to Poll 8 which was assigned for a total of eight candidates in this design. To avoid multiple votes by the pollers a poll control switch was added which should be controlled by the supervisor of the poll. A LCD was used to display which candidates they have voted. And at last Hyperterminal should be used with the microcontroller to see poll results using serial communication.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;DESIGN:&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The poll&amp;nbsp;&amp;nbsp;Poll 1 to Poll 8&amp;nbsp;switches was scanned from the Microcontroller for casting vote to the respective candidates. But at first Poll control switch must be pressed to make the Poll switches available for voting. So every time a vote is casted the control switch must be pressed in order to allow the next candidate to vote. This avoids multiple votes from the pollers. The Poll control switch was monitored by means of external interrupts.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;A LCD was used to display the status of the voting machine i.e whether it is ready to take the next vote or needs to be initialized by the poll control. Also it will display the candidate name once a vote is casted. The vote results can be obtained by using a hyperterminal in a computer connected with 8051, this was done by using the concept of serial interrupts. Any button press in the keyboard will create interrupt and the vote results will be send to the computer in order starting from candidate 1 to candidate 8.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style="text-align: justify;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;If you are not aware of programming interrupts in 8051 kindly read&lt;/span&gt; &lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;" &lt;a href="http://www.gadgetronicx.com/2014/08/programming-external-interrupt-8051-microcontroller.html" rel="nofollow" target="_blank"&gt;External interrupt programming in 8051"&lt;/a&gt;&lt;/i&gt;&lt;/span&gt; &lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&amp;amp;&lt;/span&gt; &lt;a href="http://www.gadgetronicx.com/2014/09/programming-serial-interrupts-8051.html" rel="nofollow" target="_blank"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;"Serial Interrupt programming in 8051"&lt;/i&gt;&lt;/span&gt;&lt;/a&gt;.&lt;/div&gt;
&lt;br /&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;i&gt;&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;VOTING PROCESS:&lt;/span&gt;&lt;/i&gt;&lt;/h3&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;In order to make this more clear here is the step by step working of this voting machine.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Poll Control switch must be initialized first, then the Microcontroller will be ready to take inputs from the input switches and "CAST YOUR VOTE" message will be displayed in the LCD.&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Votes can be now casted using the Poll switches Poll 1 to Poll 8.&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;After voting a message 'VOTED:CANDIDATE" will be displayed in the LCD.&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Now the Poll control switch must be pressed again in order to allow next one to cast their vote, this allows the Supervisors to control the votes.&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The results of the poll can be obtained in the computer screen with a single press of any key in the keyboard.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;CODE:&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;This code was built using Keil uVision 4.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;table style="background-color: #3c98ff; width: 100%;"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;ol style="color: white; text-align: left;"&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;#include&amp;lt;reg52.h&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;#include&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;sbit rs=P3^6;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;sbit en=P3^7;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;int i,j,k;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;unsigned char init_msg[]="Cast Your Vote";&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;unsigned int votes[8];&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;void delay() &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Delay Subroutine&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; int k;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; for(k=0;k&amp;lt;=1000;k++);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;}&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;void lcd(char a,short int b) &amp;nbsp; &amp;nbsp; &amp;nbsp; //Subroutine for displaying characters in LCD&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; P1=a;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; rs=b;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; en=1;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; delay();&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; en=0;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;}&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;void msg(char *x) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Subroutine to display messages&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; while(*x)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;lcd(*x++,1);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;}&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;void vote() &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Subroutine to scan the keypad for vote input&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; while(1)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(P2==0xfe) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;P2=0x00; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Disabling the port after single press to avoid multiple votes&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;votes[0]++; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Increment vote value for specified candidate&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;lcd(0x01,0);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;lcd(0x80,0);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;msg("VOTED:CANDIDATE1");&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; if(P2==0xfd)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; P2=0x00;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; votes[1]++;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lcd(0x01,0);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lcd(0x80,0);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; msg("VOTED:CANDIDATE2");&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;if(P2==0xfb)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;P2=0x00;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;votes[2]++;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;lcd(0x01,0);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;lcd(0x80,0);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;msg("VOTED:CANDIDATE3");&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;if(P2==0xf7)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;P2=0x00;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;votes[3]++;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;lcd(0x01,0);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;lcd(0x80,0);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;msg("VOTED:CANDIDATE4");&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;if(P2==0xef)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;P2=0x00;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;votes[4]++;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;lcd(0x01,0);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;lcd(0x80,0);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;msg("VOTED:CANDIDATE5");&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;if(P2==0xdf)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;P2=0x00;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;votes[5]++;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;lcd(0x01,0);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;lcd(0x80,0);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;msg("VOTED:CANDIDATE6");&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;if(P2==0xbf)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;P2=0x00;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;votes[6]++;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;lcd(0x01,0);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;lcd(0x80,0);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;msg("VOTED:CANDIDATE7");&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; if(P2==0x7f)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; { &amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; P2=0x00;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; votes[7]++;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lcd(0x01,0);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lcd(0x80,0);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; msg("VOTED:CANDIDATE8");&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;}&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;void serial(void) interrupt 4 &amp;nbsp; &amp;nbsp; &amp;nbsp; //Subroutine for serial interrupt/ To obtain poll results&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;{&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;short int i,j;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;char c[10];&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;IE=0x00; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Disabling interrupts to avoid recursion&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;for(i=0;i&amp;lt;=7;i++) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Loop to send vote results one by one&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sprintf(c,"%d",votes[i]);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;while(c[j]!='\0')&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SBUF=c[j++];&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;while(TI==0);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;TI=0;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SBUF=0x20;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;while(TI==0);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;TI=0;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;j=0;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;SBUF=0x0D;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;while(TI==0);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;RI=TI=0;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;IE=0x94;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;}&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;void isr_ex1(void) interrupt 2 &amp;nbsp;//Subroutine for external interrupt/To activate poll switches&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; short int y;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; P2=0xff; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Activating port 2 for poll inputs&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; lcd(0x01,0);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; lcd(0x38,0);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; lcd(0x0f,0);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; lcd(0x80,0);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; delay();&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; for(y=0;y&amp;lt;=13;y++)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; lcd(init_msg[y],1);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;}&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;void main()&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; TMOD=0x20; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Activating timers to generate the baud rate for serial comm&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; TH1=0xFD;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; TL1=0x00;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; SCON=0x50;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; TR1=1;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; IE=0x94; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Activating serial and external interrupts.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; P2=0x00;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; vote();&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; while(1);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;}&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;div&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;NOTE:&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;You can implement matrix keypads in case if you need to use the above system for more than 8 candidates.&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;You can get the vote results whenever you needed.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7VOK2w1QprynzGau0F0xS2ptqTUplheg2-A8_tju-QMK3nHtS2tB0Jo1wVCdQl6BvadiG6JSJxTthVwdJAKzgFPUCmfWGE_Tpymw35y_31sUP8WSK6mrgsUI_xHwrzxD0Tpo8DO9Neco/s72-c/voting-machine'.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><author>Frankpunter@gmail.com (Anonymous)</author></item><item><title>SPI (Serial Peripheral Interface) tutorial in ARM7 Microcontroller</title><link>http://gadgetronicx.blogspot.com/2014/12/spi-serial-peripheral-interface-arm-microcontroller.html</link><category>ARM Microcontroller</category><category>embedded C tutorials</category><category>Frank Donald</category><pubDate>Sun, 28 Dec 2014 23:48:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-44917801884187835.post-3281992309200935590</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDAWf8h-Qyd8wkyee2D2TaYGFthtriPbslt4n2asHJtLt67hW1ZWOy04nTPdc32kC7P7cGNhaqrj1Gst9HuWpT05xiiKQYBmiT77V5pJCUhJmYwEPN8U1gCLM7VZSQ8YNQL0y5XtFM_zQ/s1600/spi-protocol-arm-microcontroller.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="SPI-protocol-using-ARM-microcontroller" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDAWf8h-Qyd8wkyee2D2TaYGFthtriPbslt4n2asHJtLt67hW1ZWOy04nTPdc32kC7P7cGNhaqrj1Gst9HuWpT05xiiKQYBmiT77V5pJCUhJmYwEPN8U1gCLM7VZSQ8YNQL0y5XtFM_zQ/s1600/spi-protocol-arm-microcontroller.png" height="550" title="SPI protocol" width="700" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;SPI ( Synchronous Peripheral Interface) is one of the important protocols used in Microcontrollers to establish serial communication between two devices. This protocol was widely used in many devices since the data transfer rate is pretty high than other protocols such as UART and I2C. This article will teach you to program SPI using ARM 7 Microcontroller.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The above design shows two controllers one of which is Master which transmits the data and the other one is the slave which receives the data and exhibit it its port1. The port 1 is provided with 8 LED's which indicate represents the received data from the master controller.&lt;/span&gt;&lt;/div&gt;
&lt;h3 style="text-align: justify;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;h3 style="text-align: justify;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;SPI PROTOCOL:&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;SPI is a synchronous, full duplex protocol which basically requires three communication lines to establish the connection between the devices. Hence it was also called as 3 wire interface protocol. A controller should act as a master and other should act like slaves. A master can have multiple slaves also both the master and slave can transmit/receive data. ARM 7 Microcontrollers possess two SPI &amp;nbsp;controllers which controls SPI0 and SPI1.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h3 style="text-align: justify;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;PIN FUNCTIONS:&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;As i said above three communication line forms the backbone of this protocol, however a fourth one was also used to select the slaves by the master. The function of the Pins used in our controller is as follows.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;b&gt;&lt;i&gt;&lt;span style="font-family: Times, Times New Roman, serif;"&gt;MOSI&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt; - Master Output Slave Input pin serves as output pin for the Master and input for Slave.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Times, Times New Roman, serif;"&gt;&lt;b&gt;&lt;i&gt;MISO&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt; - Master Input Slave Output serves as input pin fro Master and output for the slave.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;&lt;b&gt;SCK&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt; - &amp;nbsp;This pin generates the required clock for the communication to takes place. Master generates clock and feed the pulse to the slave device.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;&lt;b&gt;SSEL&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt; - This pin is used to select the slave device when multiple slave devices are used along with a single master. The SSEL is an active low pin, so to select a particular slave this pin should be pulled low.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h3 style="text-align: justify;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;REGISTERS USED IN SPI PROTOCOL:&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;In ARM7 controllers we use four registers to control the operation of the SPI they are as follows.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h3 style="text-align: justify;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;SPCR REGISTER:&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;SPI control register is an 8 bit register which is used to set the modes in which we SPI to operate. I have added a snippet of the bit functions in the register for better understanding.&lt;/span&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjL6I8FHwq_zFpkFODbmJ2TwpAtJ3t1jYfTQH8s0ND4BP7a9_z3elAabV1d9n5QiZHBgoXly7qjkADmIdoKTLHlGh7EfiBWFonMZBDAg6paKRimeu_uFlT8oEqK-YpLIfbWYgaKGo-WkTg/s1600/SPCR+register.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="SPCR-register-lpc2124-microcontroller" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjL6I8FHwq_zFpkFODbmJ2TwpAtJ3t1jYfTQH8s0ND4BP7a9_z3elAabV1d9n5QiZHBgoXly7qjkADmIdoKTLHlGh7EfiBWFonMZBDAg6paKRimeu_uFlT8oEqK-YpLIfbWYgaKGo-WkTg/s1600/SPCR+register.JPG" height="322" title="SPCR Register" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h3 style="text-align: justify;"&gt;
&lt;i&gt;&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;SPSR REGISTER:&lt;/span&gt;&lt;/i&gt;&lt;/h3&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;SPI status register is an 8 bit register which reveals the status of the SPI communication such as completion of transmission/ reception, mode fault etc.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgphIZCJfAQ6KLXjCCWArMVWNo5f6Atk7rwlhX-UC-RiRt6lG8uhObAhvLtR-wgRBquyli1t9tA6vGj7m0Q9bH6RDkH66IMQ2QOa96bDC0BcJUGVCxIQV8UedpyJXuOO5ybMy4yGJRqZ4w/s1600/SPSR+register.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="SPSR-register-lpc2124-microcontroller" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgphIZCJfAQ6KLXjCCWArMVWNo5f6Atk7rwlhX-UC-RiRt6lG8uhObAhvLtR-wgRBquyli1t9tA6vGj7m0Q9bH6RDkH66IMQ2QOa96bDC0BcJUGVCxIQV8UedpyJXuOO5ybMy4yGJRqZ4w/s1600/SPSR+register.JPG" height="300" title="SPSR-register" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h3 style="text-align: justify;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;SPDR REGISTER:&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;This register holds the data for transmission and reception. Data can be transmitted by writing in this register and data received can be read from this register.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h3 style="text-align: justify;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;SPCCR REGISTER:&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;This register controls the frequency of a master's SCK. The value of this register must be an even number and should be greater than or equal to 8. The SPI clock frequency is governed by the formula&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: center;"&gt;
&lt;span style="font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;&lt;b&gt;SPI rate = PCLK (Processor Clock rate) / SPCCR value&amp;nbsp;&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h3 style="text-align: justify;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;STEPS TO PROGRAM SPI IN ARM CONTROLLERS:&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;div style="text-align: justify;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Times, Times New Roman, serif;"&gt;&lt;b&gt;&lt;i&gt;MASTER MODE:&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;ol style="text-align: left;"&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;Select the functions of the pins MISO, MOSI, SCK using the PINSEL0 register.&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Set the direction of the SSEL pin for selecting the slave connected to the controller.&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Load the appropriate calculated value in the SPCCR register to generate the required clock frequency.&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Select the master mode and set the clock phase, polarity using the SPCR register.&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Select the slave by pulling the SSEL pin low.&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Write the data in the SPDR register for transmission.&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Check the status of the transmission by reading the SPIF bit in the SPSR register.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Times, Times New Roman, serif;"&gt;&lt;b&gt;&lt;i&gt;SLAVE MODE:&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ol style="text-align: left;"&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Select the slave mode using the SPCR register.&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Wait until the SPIF flag in the status register is set.&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Read the data from the SPDR register in the slave controller.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 style="text-align: justify;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;CODE:&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;This code was built using Keil uVision 4 compiler. The code was built in such a way to transmit data from a Master controller to the slave controller where the data is then sent to PORT 1.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;table style="background-color: #3c98ff; width: 100%;"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;ol style="color: white; text-align: left;"&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;#include&amp;lt;lpc21xx.h&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;int main(void)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;PINSEL0=(1&amp;lt;&amp;lt;8)|(1&amp;lt;&amp;lt;10)|(1&amp;lt;&amp;lt;12); //Selecting SPI pins&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;IODIR0=(1&amp;lt;&amp;lt;7);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;IOSET0=(1&amp;lt;&amp;lt;7);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;S0SPCCR=8; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //SPI frequency&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;S0SPCR=0x38; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //SPI master mode&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;IOCLR0=(1&amp;lt;&amp;lt;7);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;while(1)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;S0SPDR=0xff; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Data transmission&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;while(!(S0SPSR&amp;amp;(1&amp;lt;&amp;lt;7))); &amp;nbsp; //Status check&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;S0SPDR=0x0f;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;while(!(S0SPSR&amp;amp;(1&amp;lt;&amp;lt;7)));&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;}&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;NOTE:&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Make changes in the above code as stated in the Programming steps of the Slave controller to obtain the code for the slave device.&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;You can use any pin to select the slave by pulling it low.&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Multiple slaves can be connected to a single master by assigning each slave select that is SSEL pins from the master for the slaves.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDAWf8h-Qyd8wkyee2D2TaYGFthtriPbslt4n2asHJtLt67hW1ZWOy04nTPdc32kC7P7cGNhaqrj1Gst9HuWpT05xiiKQYBmiT77V5pJCUhJmYwEPN8U1gCLM7VZSQ8YNQL0y5XtFM_zQ/s72-c/spi-protocol-arm-microcontroller.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>Frankpunter@gmail.com (Anonymous)</author></item><item><title>Transmitting and receiving data using UART in PIC Microcontroller</title><link>http://gadgetronicx.blogspot.com/2014/12/uart-tutorial-in-pic-microcontroller.html</link><category>embedded C tutorials</category><category>Frank Donald</category><category>PIC Microcontroller</category><pubDate>Sat, 20 Dec 2014 20:18:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-44917801884187835.post-3464483174080830388</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgicA7pc3LFdhibMRtSCj_UDSwNxE-r5RcoMuu52ue_ulAKt0usZ94LxOBaN3B7j7sygBFmjL5ODlWeEFLhYJacCCI1EUAeKECNBMGvAAIhgZ8UJkk1YGthyphenhyphendBzJt25MclUy-OhDB5wl-4/s1600/uart-pic-microcontroller.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="UART-tutorial-pic-microcontroller" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgicA7pc3LFdhibMRtSCj_UDSwNxE-r5RcoMuu52ue_ulAKt0usZ94LxOBaN3B7j7sygBFmjL5ODlWeEFLhYJacCCI1EUAeKECNBMGvAAIhgZ8UJkk1YGthyphenhyphendBzJt25MclUy-OhDB5wl-4/s1600/uart-pic-microcontroller.png" height="488" title="UART tutorial" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;UART or serial communication is one of the important protocol used by the Microcontrollers to transmit and receive data from the external devices. Almost every controller is equipped with this protocol to make transmission and reception easier just using two pins. This tutorial will teach you to initialize and send data by using UART in PIC microcontroller.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;I assume that you are familiar with the concept of UART and proceed to explain the steps to initialize and use it in PIC controller. If you are familiar with the concept of &amp;nbsp;UART kindly go through this &lt;a href="http://www.ti.com/lit/ug/sprugp1/sprugp1.pdf" rel="nofollow" target="_blank"&gt;link &lt;/a&gt;before proceeding.&lt;/span&gt;&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;REGISTERS USED IN UART:&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style="text-align: left;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;&lt;b&gt;TXSTA REGISTER:&lt;/b&gt;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;This register have the status and control bits of the Transmission in the controller.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;&lt;b&gt;RXSTA:&lt;/b&gt;&lt;/i&gt;&lt;/span&gt; &lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;This register holds the status and control bits of the Reception in the microcontroller.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style="text-align: justify;"&gt;
&lt;i&gt;&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;b&gt;SPBRG:&lt;/b&gt;&lt;/span&gt;&lt;/i&gt; &lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;This register holds the value which decides the baud rate of the serial communication. The formula governing the calculation varies based on the modes high speed and low speed.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;b&gt;&lt;i&gt;LOW SPEED:&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style="text-align: center;"&gt;
&lt;i&gt;&lt;b&gt;(Asynchronous) Baud Rate = FOSC/(64 (X + 1))&lt;/b&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style="text-align: center;"&gt;
&lt;i&gt;&lt;b&gt;(Synchronous) Baud Rate = FOSC/(4 (X + 1))&lt;/b&gt;&lt;/i&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;&lt;b&gt;HIGH SPEED:&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style="text-align: center;"&gt;
&lt;i&gt;&lt;span style="font-family: Times, Times New Roman, serif;"&gt;&lt;b&gt;Baud Rate = FOSC/(16 (X + 1))&lt;/b&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Where X is the value of SPBRG register.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Since we are using standard 9600 bps, we are about to use 129 in the SPBRG register. According to the datasheet it results in giving 9600 bps 20MHZ crystal. You can find brief explanation of the bits in these registers in the datasheet of this controller.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: center;"&gt;
&lt;a class="button-blue" href="http://bit.ly/1wWFkcu" rel="nofollow" style="color: white; text-decoration: none;" target="_blank"&gt;PIC 16F877A DATSHEET DOWNLOAD&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;i&gt;&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;CODE:&lt;/span&gt;&lt;/i&gt;&lt;/h3&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;This code was built using PIC C compiler. The code was built in a way to transmit the word "SRT" through UART to the hyperterminal and then print the received bytes in the LCD.&lt;/span&gt; &amp;nbsp;&lt;/div&gt;
&lt;br /&gt;
&lt;table style="background-color: #3c98ff; width: 100%;"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;ol style="color: white; text-align: left;"&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;#include &amp;lt;usart.h&amp;gt;&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;#byte lcd=0x06&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;#byte TRIS_lcd=0x86&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;#bit en=0x07.1&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;#bit rs=0x07.0&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;#bit TRIS_en=0x87.1&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;#bit TRIS_rs=0x87.0&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;#byte TXSTA=0x98&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;#byte RCSTA=0x18&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;#byte SPBRG=0x99&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;#byte TXREG=0x19&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;#bit TXIF=0x0c.4&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;#byte RXREG=0x1A&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;#bit RXIF=0x0c.5&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;char c;&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;void display(char a,int b) &amp;nbsp; &amp;nbsp; //lcd subroutine&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; {&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; lcd=a;&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; rs=b;&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; en=1;&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; delay_ms(100);&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; en=0;&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; delay_ms(100);&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; }&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;void main()&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; {&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;TRIS_lcd=TRIS_rs=TRIS_en=0;&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;display(0x38,0);&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;display(0x01,0);&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;display(0x0f,0);&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;TXSTA=0x26; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //initializing transmission&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;RCSTA=0x90; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Initializing reception&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;SPBRG=129; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Setting Baud rate&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;TXREG='S';&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;while(TXIF==0); &amp;nbsp; &amp;nbsp; &amp;nbsp;//Waiting for transmission flag to set&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;TXREG='R';&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;while(TXIF==0);&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;TXREG='T';&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;while(TXIF==0);&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;while(TRUE)&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while(RXIF==0); &amp;nbsp;//Waiting for reception flag to set&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; c=RXREG;&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; display(c,1);&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;}&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgicA7pc3LFdhibMRtSCj_UDSwNxE-r5RcoMuu52ue_ulAKt0usZ94LxOBaN3B7j7sygBFmjL5ODlWeEFLhYJacCCI1EUAeKECNBMGvAAIhgZ8UJkk1YGthyphenhyphendBzJt25MclUy-OhDB5wl-4/s72-c/uart-pic-microcontroller.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>Frankpunter@gmail.com (Anonymous)</author><enclosure length="598397" type="application/pdf" url="http://www.ti.com/lit/ug/sprugp1/sprugp1.pdf"/><itunes:explicit>no</itunes:explicit><itunes:subtitle>UART or serial communication is one of the important protocol used by the Microcontrollers to transmit and receive data from the external devices. Almost every controller is equipped with this protocol to make transmission and reception easier just using two pins. This tutorial will teach you to initialize and send data by using UART in PIC microcontroller. I assume that you are familiar with the concept of UART and proceed to explain the steps to initialize and use it in PIC controller. If you are familiar with the concept of &amp;nbsp;UART kindly go through this link before proceeding. REGISTERS USED IN UART: TXSTA REGISTER:&amp;nbsp;This register have the status and control bits of the Transmission in the controller. RXSTA: This register holds the status and control bits of the Reception in the microcontroller. SPBRG: This register holds the value which decides the baud rate of the serial communication. The formula governing the calculation varies based on the modes high speed and low speed. LOW SPEED: (Asynchronous) Baud Rate = FOSC/(64 (X + 1)) (Synchronous) Baud Rate = FOSC/(4 (X + 1)) HIGH SPEED: Baud Rate = FOSC/(16 (X + 1)) Where X is the value of SPBRG register. Since we are using standard 9600 bps, we are about to use 129 in the SPBRG register. According to the datasheet it results in giving 9600 bps 20MHZ crystal. You can find brief explanation of the bits in these registers in the datasheet of this controller. PIC 16F877A DATSHEET DOWNLOAD CODE: This code was built using PIC C compiler. The code was built in a way to transmit the word "SRT" through UART to the hyperterminal and then print the received bytes in the LCD. &amp;nbsp; #include &amp;lt;usart.h&amp;gt; #byte lcd=0x06 #byte TRIS_lcd=0x86 #bit en=0x07.1 #bit rs=0x07.0 #bit TRIS_en=0x87.1 #bit TRIS_rs=0x87.0 #byte TXSTA=0x98 #byte RCSTA=0x18 #byte SPBRG=0x99 #byte TXREG=0x19 #bit TXIF=0x0c.4 #byte RXREG=0x1A #bit RXIF=0x0c.5 char c; void display(char a,int b) &amp;nbsp; &amp;nbsp; //lcd subroutine &amp;nbsp; { &amp;nbsp; &amp;nbsp; lcd=a; &amp;nbsp; &amp;nbsp; rs=b; &amp;nbsp; &amp;nbsp; en=1; &amp;nbsp; &amp;nbsp; delay_ms(100); &amp;nbsp; &amp;nbsp; en=0; &amp;nbsp; &amp;nbsp; delay_ms(100); &amp;nbsp; } void main() &amp;nbsp; { &amp;nbsp; &amp;nbsp;TRIS_lcd=TRIS_rs=TRIS_en=0; &amp;nbsp; &amp;nbsp;display(0x38,0); &amp;nbsp; &amp;nbsp;display(0x01,0); &amp;nbsp; &amp;nbsp;display(0x0f,0); &amp;nbsp; &amp;nbsp;TXSTA=0x26; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //initializing transmission&amp;nbsp; &amp;nbsp; &amp;nbsp;RCSTA=0x90; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Initializing reception &amp;nbsp; &amp;nbsp;SPBRG=129; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Setting Baud rate &amp;nbsp; &amp;nbsp;TXREG='S'; &amp;nbsp; &amp;nbsp;while(TXIF==0); &amp;nbsp; &amp;nbsp; &amp;nbsp;//Waiting for transmission flag to set &amp;nbsp; &amp;nbsp;TXREG='R'; &amp;nbsp; &amp;nbsp;while(TXIF==0); &amp;nbsp; &amp;nbsp;TXREG='T'; &amp;nbsp; &amp;nbsp;while(TXIF==0); &amp;nbsp; &amp;nbsp;while(TRUE) &amp;nbsp; &amp;nbsp; &amp;nbsp; { &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while(RXIF==0); &amp;nbsp;//Waiting for reception flag to set &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; c=RXREG; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; display(c,1); &amp;nbsp; &amp;nbsp; &amp;nbsp; } }</itunes:subtitle><itunes:author>Frankpunter@gmail.com (Anonymous)</itunes:author><itunes:summary>UART or serial communication is one of the important protocol used by the Microcontrollers to transmit and receive data from the external devices. Almost every controller is equipped with this protocol to make transmission and reception easier just using two pins. This tutorial will teach you to initialize and send data by using UART in PIC microcontroller. I assume that you are familiar with the concept of UART and proceed to explain the steps to initialize and use it in PIC controller. If you are familiar with the concept of &amp;nbsp;UART kindly go through this link before proceeding. REGISTERS USED IN UART: TXSTA REGISTER:&amp;nbsp;This register have the status and control bits of the Transmission in the controller. RXSTA: This register holds the status and control bits of the Reception in the microcontroller. SPBRG: This register holds the value which decides the baud rate of the serial communication. The formula governing the calculation varies based on the modes high speed and low speed. LOW SPEED: (Asynchronous) Baud Rate = FOSC/(64 (X + 1)) (Synchronous) Baud Rate = FOSC/(4 (X + 1)) HIGH SPEED: Baud Rate = FOSC/(16 (X + 1)) Where X is the value of SPBRG register. Since we are using standard 9600 bps, we are about to use 129 in the SPBRG register. According to the datasheet it results in giving 9600 bps 20MHZ crystal. You can find brief explanation of the bits in these registers in the datasheet of this controller. PIC 16F877A DATSHEET DOWNLOAD CODE: This code was built using PIC C compiler. The code was built in a way to transmit the word "SRT" through UART to the hyperterminal and then print the received bytes in the LCD. &amp;nbsp; #include &amp;lt;usart.h&amp;gt; #byte lcd=0x06 #byte TRIS_lcd=0x86 #bit en=0x07.1 #bit rs=0x07.0 #bit TRIS_en=0x87.1 #bit TRIS_rs=0x87.0 #byte TXSTA=0x98 #byte RCSTA=0x18 #byte SPBRG=0x99 #byte TXREG=0x19 #bit TXIF=0x0c.4 #byte RXREG=0x1A #bit RXIF=0x0c.5 char c; void display(char a,int b) &amp;nbsp; &amp;nbsp; //lcd subroutine &amp;nbsp; { &amp;nbsp; &amp;nbsp; lcd=a; &amp;nbsp; &amp;nbsp; rs=b; &amp;nbsp; &amp;nbsp; en=1; &amp;nbsp; &amp;nbsp; delay_ms(100); &amp;nbsp; &amp;nbsp; en=0; &amp;nbsp; &amp;nbsp; delay_ms(100); &amp;nbsp; } void main() &amp;nbsp; { &amp;nbsp; &amp;nbsp;TRIS_lcd=TRIS_rs=TRIS_en=0; &amp;nbsp; &amp;nbsp;display(0x38,0); &amp;nbsp; &amp;nbsp;display(0x01,0); &amp;nbsp; &amp;nbsp;display(0x0f,0); &amp;nbsp; &amp;nbsp;TXSTA=0x26; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //initializing transmission&amp;nbsp; &amp;nbsp; &amp;nbsp;RCSTA=0x90; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Initializing reception &amp;nbsp; &amp;nbsp;SPBRG=129; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Setting Baud rate &amp;nbsp; &amp;nbsp;TXREG='S'; &amp;nbsp; &amp;nbsp;while(TXIF==0); &amp;nbsp; &amp;nbsp; &amp;nbsp;//Waiting for transmission flag to set &amp;nbsp; &amp;nbsp;TXREG='R'; &amp;nbsp; &amp;nbsp;while(TXIF==0); &amp;nbsp; &amp;nbsp;TXREG='T'; &amp;nbsp; &amp;nbsp;while(TXIF==0); &amp;nbsp; &amp;nbsp;while(TRUE) &amp;nbsp; &amp;nbsp; &amp;nbsp; { &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while(RXIF==0); &amp;nbsp;//Waiting for reception flag to set &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; c=RXREG; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; display(c,1); &amp;nbsp; &amp;nbsp; &amp;nbsp; } }</itunes:summary><itunes:keywords>Gagdgetronicx,Electronics,Gadgets,technology,Circuits</itunes:keywords></item><item><title>Christmas Tree lighting circuit</title><link>http://gadgetronicx.blogspot.com/2014/12/christmas-tree-lighting-circuit.html</link><category>Frank Donald</category><category>lighting circuits</category><pubDate>Tue, 16 Dec 2014 22:34:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-44917801884187835.post-3119908274066834665</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgp47iamQR1uUZxVLcGjTu7eJcwvAczSehOe5tdvwTvJK90DvdPTOTtqeh_UGc-SBgmFLs7jt-5aacvDFU2SKj7NP55F4ANDx84PYPgXRTtzTAEe2XmER48bCfqykwQbmFZpX-jn2KaEBs/s1600/christmas-tree-lighting-circuit.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgp47iamQR1uUZxVLcGjTu7eJcwvAczSehOe5tdvwTvJK90DvdPTOTtqeh_UGc-SBgmFLs7jt-5aacvDFU2SKj7NP55F4ANDx84PYPgXRTtzTAEe2XmER48bCfqykwQbmFZpX-jn2KaEBs/s1600/christmas-tree-lighting-circuit.png" height="620" style="margin-left: -20px;" width="720" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div dir="ltr"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir="ltr"&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Christmas is just around the corner and its time to decorate our home with attractive lighting and other stuffs. The above given electronic design may help you to make a personalized Christmas tree lighting by your own. This circuit uses simple IC 555 and Dual flip flop IC to generate various frequency signals and use those signals to lit the LED's in a pattern. This will give a beautiful lighting effect. Also the cost of building this simple circuit is pretty low.&lt;/span&gt;&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div dir="ltr"&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h3 style="text-align: justify;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;WORKING:&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The 555 timer IC was wired as an astable multivibrator which produce square wave as output in its pin 3. The frequency of the output pulse depends on the Resistors and capacitor connected to the pin 7,6 and 2 of the timer IC. Also a pot can be used in the place of &amp;nbsp;Resistor R1 if you wish to alter the operating frequency of the IC 555. The output frequency of the 555 was given by the equation&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: center;"&gt;
&lt;span style="font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;&lt;b&gt;F= 1.44/ (R2&amp;nbsp;+2R1)C2&amp;nbsp;&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div dir="ltr"&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The dual flip flop IC 4013 forms the next stage of this design. The dual flip flops was wired in such a way to divide the frequency of the incoming signal from the astable multivibrator. The IC2:A divides the incoming signal by a factor of 2 and the output signal obtained from the pin 1 will be F/2 frequency of the original signal. On the other hand IC2:B divides the signal further by a factor of 2 and gives F/4 signal frequency in the output pin 13.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The final part of this circuit was the combination of LED's and transistors. The transistors was used to switch the LED's on and off. Only one transistor and LED combination was shown in the circuit for the simplicity of the design. Use individual Transistor and LED combination for each of the output signal that is F, F/2 and F/4 signal outputs.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Each transistor can drive about 20 LED's connected to it. You can increase the number of LED's by choosing the appropriate transistor to do the job. Thus the three different signal frequencies will produce a beautiful lighting effect.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h3 style="text-align: justify;"&gt;
&lt;i&gt;&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;NOTE:&lt;/span&gt;&lt;/i&gt;&lt;/h3&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Substituting R1 with (0-100k) POT will help you to obtain wide range of frequency outputs and it will increase the attractiveness of this lighting effect.&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Choose different color LED's for each output signals.&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Wound the LED's around your tree and your personalized lighting for X-mas tree is ready.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgp47iamQR1uUZxVLcGjTu7eJcwvAczSehOe5tdvwTvJK90DvdPTOTtqeh_UGc-SBgmFLs7jt-5aacvDFU2SKj7NP55F4ANDx84PYPgXRTtzTAEe2XmER48bCfqykwQbmFZpX-jn2KaEBs/s72-c/christmas-tree-lighting-circuit.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>Frankpunter@gmail.com (Anonymous)</author></item><item><title>Vertical Image flip using CSS and HTML</title><link>http://gadgetronicx.blogspot.com/2014/12/vertical-image-flip-using-css-and-html.html</link><category>CSS codes</category><category>Frank Donald</category><category>html</category><pubDate>Tue, 9 Dec 2014 22:13:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-44917801884187835.post-419341438843878690</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgshSvE6vfLBK-8Ddzgn19PzwQc69nhcxtFDVZZX1xkziTf-UFm0yaqoR13JYJllMRygT1PTs89FTXwuZmUwKcxhiWHoZtbF8eSgPVuJr59bl88_r_rEAlVmnFS68UxhtNNinyL6vMaQ5E/s1600/Christmas-Tree-Lights-991.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="Christmas-tree-image-hover-effect-css-html" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgshSvE6vfLBK-8Ddzgn19PzwQc69nhcxtFDVZZX1xkziTf-UFm0yaqoR13JYJllMRygT1PTs89FTXwuZmUwKcxhiWHoZtbF8eSgPVuJr59bl88_r_rEAlVmnFS68UxhtNNinyL6vMaQ5E/s1600/Christmas-Tree-Lights-991.jpg" height="360" title="Image hover effect" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Image flipping hover effects can be very useful where we need to display dual images about a specific theme or product in a single spot. This effect can be implemented very easily using simple CSS and HTML. You can view the demo of this vertical flip effect in the below link.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style="text-align: center;"&gt;
&lt;a class="button-blue" href="http://www.gadgetronicx.com/p/blog-page_9.html" rel="nofollow" target="_blank"&gt;View Demo&lt;/a&gt;&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style="text-align: left;"&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;i&gt;&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;CSS CODE:&lt;/span&gt;&lt;/i&gt;&lt;/h3&gt;
&lt;/div&gt;
&lt;div style="text-align: left;"&gt;
&lt;/div&gt;
&lt;table style="background-color: #3c98ff; width: 100%;"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;ol style="color: white; text-align: left;"&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;.vertical_flip {&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; width:250px; height:250px; position:relative;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -webkit-transform-style: preserve-3d;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -webkit-transform-origin: 100% 125px;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -webkit-transition: all 0.7s ease;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; transform-style: preserve-3d;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; transform-origin: 100% 125px;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; transition: all 0.7s ease;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;.container:hover .vertical_flip {&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-webkit-transform: rotateX(-180deg);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;transform: rotateX(-180deg);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;.front, .back {&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;width:250px;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;height:250px;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;position:absolute;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;left:0;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-webkit-backface-visibility:hidden;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;backface-visibility:hidden;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;.back {&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-webkit-transform: rotateX(180deg);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;transform: rotateX(180deg);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The property "&lt;i style="background-color: #cfe2f3;"&gt;transform:rotateX(-180deg)&lt;/i&gt;" flips the front image to 180 degree revealing the image in the back when the container is hovered. "&lt;span style="background-color: #cfe2f3;"&gt;backface-visibility:hidden&lt;/span&gt;" is used to hide the alternate image so that a single image is displayed at an instant.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;HTML CODE:&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;/div&gt;
&lt;div style="text-align: left;"&gt;
&lt;table style="background-color: #3c98ff; width: 100%;"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;ol style="color: white; text-align: left;"&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;lt;div class="container"&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;lt;div class="vertical_flip"&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;lt;img class="front" src="Front Image URL"&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;lt;img class="back" src="Back Image URL"&amp;gt;&amp;lt;/img&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;div&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The HTML part of this code is pretty straightforward. All you have to do is to place the elements in "&lt;span style="background-color: #cfe2f3;"&gt;div&lt;/span&gt;" container with respective classes.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgshSvE6vfLBK-8Ddzgn19PzwQc69nhcxtFDVZZX1xkziTf-UFm0yaqoR13JYJllMRygT1PTs89FTXwuZmUwKcxhiWHoZtbF8eSgPVuJr59bl88_r_rEAlVmnFS68UxhtNNinyL6vMaQ5E/s72-c/Christmas-Tree-Lights-991.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>Frankpunter@gmail.com (Anonymous)</author></item><item><title>Universal Liquid level indicator with pump control </title><link>http://gadgetronicx.blogspot.com/2014/12/universal-liquid-level-indicator-circuit.html</link><category>electronic projects</category><category>Ron Hoffman</category><pubDate>Fri, 5 Dec 2014 11:47:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-44917801884187835.post-273038418662697253</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhc07Gmvz3-LD7g8FJ5XT7bnyjwsMdl7KknK2O4bw6MaerRAPisZNOpKgjHj4U6CIgtw_Wodw6-532EdM6YxuJAe-CJyw_SOL8Ioa6oTFUpovPhj_izCf6gvedjY9YojHcIkSUOYqWHEiY/s1600/water-level-indicator-circuit.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="universal-liquid-level-indicator-circuit" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhc07Gmvz3-LD7g8FJ5XT7bnyjwsMdl7KknK2O4bw6MaerRAPisZNOpKgjHj4U6CIgtw_Wodw6-532EdM6YxuJAe-CJyw_SOL8Ioa6oTFUpovPhj_izCf6gvedjY9YojHcIkSUOYqWHEiY/s1600/water-level-indicator-circuit.png" height="500" style="margin-left: -10px;" title="Level indicator" width="720" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Liquid level indicator circuits are highly useful to monitor the level of liquids present in a tanks where access to the tanks are difficult. This circuit uses pressure sensor to sense the level of liquid in the tank which eliminates the drawbacks such as: corrosion of the sensing electrodes, ionic conduction property of liquid etc., which were used in the primitive liquid level indicator circuits. Also &amp;nbsp;the alarm in this circuit offers the added advantage of alerting the user to turn OFF the liquid pump or valve.&lt;/span&gt;&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;WORKING OF CIRCUIT:&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The tank is 6 to 7 feet deep and might contain oil, water, gasoline, or other liquids. A sense tube is connected to the pressure sensor port. It is attached to the bottom of the tank by either plumbing to a bottom of the tank drain line, or the sense tube is inserted to the bottom of the tank with an opening near the tank bottom. When the liquid fills the tank, the trapped air in the tube is compressed. The increase in pressure is proportional to the depth.&lt;/span&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCoLNH1GEXmOCBj20t4Q1mj9Q9Ljtai9ClwrRwGvyoUBkFq4MpdBBbydzHCFqShqwb_w7RJR4GX6tIAUI2kbtY-2DOLYAc67wsFiVc8YrPbGCwvdiBJnSZDe1VMMktHGQcEDTzvGBxOwo/s1600/pressure-sensor.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="liquid-indicator-tank-set-up" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCoLNH1GEXmOCBj20t4Q1mj9Q9Ljtai9ClwrRwGvyoUBkFq4MpdBBbydzHCFqShqwb_w7RJR4GX6tIAUI2kbtY-2DOLYAc67wsFiVc8YrPbGCwvdiBJnSZDe1VMMktHGQcEDTzvGBxOwo/s1600/pressure-sensor.png" height="230" title="Tank set up" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;For water, every inch of water depth is an increase of 249.0892 Pascals of pressure. For a 7 foot deep tank, (84 inches), the resultant pressure increase in the sense tube would be 249.082 x 84 = 20,922.888 Pascals. The pressure sensor chosen is a Freescale MPXM2051G with a full scale of 7.25 PSI (50 kPa), and a full scale output of 40 mV. Since our example is 84 inches deep, the sensor output will be&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: center;"&gt;
&lt;i&gt;&lt;b&gt;&lt;span style="font-family: Times, Times New Roman, serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;
&lt;i&gt;&lt;b&gt;&lt;span style="font-family: Times, Times New Roman, serif;"&gt;40 mV * 20922.888 / 50,000 = 16.74 mV&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;In order to obtain the best resolution, a desired output for full is chosen to be between 4.0 and 4.5 volts. Thus, a gain of approximately&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;div style="text-align: center;"&gt;
&lt;span style="font-family: Times, Times New Roman, serif;"&gt;&lt;b&gt;&lt;i&gt;4.25 / .01674 = 253.883 is needed.&amp;nbsp;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The pressure sensor is connected to Op-amp U2A and U2B via R6, and R7 respectively. U2A and U2B are used as differential input amplifier referenced to ground. This means that if the pressure sensor +/- outputs are equal, (when pressure is zero), then the output of U2B will be zero.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;As the sensor pressure rises, the differential output increases. In our example, when the pressure reaches 20,922.88 Pa, or 20.923 KPa, then the output will be 16.74 mV. The GAIN of the differential amplifier, when R1/R2 = R4/R3 is GAIN = Vo/Vin = [1 + (R4/R3)] = [1 + (R1/R2)]. Applying this formula to the needed GAIN of about 250, The schematic values obtained were R1, R4 = 1 Meg, and R2, R3 = 3.9K ohms. Plugging those values into the GAIN formula yields,&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;div style="text-align: center;"&gt;
&lt;span style="font-family: Times, Times New Roman, serif;"&gt;&lt;b&gt;&lt;i&gt;[1 + (1Meg/3.9K)] = 257.41&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Thus, at full scale, the sensor output for a depth of 84 inches = .01674 * 257.41 = 4.31 volts.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;U2C and U2D serve as comparators which compare the output of U2B to an adjustable reference provided by R8 and R10. If more levels are desired, U2A and U2B can be in a MCP6022 dual RRIO op-amp and an additional MCP6024 quad RRIO op-amp can be used as a four level comparator. In the schematic, The tank can be filled to a desired level and the reference pot R8 adjusted so the LED, D1 just turns ON. The tank can then be filled to the full level and reference pot R10 adjusted so LED, D2 just turns ON. R12, Q1 and BZ1 form an audible alarm that can be added if desired to indicate the full level. Adding a switch to turn OFF the alarm may be desired.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;If the dual - quad op-amp approach is used, the MCP6024 quad op-amp can be connected to the resistor ladder shown. All of the -inputs of the op-amps are connected to the output of U2B. The &lt;complete id="goog_1792846743"&gt;+&lt;/complete&gt;inputs are connected to the 25%, 50%, 75%, and FULL nodes of the resistive ladder. R20 serves as an adjustment for the FULL tank level. Then each LED will represent a one fourth of FULL value. This only works for a vertical walled tank. If you use a cylinder on it's side, then the tank should be filled in fourths, a pot used to just turn ON the appropriate LED. In other words. Use a pot to adjust each individual LED level threshold.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;One more thing could be added to automate the tank filling. If an R-S latch, (RESET-SET), was connected so that it was set when the tank was below one of the lower levels, say 50%, and then reset when it reached 100%, the latch output could drive a relay to turn ON and OFF a fill pump, or OPEN and CLOSE a solenoid fill valve. This would automate the tank filling procedure and eliminates the need of an alarm.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;I included a circuit to simulate the sensor in order to test the circuit. It divides the 5 volt supply into a middle reference (Vsupp/2) and differential adjustment from 0 to 19 mV. I hope everyone finds this circuit useful for a universal liquid level indicator.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Finally, another thought is to take the output of U2B and perform an A/D conversion with a PIC microcontroller and then light a given LED whenever the A/D reading is above a defined level in the program. This way, you could have as many levels as desired. Another idea would be to do some simple integer math in the PIC and indicate the level on an LCD display as a percentage. The advantage would be higher resolution of the tanks fill level.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;i&gt;&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;DESIGN AND TUTORIAL BY:&lt;/span&gt;&lt;/i&gt;&lt;/h3&gt;
&lt;/div&gt;
&lt;table style="background-color: #f4f4f4; margin-left: -17px; width: 100%;"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhurQ0_xffPkBm3ugzv0jn_chPXc4YIO_EQO7ZYtrp5XuQPEFezw5X5N1Zcj9BWBWpl4MKHRgJOXy8T7ZsxDUvSaqoamn_AWiTNfhyphenhyphengZ294nhZa2h1Kc7cNmNOwemt1_wtiYxs9rtxp05c/s1600/Dscf4136_C_3x3.5.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhurQ0_xffPkBm3ugzv0jn_chPXc4YIO_EQO7ZYtrp5XuQPEFezw5X5N1Zcj9BWBWpl4MKHRgJOXy8T7ZsxDUvSaqoamn_AWiTNfhyphenhyphengZ294nhZa2h1Kc7cNmNOwemt1_wtiYxs9rtxp05c/s1600/Dscf4136_C_3x3.5.jpg" height="175" width="150" /&gt;&lt;/a&gt;
&lt;/td&gt;
&lt;td style="margin-left: -5px; padding: 10px;"&gt;&lt;div style="margin-left: 10px; text-align: justify;"&gt;
&lt;i&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;Ron Hoffman is the President of Hoffman Electronics Inc. He is a veteran in the field of Electronics and Embedded Systems. Also honored and listed in "Who's Who of American Inventors" 1996-1997;1998-1999 for patented inventions. Other than this he loves swimming, tennis, music and hiking. Read his articles in our site &lt;a href="http://www.gadgetronicx.com/search/label/Ron%20Hoffman" rel="nofollow" target="_blank"&gt;here&lt;/a&gt;.&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style="margin-left: 10px; text-align: justify;"&gt;
&lt;i&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;Website:&amp;nbsp;&lt;a href="http://rjheinc.com/" rel="nofollow" target="_blank"&gt;http://rjheinc.com/&lt;/a&gt;&lt;/span&gt;&lt;/i&gt;
&lt;br /&gt;
&lt;i&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;Follow Him on LinkedIn:&amp;nbsp;&lt;a href="http://www.linkedin.com/pub/ron-hoffman/18/84b/836" rel="nofollow" target="_blank"&gt;Ron Hoffman&lt;/a&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhc07Gmvz3-LD7g8FJ5XT7bnyjwsMdl7KknK2O4bw6MaerRAPisZNOpKgjHj4U6CIgtw_Wodw6-532EdM6YxuJAe-CJyw_SOL8Ioa6oTFUpovPhj_izCf6gvedjY9YojHcIkSUOYqWHEiY/s72-c/water-level-indicator-circuit.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>Frankpunter@gmail.com (Anonymous)</author></item><item><title>DIY 30 Watt Stereo Amplifier Circuit </title><link>http://gadgetronicx.blogspot.com/2014/12/diy-30-watt-stereo-amplifier-circuit.html</link><category>amplifier circuits</category><category>electronic projects</category><category>Ron Hoffman</category><pubDate>Wed, 3 Dec 2014 15:21:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-44917801884187835.post-1050945311950475295</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0F4XcNGIH9rELYiA6HUQ6roaPfN_4zgSkwwOfkaJNRAAHizVRZpJkiZeXSrxogOEKXrvTqmfcwRpdLS-4UjbOfdaGNLOrMNjFIU3SMEOafL6f0aAYTohkQfEMjam60RYcmCtLSBFuO-Y/s1600/30watt-speaker.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="Stereo-amplifier" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0F4XcNGIH9rELYiA6HUQ6roaPfN_4zgSkwwOfkaJNRAAHizVRZpJkiZeXSrxogOEKXrvTqmfcwRpdLS-4UjbOfdaGNLOrMNjFIU3SMEOafL6f0aAYTohkQfEMjam60RYcmCtLSBFuO-Y/s1600/30watt-speaker.jpg" height="480" title="Stereo amplifier" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The Stereo Amplifiers are quite handy in places where we need to amplify the input signals to make it audible for all. Weather it was a party or a simple meeting, this thing will do a perfect job in there. This Stereo amplifier is easy to build and will provide amazing audio power and extremely low total harmonic distortion. It is much cleaner than anything I have seen on the market using standard audio IC's.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;CIRCUIT DIAGRAM:&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjdns0QbgpeW4RfiZ1fppc5KwdOlUZV5_sBveNME9MXuufGKgw2M-9mBw1IF9aOiNJrO-AjLGcM5WqO54Ix2sLLtiXY_c4s8-NVnDnBeG-y1LebD5uaPuHveJyaW2dtw-xemV5e759NvU/s1600/30watt-stereo-amplifier-circuit-diagram.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="stereo-amplifier-30-watts-electronic-circuit-diagram" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjdns0QbgpeW4RfiZ1fppc5KwdOlUZV5_sBveNME9MXuufGKgw2M-9mBw1IF9aOiNJrO-AjLGcM5WqO54Ix2sLLtiXY_c4s8-NVnDnBeG-y1LebD5uaPuHveJyaW2dtw-xemV5e759NvU/s1600/30watt-stereo-amplifier-circuit-diagram.png" height="560" style="margin-left: -20px;" title="stereo amplfier" width="730" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;i&gt;&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;WORKING DESCRIPTION:&lt;/span&gt;&lt;/i&gt;&lt;/h3&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The pre-amp section uses two op-amps, U1A and U1B to provide treble and bass boost at low volumes and treble and bass controls for tailoring the sound to the user's preference. Selector switch S2A is a 2P4T, ( 2-pole, 4-throw (position)) rotary type to select from one of four line level inputs, (AUX, CD, TUNER, TAPE). They are coupled to U1A &amp;nbsp;via C1, R1. Switches S3 and S4 are DPDT (double pole, double throw) slide switches that select for treble and bass boost.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;As shown, they are in the OFF (no boost) position. R2 and C2 are shorted out by S4 canceling the bass boost. S1 is open which defeats the treble boost. R1 and R3 form a unity gain invertor/buffer and feed the signal to the treble/bass control network of U1B. If switch S3 is closed, then C3 is in parallel with R1 and boosts the treble gain at a break frequency of 2.34 KHz. If switch S4 is opened, then the feedback loop has an additional gain 16, and a low pass break frequency of 234 Hz.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The tone circuitry, Treble and Bass are enabled via U1B and the feedback network R4 - R9 and C4, C5. The Bass control has a break frequency around 190 Hz and a gain of around 16 db. The Treble control has a break frequency around 1500 Hz and a gain of 15 db. The output of U1B is connected by R11 to the balance control which has a grounded wiper. This decreases or increases the output of the Right and Left channels in an opposite manner to balance the signal level of a common input to both channels.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Resistor R11 connects to J5, the Pre-Amp Output jack and through R12 to J6, the Tape Output jack. Jack J7, is the Power-Amp input jack. A jumper cable must be connected from jacks J5 to J7 to pass the Pre-Amp signal to the Power-Amp. If desired, an effects processor, graphic equalizer or other audio processor can be inserted in the signal chain between jacks, J5 and J7, to further enhance the signal. Switch S5, when closed, combines the Right and Left channels for Mono operation. This is useful for a single channel mic input, or mono input, to enable sound to come out of both speakers, (Right and Left).&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The Power-Amp circuit amplifies the line level signal at jack, J7, to power the 8-ohm Speaker. The signal is passed through C6, C7, which are wired to form a 5 uF non-polar capacitor, to the volume control, R14. The wiper of R14 passes the desired signal level through R15 to the positive input, (base of Q3), of the power op-amp stage.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Q3 and Q4 form the differential input pair of the power op-amp. D8, C8, R18, and R19 isolate the negative voltage rail and act as a current source to transistors, Q3, Q4. Transistor Q5, performs as a level shifter to drive the quasi-complimentary, cascode output pairs formed by transistors Q6, Q7 and transistors Q8, Q9 respectively. Diode D7 and R22 provide the correct bias voltage separation to provide about 10 to 20 mA of idle current through the output stage transistors and resistors R25, R26. This ensures that there is no cross-over distortion in the output signal, because the cascode output transistor pairs are actively conducting at the crossover transition.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Capacitor, C11 and resistors, R23, R24, form a bootstrap bias network that provides the negative bias to cascode transistor pair Q8, Q9, during the negative half cycle of the signal waveform. The Power-Amp stage gain is set by R21, R20 and C9. Except for frequencies lower than 8 Hz, C9 can be ignored in the GAIN equation.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;div style="text-align: center;"&gt;
&lt;b&gt;&lt;i&gt;&lt;span style="font-family: Times, Times New Roman, serif;"&gt;GAIN = Vout/Vin = [1 + (R21/R20)] = 34 = 30.6 db.&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Thus a .5 volt peak input voltage will yield a 17 volt output peak voltage which is ideal for the +/- 18 VDC supply. Transistors Q1, Q2 are connected as emitter follower voltage regulators to supply +/- 11 volts to the TL084 pre-amp IC.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;LED D9 and current limiting resistor R29 indicate when the stereo is ON. The main power supply consists of transformer T1, 25.6 VAC, center-tapped, at 2 to 4 Amps. D1 - D4 form a full-wave bridge rectifier which is filtered by capacitors, C18, C19. Switch S6, Enables or Disables the speakers. Resistor R30 reduces the output before it is connected to the stereo headphone output jack (not shown).&lt;/span&gt;&lt;/div&gt;
&lt;i&gt;&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;
&lt;br /&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;i&gt;&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;NOTE:&lt;/span&gt;&lt;/i&gt;&lt;/h3&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Only the Right Channel Pre-Amp and Power Amp are shown, the Left channel is the same.&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Use dual controls for Treble, Bass and Volume. Use DPDT slide switches for Treble and Bass Boost.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Use a 2P4T (2-pole, 4-throw, position) rotary switch to select sound signal source. Treble and Bass controls are linear taper.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The volume control is audio taper.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;i&gt;&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;STEREO AMPLIFIER:&lt;/span&gt;&lt;/i&gt;&lt;/h3&gt;
&lt;table style="width: 100%px;"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEju97kc8sL7sV5eV3oCVsjxyoL8DH6cRkJ_mtBW7AwKb80qPULiHJbscYY6XZM6rvxzBvJDocHLJuyeLX6YSYRuxlsQFb5GOgbHTasGW0hoU9HWEnBKnTit3Xi8poqGrDBmIL5koJxs8-0/s1600/DSCF4011.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="Stereo-amplifier-diy" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEju97kc8sL7sV5eV3oCVsjxyoL8DH6cRkJ_mtBW7AwKb80qPULiHJbscYY6XZM6rvxzBvJDocHLJuyeLX6YSYRuxlsQFb5GOgbHTasGW0hoU9HWEnBKnTit3Xi8poqGrDBmIL5koJxs8-0/s1600/DSCF4011.jpg" height="240" title="Rear View" width="320" /&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifWf2XPRc5CNNty6b2SMdyLTTTJIOWS-UHP8duxxa1Jrt7sIx2uAj5lVrI36mBRkt19x2zyFeH3Jogm3mHYj7UdGMYWiJ5v-EES2cqNEWBUlXgpTr10PSV0iggFQUFTXN1ElhqMdak0OA/s1600/DSCF4016.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="stereo-amplifier-wiring-picture" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifWf2XPRc5CNNty6b2SMdyLTTTJIOWS-UHP8duxxa1Jrt7sIx2uAj5lVrI36mBRkt19x2zyFeH3Jogm3mHYj7UdGMYWiJ5v-EES2cqNEWBUlXgpTr10PSV0iggFQUFTXN1ElhqMdak0OA/s1600/DSCF4016.jpg" height="240" title="Stereo amplfier wiring" width="320" /&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;DESIGN AND TUTORIAL BY:&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;/div&gt;
&lt;table style="background-color: #f4f4f4; margin-left: -17px; width: 100%;"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhurQ0_xffPkBm3ugzv0jn_chPXc4YIO_EQO7ZYtrp5XuQPEFezw5X5N1Zcj9BWBWpl4MKHRgJOXy8T7ZsxDUvSaqoamn_AWiTNfhyphenhyphengZ294nhZa2h1Kc7cNmNOwemt1_wtiYxs9rtxp05c/s1600/Dscf4136_C_3x3.5.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhurQ0_xffPkBm3ugzv0jn_chPXc4YIO_EQO7ZYtrp5XuQPEFezw5X5N1Zcj9BWBWpl4MKHRgJOXy8T7ZsxDUvSaqoamn_AWiTNfhyphenhyphengZ294nhZa2h1Kc7cNmNOwemt1_wtiYxs9rtxp05c/s1600/Dscf4136_C_3x3.5.jpg" height="175" width="150" /&gt;&lt;/a&gt;
&lt;/td&gt;
&lt;td style="margin-left: -5px; padding: 10px;"&gt;&lt;div style="margin-left: 10px; text-align: justify;"&gt;
&lt;i&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;Ron Hoffman is the President of Hoffman Electronics Inc. He is a veteran in the field of Electronics and Embedded Systems. Also honored and listed in "Who's Who of American Inventors" 1996-1997;1998-1999 for patented inventions. Other than this he loves swimming, tennis, music and hiking. Read his articles in our site &lt;a href="http://www.gadgetronicx.com/search/label/Ron%20Hoffman" rel="nofollow" target="_blank"&gt;here&lt;/a&gt;.&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style="margin-left: 10px; text-align: justify;"&gt;
&lt;i&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;Website:&amp;nbsp;&lt;a href="http://rjheinc.com/" rel="nofollow" target="_blank"&gt;http://rjheinc.com/&lt;/a&gt;&lt;/span&gt;&lt;/i&gt;
&lt;br /&gt;
&lt;i&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;Follow Him on LinkedIn:&amp;nbsp;&lt;a href="http://www.linkedin.com/pub/ron-hoffman/18/84b/836" rel="nofollow" target="_blank"&gt;Ron Hoffman&lt;/a&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;&lt;/div&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0F4XcNGIH9rELYiA6HUQ6roaPfN_4zgSkwwOfkaJNRAAHizVRZpJkiZeXSrxogOEKXrvTqmfcwRpdLS-4UjbOfdaGNLOrMNjFIU3SMEOafL6f0aAYTohkQfEMjam60RYcmCtLSBFuO-Y/s72-c/30watt-speaker.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>Frankpunter@gmail.com (Anonymous)</author></item><item><title>Simple FM bug circuit using Transistor</title><link>http://gadgetronicx.blogspot.com/2014/11/simple-fm-bug-circuit-using-transistor.html</link><category>electronic circuits</category><category>Frank Donald</category><category>hobby circuits</category><category>Transceiver circuits</category><pubDate>Sat, 29 Nov 2014 18:57:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-44917801884187835.post-5349705382063123869</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzuLDLpjEFprs1jCDd_yd6EWnYjgMu-K2UhHhq5SvhtXsuNtK4eMQP8ZgyIxS9zhXv8ZU7RhGbJe6ENkY7-PxIy35V2wFqVLujIxwAz0Cy9PliE1KCVgDPXTB7qyR-1LC0nkx30Hj2WhU/s1600/fm-tranmsitter-bug.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="spy-FM-bug-electronic-circuit-diagram" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzuLDLpjEFprs1jCDd_yd6EWnYjgMu-K2UhHhq5SvhtXsuNtK4eMQP8ZgyIxS9zhXv8ZU7RhGbJe6ENkY7-PxIy35V2wFqVLujIxwAz0Cy9PliE1KCVgDPXTB7qyR-1LC0nkx30Hj2WhU/s1600/fm-tranmsitter-bug.png" height="436" title="Spy FM bug " width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;FM bugs are cool things and we might have seen many of them used in Movies. But we can actually make one fun FM bug using small number of components without spending much money. FM bug circuits should be miniature in size to keep it concealed. The above circuit shows a simple FM bug which was built around a single transistor.&lt;/span&gt;&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;i&gt;&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;WORKING OF CIRCUIT:&lt;/span&gt;&lt;/i&gt;&lt;/h3&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;A simple Microphone was used to input the voice signals from the environment in which the bug is placed. The signal from the Microphone is then fed to the base of the transistor through a Capacitor C1 to impeded the different frequency present in the speech signal. The appropriate voltage at the base of the transistor is given by the combination of Resistors R1 and R3.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The variable Capacitor VC1 and inductor forms the parallel tank circuit which will vibrate at a resonant frequency. &amp;nbsp;The VC1 is a variable capacitor which is used to generate the desired frequency. The resonant frequency signal generated by the tank circuit if governed by the equation&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: center;"&gt;
&lt;i&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style="text-align: center;"&gt;
&lt;i&gt;&lt;b&gt;&lt;span style="font-family: Times, Times New Roman, serif;"&gt;f= 1 / 2π√LC&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The Capacitors C2 and C3 acts as a decoupling capacitors. Whereas the Capacitor C4 across the transistor serves to keep the tank circuit vibrating since frequency decay may occur due to heating losses. A thin strand of copper wire of length 30 inch can be used as an antenna in this above circuit. This circuit over a distance around 50 feet and only suitable for short ranges.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h3 style="text-align: justify;"&gt;
&lt;i&gt;&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;NOTE:&lt;/span&gt;&lt;/i&gt;&lt;/h3&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Use dead air frequencies for clear reception of the audio signals.&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Changing the value of Resistor R2 will alter the sensitivity of the microphone.&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;This circuit was intended to hep building a fun bug circuit and cannot achieve much efficiency like the commercial ones.&lt;/span&gt;&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzuLDLpjEFprs1jCDd_yd6EWnYjgMu-K2UhHhq5SvhtXsuNtK4eMQP8ZgyIxS9zhXv8ZU7RhGbJe6ENkY7-PxIy35V2wFqVLujIxwAz0Cy9PliE1KCVgDPXTB7qyR-1LC0nkx30Hj2WhU/s72-c/fm-tranmsitter-bug.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>Frankpunter@gmail.com (Anonymous)</author></item><item><title>Water level indicator Circuit</title><link>http://gadgetronicx.blogspot.com/2014/11/water-level-indicator-circuit-transistors.html</link><category>electronic circuits</category><category>Frank Donald</category><category>hobby circuits</category><pubDate>Tue, 25 Nov 2014 18:18:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-44917801884187835.post-7202542219999144606</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguISRMYp0V4JMeuRBf8Fd4bP4QO9gZamjY8jxNJxMerHYWCyX1wi_4nDnzv86j0bJq0fqZVAZZZUhtCWAv35cCHSdyzfG-TaT7hhH8AE8FuCFYXtIc5sdU19IIXHP5NRAFKtvtkabs4Rs/s1600/water-level-circuit.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="tank-water-level-indicator-with-alarm-circuit-diagram-transistors" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguISRMYp0V4JMeuRBf8Fd4bP4QO9gZamjY8jxNJxMerHYWCyX1wi_4nDnzv86j0bJq0fqZVAZZZUhtCWAv35cCHSdyzfG-TaT7hhH8AE8FuCFYXtIc5sdU19IIXHP5NRAFKtvtkabs4Rs/s1600/water-level-circuit.png" height="590" title="Water level indicator" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Wastage of water is really an issue in places where they use overhead tanks. Monitoring of water level is really a difficult task in those places and it could also lead to wastage of water and power. The above circuit shows a simple water level indicator system based on Tranistors and LED's. This circuit could give a simple and cost effective solution for this problem. This circuit was &amp;nbsp;a simplified version of "Water level indicator" published in Instructables by Raikut.&lt;/span&gt;&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;WORKING OF CIRCUIT:&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The circuit schematic comprises of totally two parts. Indicator section for indicating the water level present in the tank and Alarm section for alerting the people to turn off the pump once the tank is completely filled. The LED's are used for indicating the level whereas the transitors are used as a switching devices. A simple buzzer was used to sound provide the overflow warning. This circuit works based on the conductive property of the water. &lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The positive line of 6V is inserted into the tank, when there is no water in the tank all the three transistors will be in off state. When the water pump is turned on water starts filling the tank, when the water reaches the 1/4 level of the tank it comes in contact with the 1/4th level wire which is connected to the base of the transistor Q1. The water will provide a path for the current to flow from supply to the base of the terminal. This turns the tranistor Q1 in turn Red LED D1 which indicates that 1/4th level of tank is filled with water.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;In the same way when the water reaches the 1/2th level it turns on yellow LED and when the tank is full it turns on the green LED. By this way the LED's help us to determine the level of water in the tank. Coming to the alarm section when the tank is full it turns the transistor Q4 which was wired as a switch to turn on the Buzzer which alerts the person to turn off the pump in order to avoid overflow of tank.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The switch given was used to turn off the alarm after the person is alerted. But do remember to turn the switch on before turning the Pump on or else the alarm won't work. For advanced version of this circuit refer to this article &lt;a href="http://www.instructables.com/id/Water-Level-Indicator-with-Alarm/" target="_blank"&gt;"Water Level Indicator Circuit with Alarm on Instructables"&lt;/a&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;NOTE:&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;You can increase various stages of water level by increasing the number of transitors and LED's in the circuit.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Try Using different colors of LED to avoid confusion or use a marker to write the appropriate water level near the LED's.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguISRMYp0V4JMeuRBf8Fd4bP4QO9gZamjY8jxNJxMerHYWCyX1wi_4nDnzv86j0bJq0fqZVAZZZUhtCWAv35cCHSdyzfG-TaT7hhH8AE8FuCFYXtIc5sdU19IIXHP5NRAFKtvtkabs4Rs/s72-c/water-level-circuit.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">6</thr:total><author>Frankpunter@gmail.com (Anonymous)</author></item><item><title>IDC Ribbon Cable Tester circuit </title><link>http://gadgetronicx.blogspot.com/2014/11/idc-ribbon-cable-tester-circuit.html</link><category>electronic circuits</category><category>Ron Hoffman</category><pubDate>Fri, 21 Nov 2014 09:27:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-44917801884187835.post-6788023515455593489</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1BMC4l-W5i-nqYYnm6-HHcAIHS6ws7XHNSDrCIQgGI5v9AXNh5rwOjUwsCKsMAs38sNQkZfp9SSvUNPNQktOnmp3c0U9V7rpHPrFpn_kjxiLBmxgjnddLt0Ke22WR1iVgLmhZ0rKmyOI/s1600/ribbon%20cable%20.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1BMC4l-W5i-nqYYnm6-HHcAIHS6ws7XHNSDrCIQgGI5v9AXNh5rwOjUwsCKsMAs38sNQkZfp9SSvUNPNQktOnmp3c0U9V7rpHPrFpn_kjxiLBmxgjnddLt0Ke22WR1iVgLmhZ0rKmyOI/s1600/ribbon%20cable%20.jpg" height="312" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The ribbon cable tester is designed to check IDC (Insulation Displacement Connection) &amp;nbsp;ribbon cables quickly for shorts to adjacent pins or opens from one end to the other. Originally, I designed this unit to test ribbon cables used on test equipment in the automotive industry. But it works for any ribbon cable. There are multiple types of sockets used with ribbon cables.&lt;/span&gt;&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;&lt;i&gt;CIRCUIT DIAGRAM:&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2L3u2DcATv6RWCLP2ZIB2iXv5SUmBT5yzIHDyyI9lF7mNVJgFEQqsihp50-f5-kgIqb7sS5OTm9wlA9BZ9ufhwfOWj7F18BoZ90n8pgVPFgQ7yk67Y-tWNiOu962Hy6GABjr-_aOiWSw/s1600/HECableTest2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2L3u2DcATv6RWCLP2ZIB2iXv5SUmBT5yzIHDyyI9lF7mNVJgFEQqsihp50-f5-kgIqb7sS5OTm9wlA9BZ9ufhwfOWj7F18BoZ90n8pgVPFgQ7yk67Y-tWNiOu962Hy6GABjr-_aOiWSw/s1600/HECableTest2.png" style="margin-left: -20px;" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The most common are dual row headers (both male and female) and "D" type connectors (both male and female). If you build the tester and include two sets of 40-pin dual row headers (M&amp;amp;F) and "D" type (M&amp;amp;F) for the "O" port, and the "N" port, you should be able to test most types of ribbon cables. There are ".1" and "2" mm spacings too. Wire the four "O" headers and "D" 's in parallel and the "N" headers and "D" 's in parallel. This will allow the user to test male to female, male to male, female to female and female to male cables all on the same unit.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;h3&gt;
&lt;i&gt;&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;CIRCUIT OPERATION:&lt;/span&gt;&lt;/i&gt;&lt;/h3&gt;
&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The heart of the Ribbon Cable Tester is the clock, U1A, (CD4093 schmitt NAND), R8, C1, they feed the clock pulses to the CP0 input of the U2 (CD4017 sequential decade counter). The outputs of U2 turn ON individually and sequentially with each rising edge clock pulse. After the fourth clock pulse, Q3 of U2, turns OFF, and Q4 turns ON. This resets U2 causing Q0 to turn ON, to continue the four step pattern. When U2, Q0 is (high, 1), the output of U3A is (low, 0), which turns transistor Q2 OFF and Q1 ON and makes output Q0 = (high, 1).&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;When U2 Q0 is (low, 0), the output of U3A is (high, 1), which turns transistor Q1 OFF and Q2 ON and makes output Q0 = (low, 0). So each time an output of the CD4017 goes (high, 1), so does the drive voltage of the corresponding output go (high, 1). U3A, plus transistors Q1 and Q2 form a power buffer to drive the LED matrix.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;When output Q0 is (high, 1), current is able to flow through R6, and the LED to O1. When the Short/Continuity switch is in the continuity position, the O1 green LED will light if the path from O1 to N1 is correct. This applies for all of the corresponding On to Nn connections. When the Short/Continuity switch is in the short position, no LED's will light unless there is a short to an adjacent wire, such as wire O1 to O2, or O3 to O4 etc.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Using the first example, a short between O1 and O2 would cause the green O1 LED and the red O2 Led to light when output Q0 was ON, and would cause the green O2 LED and the red O1 LED to light when the Q1 output is ON. This would show the user that the short in the cable is between conductor 1 and conductor two. This could be from improper clamping of the IDC header on the cable, or faulty insulation between conductors, or a foreign object wedged into the ribbon cable between conductors. Whatever the reason, the Ribbon Cable Tester will find the problem.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The Normal/Test switch allows the user to test the unit to make sure everything is working properly. When the switch is in the Test position, all of the LED's light to show that the clock, counter, buffers and wiring is in good shape. In the Normal position, the unit is ready for testing ribbon cables for continuity and shorts. This is a really good device if you have a number of ribbon cables that need testing.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;i&gt;&lt;span style="color: #3c98ff; font-family: Times, Times New Roman, serif;"&gt;DESIGN AND TUTORIAL BY:&lt;/span&gt;&lt;/i&gt;&lt;/h3&gt;
&lt;/div&gt;
&lt;table style="background-color: #f4f4f4; margin-left: -17px; width: 100%;"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhurQ0_xffPkBm3ugzv0jn_chPXc4YIO_EQO7ZYtrp5XuQPEFezw5X5N1Zcj9BWBWpl4MKHRgJOXy8T7ZsxDUvSaqoamn_AWiTNfhyphenhyphengZ294nhZa2h1Kc7cNmNOwemt1_wtiYxs9rtxp05c/s1600/Dscf4136_C_3x3.5.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhurQ0_xffPkBm3ugzv0jn_chPXc4YIO_EQO7ZYtrp5XuQPEFezw5X5N1Zcj9BWBWpl4MKHRgJOXy8T7ZsxDUvSaqoamn_AWiTNfhyphenhyphengZ294nhZa2h1Kc7cNmNOwemt1_wtiYxs9rtxp05c/s1600/Dscf4136_C_3x3.5.jpg" height="175" width="150" /&gt;&lt;/a&gt;
&lt;/td&gt;
&lt;td style="margin-left: -5px; padding: 10px;"&gt;&lt;div style="margin-left: 10px; text-align: justify;"&gt;
&lt;i&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;Ron Hoffman is the President of Hoffman Electronics Inc. He is a veteran in the field of Electronics and Embedded Systems. Also honored and listed in "Who's Who of American Inventors" 1996-1997;1998-1999 for patented inventions. Other than this he loves swimming, tennis, music and hiking. Read his articles in our site &lt;a href="http://www.gadgetronicx.com/search/label/Ron%20Hoffman" rel="nofollow" target="_blank"&gt;here&lt;/a&gt;.&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style="margin-left: 10px; text-align: justify;"&gt;
&lt;i&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;Website:&amp;nbsp;&lt;a href="http://rjheinc.com/" rel="nofollow" target="_blank"&gt;http://rjheinc.com/&lt;/a&gt;&lt;/span&gt;&lt;/i&gt;
&lt;br /&gt;
&lt;i&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;Follow Him on LinkedIn:&amp;nbsp;&lt;a href="http://www.linkedin.com/pub/ron-hoffman/18/84b/836" rel="nofollow" target="_blank"&gt;Ron Hoffman&lt;/a&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1BMC4l-W5i-nqYYnm6-HHcAIHS6ws7XHNSDrCIQgGI5v9AXNh5rwOjUwsCKsMAs38sNQkZfp9SSvUNPNQktOnmp3c0U9V7rpHPrFpn_kjxiLBmxgjnddLt0Ke22WR1iVgLmhZ0rKmyOI/s72-c/ribbon%20cable%20.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>Frankpunter@gmail.com (Anonymous)</author></item></channel></rss>