<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5832476631874198582</id><updated>2024-09-04T09:03:06.302-07:00</updated><category term="atmega 8535"/><category term="avr 8535"/><category term="avr"/><category term="microcontroller"/><category term="pwm"/><category term="8051"/><category term="Ana;og waveform generator"/><category term="DC motor"/><category term="Memoristor"/><category term="Motor driver"/><category term="TSOP 1738"/><category term="animation on lcd"/><category term="autonomous"/><category term="autonomous robots"/><category term="bidirectional motor in single power"/><category term="custom character"/><category term="ddram"/><category term="dpdt"/><category term="firing pulse"/><category term="forward reverse"/><category term="game on lcd"/><category term="gate control"/><category term="h-bridge"/><category term="inductive kick"/><category term="infrared"/><category term="ir communication"/><category term="isis"/><category term="line follower"/><category term="line tracker"/><category term="memory resistor"/><category term="mosfet inverter"/><category term="motor interfacing"/><category term="mulse width modulation"/><category term="obstacle avoider"/><category term="obstacle detection"/><category term="password"/><category term="password in your microcontroller"/><category term="power inverter"/><category term="privileged execution"/><category term="proteus"/><category term="pwm to dac"/><category term="remote control"/><category term="robo race"/><category term="robo wars"/><category term="robotics."/><category term="rocker switch"/><category term="single pin motor driver"/><category term="timer"/><category term="wired car"/><title type='text'>An Embedded system blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://embeddedpro.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5832476631874198582/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://embeddedpro.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Keyur</name><uri>http://www.blogger.com/profile/16623791462595264067</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>18</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5832476631874198582.post-5967157772305247600</id><published>2013-01-11T10:16:00.001-08:00</published><updated>2013-01-11T10:16:35.996-08:00</updated><title type='text'>Triangular wave generator in c</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Here is the code to generate a triangular wave of 8 bit resolution &lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPIrSjC8J3yielLVinf6mb2iopMSGktUqv0mCMzurTWUzdjIlXHfBJeZ05LXvn-OtQSf8UFW1rQAmN562WeYKM2Ant6ftp6aF4KKqql7UfxODr8yaMn__ymi5MBIT4ljg75YXQY7PXgP-e/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;1:  void main()  
2:  {  
3:  unsigned char i;  
4:  while(1)  
5:  {       
6:       for(i=0;i&amp;lt;0xff;i++)  
7:            { /* Generate rising edge */  
8:            delay_ us(1);  
9:            PORTB= i; //data output to port B  
10:            }  
11:       for(i=0xfe;i&amp;gt;0x00;i--)   
12:            {/* Generate falling edge */  
13:            delay_ us(1);  
14:            PORTB = i; //data output to port B  
15:            }  
16:  }  
17:  }  
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;code&gt;You can directly give the output to any port in which DAC is connected or you can use it for internal reference also.&lt;/code&gt;&lt;br /&gt;
This can be used to generate triangular wave in any microcontroller like AVR, 8051, PIC, ARM.&lt;br /&gt;
And triangular waves are also essential in doing modulation.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://embeddedpro.blogspot.com/feeds/5967157772305247600/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://embeddedpro.blogspot.com/2013/01/triangular-wave-generator-in-c.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5832476631874198582/posts/default/5967157772305247600'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5832476631874198582/posts/default/5967157772305247600'/><link rel='alternate' type='text/html' href='http://embeddedpro.blogspot.com/2013/01/triangular-wave-generator-in-c.html' title='Triangular wave generator in c'/><author><name>Keyur</name><uri>http://www.blogger.com/profile/16623791462595264067</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5832476631874198582.post-1041893174189444518</id><published>2013-01-11T09:37:00.000-08:00</published><updated>2013-01-11T09:37:06.597-08:00</updated><title type='text'>Ramp wave generator in c</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Here is a simple ramp wave generator you can directly give data to DAC or use it for your internal reference...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPIrSjC8J3yielLVinf6mb2iopMSGktUqv0mCMzurTWUzdjIlXHfBJeZ05LXvn-OtQSf8UFW1rQAmN562WeYKM2Ant6ftp6aF4KKqql7UfxODr8yaMn__ymi5MBIT4ljg75YXQY7PXgP-e/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;1:  //Ramp wave generating in c   
2:  Void main()  
3:  {  
4:       Int I;  
5:       I=0;  
6:       While(1)  
7:       {  
8:            I++;  
9:            delay_ms(1)//this count decides the frequency   
10:            if(I&amp;gt;=256) // this count decides the amplitude  
11:            {  
12:                 I=0;  
13:            }  
14:       }  
15:  }  
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://embeddedpro.blogspot.com/feeds/1041893174189444518/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://embeddedpro.blogspot.com/2013/01/ramp-wave-generator-in-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5832476631874198582/posts/default/1041893174189444518'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5832476631874198582/posts/default/1041893174189444518'/><link rel='alternate' type='text/html' href='http://embeddedpro.blogspot.com/2013/01/ramp-wave-generator-in-c.html' title='Ramp wave generator in c'/><author><name>Keyur</name><uri>http://www.blogger.com/profile/16623791462595264067</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5832476631874198582.post-4846203894677849588</id><published>2011-10-23T07:59:00.001-07:00</published><updated>2011-10-23T07:59:58.019-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="atmega 8535"/><category scheme="http://www.blogger.com/atom/ns#" term="avr 8535"/><category scheme="http://www.blogger.com/atom/ns#" term="password"/><category scheme="http://www.blogger.com/atom/ns#" term="password in your microcontroller"/><category scheme="http://www.blogger.com/atom/ns#" term="privileged execution"/><title type='text'>Password protect your microcontroller</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;title&gt;Untitled Document&lt;/title&gt;

&lt;br /&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Hello friends, a good idea of privileging the execution of  main program of microcontroller came in my mind after watching a Si-Fi  movie……and I did it………&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
  Password protecting  your microcontroller is one of the coolest things you can do with it……&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
I created a routine that reads 5 keystrokes and then checks  weather the inserted password is right or not.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;the micro controller here used is&amp;nbsp; Atmega 8535&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;Not discussing much more about logic, here is the program
  &lt;/span&gt;&lt;/div&gt;
&lt;i&gt;----------------------------------------------------------------------------------------------&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;lcd.h&gt;&lt;/lcd.h&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;void main()&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;{&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp; unsigned char      a,b,c,d,e; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp; DDRA=0x00;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp; PORTA=0xff;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //ask for password&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;while(1)&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;{&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;
    lcd_init();&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp; lcd_string(&quot;Enter      a 5 digit&quot;);&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp; lcd_gotoxy(1,0);&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;      lcd_string(&quot;Password:&quot;);&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; //read password &lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp; while(PINA==0xff);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //if all keys open stay here&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp; a=PINA;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp; delayms(200);&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; lcd_gotoxy(1,0);&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lcd_string(&quot;Password:*&quot;);&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while((PINA&amp;amp;0xf0)!=0xf0);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //wait      to release the key&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;while(PINA==0xff);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&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;b=PINA;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp; delayms(200);&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; lcd_gotoxy(1,0);&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lcd_string(&quot;Password:**&quot;);&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while((PINA&amp;amp;0xf0)!=0xf0);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  //wait      to release the key&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;while(PINA==0xff);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&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;c=PINA;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp; delayms(200);&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; lcd_gotoxy(1,0);&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lcd_string(&quot;Password:***&quot;);&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&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;while((PINA&amp;amp;0xf0)!=0xf0);&amp;nbsp;&amp;nbsp;  //wait      to release the key&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;while(PINA==0xff);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;d=PINA;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp; delayms(200);&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; lcd_gotoxy(1,0);&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lcd_string(&quot;Password:****&quot;);&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while((PINA&amp;amp;0xf0)!=0xf0);&amp;nbsp;&amp;nbsp;  //wait      to release the key&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;while(PINA==0xff);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&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;e=PINA;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp; delayms(200);&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; lcd_gotoxy(1,0);&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lcd_string(&quot;Password:*****&quot;);&amp;nbsp;&amp;nbsp;  //wait      to release the key&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //checking the password&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp; if(a==0xef)&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp; {&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp; if(b==0xdf)&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&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;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(c==0xbf)&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&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; {if(d==0x7f)&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(e==0xef)&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lcd_init();&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lcd_string(&quot;Welcome&quot;);&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; goto      wait;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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; lcd_init();&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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; lcd_string(&quot;Invalid      password!!&quot;);&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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; delayms(2000);&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lcd_init();&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lcd_string(&quot;Invalid      password!!&quot;);&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delayms(2000);&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&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;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&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;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lcd_init();&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lcd_string(&quot;Invalid      password!!&quot;);&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delayms(2000);&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&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;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&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;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; else&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp; {&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp; lcd_init();&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp; lcd_string(&quot;Invalid      password!!&quot;);&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp; delayms(2000);&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;else&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp; {&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp; lcd_init();&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp; lcd_string(&quot;Invalid      password!!&quot;);&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp; delayms(2000);&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp; wait:while(1);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&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;/i&gt;&lt;/div&gt;
&lt;br /&gt;
----------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;and no post is completed without a video,&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/Ez6dELznm9s?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif; font-size: small;&quot;&gt;leave a comment if you want to ask any thing related to programming&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;
:)&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://embeddedpro.blogspot.com/feeds/4846203894677849588/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://embeddedpro.blogspot.com/2011/10/password-protect-your-microcontroller.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5832476631874198582/posts/default/4846203894677849588'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5832476631874198582/posts/default/4846203894677849588'/><link rel='alternate' type='text/html' href='http://embeddedpro.blogspot.com/2011/10/password-protect-your-microcontroller.html' title='Password protect your microcontroller'/><author><name>Keyur</name><uri>http://www.blogger.com/profile/16623791462595264067</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5832476631874198582.post-8677164912659635747</id><published>2011-10-23T07:57:00.000-07:00</published><updated>2011-10-23T07:57:36.429-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="atmega 8535"/><category scheme="http://www.blogger.com/atom/ns#" term="avr"/><category scheme="http://www.blogger.com/atom/ns#" term="h-bridge"/><category scheme="http://www.blogger.com/atom/ns#" term="Motor driver"/><category scheme="http://www.blogger.com/atom/ns#" term="single pin motor driver"/><title type='text'>Bidirectional Motor With 1 Pin of Microcontroller.....</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;link href=&quot;motor_files/filelist.xml&quot; rel=&quot;File-List&quot;&gt;&lt;/link&gt;

&lt;link href=&quot;motor_files/themedata.thmx&quot; rel=&quot;themeData&quot;&gt;&lt;/link&gt;
&lt;link href=&quot;motor_files/colorschememapping.xml&quot; rel=&quot;colorSchemeMapping&quot;&gt;&lt;/link&gt;

&lt;style&gt;
&lt;!--
 /* Font Definitions */
 @font-face
 {font-family:Cambria;
 panose-1:2 4 5 3 5 4 6 3 2 4;
 mso-font-charset:0;
 mso-generic-font-family:roman;
 mso-font-pitch:variable;
 mso-font-signature:-536870145 1073743103 0 0 415 0;}
@font-face
 {font-family:Calibri;
 panose-1:2 15 5 2 2 2 4 3 2 4;
 mso-font-charset:0;
 mso-generic-font-family:swiss;
 mso-font-pitch:variable;
 mso-font-signature:-520092929 1073786111 9 0 415 0;}
@font-face
 {font-family:Tahoma;
 panose-1:2 11 6 4 3 5 4 4 2 4;
 mso-font-charset:0;
 mso-generic-font-family:swiss;
 mso-font-pitch:variable;
 mso-font-signature:-520081665 -1073717157 41 0 66047 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
 {mso-style-unhide:no;
 mso-style-qformat:yes;
 mso-style-parent:&quot;&quot;;
 margin-top:0in;
 margin-right:0in;
 margin-bottom:10.0pt;
 margin-left:0in;
 line-height:115%;
 mso-pagination:widow-orphan;
 font-size:11.0pt;
 font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
 mso-ascii-font-family:Calibri;
 mso-ascii-theme-font:minor-latin;
 mso-fareast-font-family:Calibri;
 mso-fareast-theme-font:minor-latin;
 mso-hansi-font-family:Calibri;
 mso-hansi-theme-font:minor-latin;
 mso-bidi-font-family:&quot;Times New Roman&quot;;
 mso-bidi-theme-font:minor-bidi;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
 {mso-style-noshow:yes;
 mso-style-priority:99;
 mso-style-link:&quot;Balloon Text Char&quot;;
 margin:0in;
 margin-bottom:.0001pt;
 mso-pagination:widow-orphan;
 font-size:8.0pt;
 font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;
 mso-fareast-font-family:Calibri;
 mso-fareast-theme-font:minor-latin;}
span.BalloonTextChar
 {mso-style-name:&quot;Balloon Text Char&quot;;
 mso-style-noshow:yes;
 mso-style-priority:99;
 mso-style-unhide:no;
 mso-style-locked:yes;
 mso-style-link:&quot;Balloon Text&quot;;
 mso-ansi-font-size:8.0pt;
 mso-bidi-font-size:8.0pt;
 font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;
 mso-ascii-font-family:Tahoma;
 mso-hansi-font-family:Tahoma;
 mso-bidi-font-family:Tahoma;}
span.SpellE
 {mso-style-name:&quot;&quot;;
 mso-spl-e:yes;}
span.GramE
 {mso-style-name:&quot;&quot;;
 mso-gram-e:yes;}
.MsoChpDefault
 {mso-style-type:export-only;
 mso-default-props:yes;
 font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
 mso-ascii-font-family:Calibri;
 mso-ascii-theme-font:minor-latin;
 mso-fareast-font-family:Calibri;
 mso-fareast-theme-font:minor-latin;
 mso-hansi-font-family:Calibri;
 mso-hansi-theme-font:minor-latin;
 mso-bidi-font-family:&quot;Times New Roman&quot;;
 mso-bidi-theme-font:minor-bidi;}
.MsoPapDefault
 {mso-style-type:export-only;
 margin-bottom:10.0pt;
 line-height:115%;}
@page WordSection1
 {size:8.5in 11.0in;
 margin:1.0in 1.0in 1.0in 1.0in;
 mso-header-margin:.5in;
 mso-footer-margin:.5in;
 mso-paper-source:0;}
div.WordSection1
 {page:WordSection1;}
--&gt;
&lt;/style&gt;





&lt;br /&gt;
&lt;div class=&quot;WordSection1&quot;&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;How to drive a motor with a single pin of microcontroller?&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;A tough question but I have got the answer and the answer is
&lt;a href=&quot;http://keyuracharya.blogspot.com/2011/09/power-inverter-design.html&quot;&gt;“H-bridge connection”&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Now you may be think that normally all the motors are driven
by H-bridge connection so what is new here?&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Here is a new configuration that can drive entire H-bridge
with a single pin of micro controller, but for that you have to insert some
extra hardware in that &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;A simple configuration is given below…&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9XFBesIadttxukqsSpV8dZdOEF74u8NryZ3ifnb7u55cBctfWk2UaOOdEmNq_I3JAvXxPk6PMRaZSPGBdj4Xoj7sqMVbNYQSSTp8C-aHIoU4Vb0NW9CfqqiAih1Imnot6h4AhkHrO3_R9/s1600/motor+in+2+directions.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9XFBesIadttxukqsSpV8dZdOEF74u8NryZ3ifnb7u55cBctfWk2UaOOdEmNq_I3JAvXxPk6PMRaZSPGBdj4Xoj7sqMVbNYQSSTp8C-aHIoU4Vb0NW9CfqqiAih1Imnot6h4AhkHrO3_R9/s1600/motor+in+2+directions.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;You can change the frequency of pulse to change the speed of
motor and you can also &lt;a href=&quot;http://keyuracharya.blogspot.com/2011/10/fast-pwm-mode-of-avr-timers.html&quot;&gt;vary PWM&lt;/a&gt; to generate asymmetric motor drive, and this
entire thing at the cost of just one micro controller pin &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Here I have just used a simple program to generate a 2
second delay and run motor in clockwise or anticlockwise,&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;The program is written for &lt;/span&gt;&lt;span class=&quot;SpellE&quot; style=&quot;font-size: small;&quot;&gt;Atmega&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;
8535(crystal frequency=&lt;/span&gt;&lt;span class=&quot;GramE&quot; style=&quot;font-size: small;&quot;&gt;16Mhz&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &amp;amp; I am using earlier
made &lt;a href=&quot;http://keyuracharya.blogspot.com/2011/09/how-to-make-header-file-for-embedded-c.html&quot;&gt;header file&lt;/a&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 150%; margin-bottom: 0in;&quot;&gt;
&amp;nbsp;&amp;nbsp;&lt;i&gt;&lt;span style=&quot;font-family: &amp;quot;Cambria&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 14pt; line-height: 150%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;border: 1pt solid windowtext; padding: 1pt 4pt;&quot;&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: medium none; line-height: 150%; margin-bottom: 0in; padding: 0in;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-family: &amp;quot;Cambria&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 14pt; line-height: 150%;&quot;&gt;#include&amp;lt;&lt;span class=&quot;SpellE&quot;&gt;avr&lt;/span&gt;/&lt;span class=&quot;SpellE&quot;&gt;io.h&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: medium none; line-height: 150%; margin-bottom: 0in; padding: 0in;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-family: &amp;quot;Cambria&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 14pt; line-height: 150%;&quot;&gt;#include &amp;lt;&lt;span class=&quot;SpellE&quot;&gt;delay.h&lt;/span&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: medium none; line-height: 150%; margin-bottom: 0in; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: medium none; line-height: 150%; margin-bottom: 0in; padding: 0in;&quot;&gt;
&lt;span class=&quot;GramE&quot;&gt;&lt;i&gt;&lt;span style=&quot;font-family: &amp;quot;Cambria&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 14pt; line-height: 150%;&quot;&gt;void&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;font-family: &amp;quot;Cambria&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 14pt; line-height: 150%;&quot;&gt;
main(void)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: medium none; line-height: 150%; margin-bottom: 0in; padding: 0in;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-family: &amp;quot;Cambria&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 14pt; line-height: 150%;&quot;&gt;&amp;nbsp;{&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: medium none; line-height: 150%; margin-bottom: 0in; padding: 0in;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-family: &amp;quot;Cambria&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 14pt; line-height: 150%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DDRB=0x08;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Port B data direction
declaration as output.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: medium none; line-height: 150%; margin-bottom: 0in; padding: 0in;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-family: &amp;quot;Cambria&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 14pt; line-height: 150%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PORTB=0X00;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: medium none; line-height: 150%; margin-bottom: 0in; padding: 0in;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-family: &amp;quot;Cambria&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 14pt; line-height: 150%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class=&quot;GramE&quot;&gt;while(&lt;/span&gt;1)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //This is for the
infinity loop.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: medium none; line-height: 150%; margin-bottom: 0in; padding: 0in;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-family: &amp;quot;Cambria&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 14pt; line-height: 150%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: medium none; line-height: 150%; margin-bottom: 0in; padding: 0in;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-family: &amp;quot;Cambria&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 14pt; line-height: 150%;&quot;&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;PORTB=0X08;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: medium none; line-height: 150%; margin-bottom: 0in; padding: 0in;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-family: &amp;quot;Cambria&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 14pt; line-height: 150%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span class=&quot;SpellE&quot;&gt;&lt;span class=&quot;GramE&quot;&gt;delayms&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;GramE&quot;&gt;(&lt;/span&gt;2000);&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; //2
second delay&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: medium none; line-height: 150%; margin-bottom: 0in; padding: 0in;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-family: &amp;quot;Cambria&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 14pt; line-height: 150%;&quot;&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;PORTB=0X00;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: medium none; line-height: 150%; margin-bottom: 0in; padding: 0in;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-family: &amp;quot;Cambria&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 14pt; line-height: 150%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span class=&quot;SpellE&quot;&gt;&lt;span class=&quot;GramE&quot;&gt;delayms&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;GramE&quot;&gt;(&lt;/span&gt;2000);&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; //2
second delay&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: medium none; line-height: 150%; margin-bottom: 0in; padding: 0in;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-family: &amp;quot;Cambria&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 14pt; line-height: 150%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: medium none; line-height: 150%; margin-bottom: 0in; padding: 0in;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-family: &amp;quot;Cambria&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 14pt; line-height: 150%;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;o:p&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;You can download source code file for this project and ISIS Proteus design &lt;/span&gt;&lt;a href=&quot;http://www.mediafire.com/file/3iqmjrunhfj391j/MOTOR.rar&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;HERE. &lt;/a&gt;&lt;/span&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://embeddedpro.blogspot.com/feeds/8677164912659635747/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://embeddedpro.blogspot.com/2011/10/bidirectional-motor-with-1-pin-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5832476631874198582/posts/default/8677164912659635747'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5832476631874198582/posts/default/8677164912659635747'/><link rel='alternate' type='text/html' href='http://embeddedpro.blogspot.com/2011/10/bidirectional-motor-with-1-pin-of.html' title='Bidirectional Motor With 1 Pin of Microcontroller.....'/><author><name>Keyur</name><uri>http://www.blogger.com/profile/16623791462595264067</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9XFBesIadttxukqsSpV8dZdOEF74u8NryZ3ifnb7u55cBctfWk2UaOOdEmNq_I3JAvXxPk6PMRaZSPGBdj4Xoj7sqMVbNYQSSTp8C-aHIoU4Vb0NW9CfqqiAih1Imnot6h4AhkHrO3_R9/s72-c/motor+in+2+directions.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5832476631874198582.post-7656778352002747254</id><published>2011-10-23T07:52:00.000-07:00</published><updated>2011-10-23T07:52:40.330-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Ana;og waveform generator"/><category scheme="http://www.blogger.com/atom/ns#" term="avr"/><category scheme="http://www.blogger.com/atom/ns#" term="avr 8535"/><category scheme="http://www.blogger.com/atom/ns#" term="pwm"/><category scheme="http://www.blogger.com/atom/ns#" term="pwm to dac"/><title type='text'>DAC by PWM</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;As i was reading a book &quot;Embedded systems&quot; by Rajkamal I found some thing interesting on Page 15 that was &quot;DAC using PWM&quot;. Then I tried to implement it on my own as it was an interesting idea to generate Analog voltage from only one pin of micro controller.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Normally for DAC we have to use 8-pin and it is always good to use less pins.&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqnNqR5B6W_c3X6ri37eVZbFjZE60eCvaOxG2xbzlfSO1TST7r3JENAE_fV-dwfmpRda_cw168WB5SK5fA17x6baeZEaVeFYChqfexaYKD_eqy42N2LznozrPbMMrkDQez_QazHf40zoxc/s1600/dac.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;265&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqnNqR5B6W_c3X6ri37eVZbFjZE60eCvaOxG2xbzlfSO1TST7r3JENAE_fV-dwfmpRda_cw168WB5SK5fA17x6baeZEaVeFYChqfexaYKD_eqy42N2LznozrPbMMrkDQez_QazHf40zoxc/s400/dac.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Here we have to use only one pin to generate PWM and then Integrate the wave to make analog output.I have used an op-amp integrator(low-pass filter) .&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;I have used &lt;a href=&quot;http://keyuracharya.blogspot.com/2011/10/fast-pwm-mode-of-avr-timers.html&quot;&gt;program made by me &lt;/a&gt;earlier that generates PWM according to potentiometer varied.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Just adding a next stage to it i gave that pwm pulse to an Op-amp based integrator.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;a href=&quot;http://www.mediafire.com/file/2950yx30uv22fpv/DAC.rar&quot;&gt;Here is the rar&lt;/a&gt; file given which contains Proteus ISIS design file and source code to generate PWM in AVR atmega 8535.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;The design is made for test purpose only to check the concepts, hardware is not built and tested&amp;nbsp; so enough care must be taken before converting this design file to actual hardware. &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Hope the new concept is good for implementing.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;:)&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://embeddedpro.blogspot.com/feeds/7656778352002747254/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://embeddedpro.blogspot.com/2011/10/dac-by-pwm.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5832476631874198582/posts/default/7656778352002747254'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5832476631874198582/posts/default/7656778352002747254'/><link rel='alternate' type='text/html' href='http://embeddedpro.blogspot.com/2011/10/dac-by-pwm.html' title='DAC by PWM'/><author><name>Keyur</name><uri>http://www.blogger.com/profile/16623791462595264067</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqnNqR5B6W_c3X6ri37eVZbFjZE60eCvaOxG2xbzlfSO1TST7r3JENAE_fV-dwfmpRda_cw168WB5SK5fA17x6baeZEaVeFYChqfexaYKD_eqy42N2LznozrPbMMrkDQez_QazHf40zoxc/s72-c/dac.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5832476631874198582.post-4515883712766204594</id><published>2011-10-16T09:52:00.000-07:00</published><updated>2011-10-16T09:52:38.700-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="atmega 8535"/><category scheme="http://www.blogger.com/atom/ns#" term="avr"/><category scheme="http://www.blogger.com/atom/ns#" term="avr 8535"/><category scheme="http://www.blogger.com/atom/ns#" term="mulse width modulation"/><category scheme="http://www.blogger.com/atom/ns#" term="pwm"/><category scheme="http://www.blogger.com/atom/ns#" term="timer"/><title type='text'>Fast Pwm omode of AVR timers</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;link href=&quot;pwm_files/filelist.xml&quot; rel=&quot;File-List&quot;&gt;&lt;/link&gt;

&lt;link href=&quot;pwm_files/item0007.xml&quot; rel=&quot;dataStoreItem&quot; target=&quot;pwm_files/props008.xml&quot;&gt;&lt;/link&gt;
&lt;link href=&quot;pwm_files/themedata.thmx&quot; rel=&quot;themeData&quot;&gt;&lt;/link&gt;
&lt;link href=&quot;pwm_files/colorschememapping.xml&quot; rel=&quot;colorSchemeMapping&quot;&gt;&lt;/link&gt;

&lt;style&gt;
&lt;!--
 /* Font Definitions */
 @font-face
 {font-family:&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;Cambria&lt;/span&gt;;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;panose&lt;/span&gt;-1:2 4 5 3 5 4 6 3 2 4;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-font-&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;charset&lt;/span&gt;:0;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-generic-font-family:roman;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-font-pitch:variable;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-font-signature:-536870145 1073743103 0 0 415 0;}
@font-face
 {font-family:&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;Calibri&lt;/span&gt;;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;panose&lt;/span&gt;-1:2 15 5 2 2 2 4 3 2 4;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-font-&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;charset&lt;/span&gt;:0;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-generic-font-family:&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;swiss&lt;/span&gt;;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-font-pitch:variable;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-font-signature:-520092929 1073786111 9 0 415 0;}
@font-face
 {font-family:&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;Tahoma&lt;/span&gt;;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;panose&lt;/span&gt;-1:2 11 6 4 3 5 4 4 2 4;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-font-&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;charset&lt;/span&gt;:0;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-generic-font-family:&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;swiss&lt;/span&gt;;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-font-pitch:variable;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-font-signature:-520081665 -1073717157 41 0 66047 0;}
@font-face
 {font-family:&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;Helvetica&lt;/span&gt;-Bold;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;panose&lt;/span&gt;-1:0 0 0 0 0 0 0 0 0 0;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-font-&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;charset&lt;/span&gt;:0;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-generic-font-family:&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;swiss&lt;/span&gt;;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-font-format:other;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-font-pitch:auto;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-font-signature:3 0 0 0 1 0;}
 /* Style Definitions */
 p.&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;MsoNormal&lt;/span&gt;, &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;li&lt;/span&gt;.&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;MsoNormal&lt;/span&gt;, div.&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;MsoNormal&lt;/span&gt;
 {&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-style-&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;unhide&lt;/span&gt;:no;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-style-&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;qformat&lt;/span&gt;:yes;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-style-parent:&quot;&quot;;
 margin-top:0in;
 margin-right:0in;
 margin-bottom:10.0pt;
 margin-left:0in;
 line-height:115%;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-pagination:widow-orphan;
 font-size:11.0pt;
 font-family:&quot;&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;Calibri&lt;/span&gt;&quot;,&quot;sans-serif&quot;;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;ascii&lt;/span&gt;-font-family:&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;Calibri&lt;/span&gt;;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;ascii&lt;/span&gt;-theme-font:minor-&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;latin&lt;/span&gt;;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;fareast&lt;/span&gt;-font-family:&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;Calibri&lt;/span&gt;;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;fareast&lt;/span&gt;-theme-font:minor-&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;latin&lt;/span&gt;;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;hansi&lt;/span&gt;-font-family:&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;Calibri&lt;/span&gt;;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;hansi&lt;/span&gt;-theme-font:minor-&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;latin&lt;/span&gt;;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;bidi&lt;/span&gt;-font-family:&quot;Times New Roman&quot;;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;bidi&lt;/span&gt;-theme-font:minor-&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;bidi&lt;/span&gt;;}
p.&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;MsoAcetate&lt;/span&gt;, &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;li&lt;/span&gt;.&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;MsoAcetate&lt;/span&gt;, div.&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;MsoAcetate&lt;/span&gt;
 {&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-style-&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;noshow&lt;/span&gt;:yes;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-style-priority:99;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-style-link:&quot;Balloon Text Char&quot;;
 margin:0in;
 margin-bottom:.0001pt;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-pagination:widow-orphan;
 font-size:8.0pt;
 font-family:&quot;&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;Tahoma&lt;/span&gt;&quot;,&quot;sans-serif&quot;;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;fareast&lt;/span&gt;-font-family:&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;Calibri&lt;/span&gt;;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;fareast&lt;/span&gt;-theme-font:minor-&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;latin&lt;/span&gt;;}
span.&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;BalloonTextChar&lt;/span&gt;
 {&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-style-name:&quot;Balloon Text Char&quot;;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-style-&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;noshow&lt;/span&gt;:yes;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-style-priority:99;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-style-&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;unhide&lt;/span&gt;:no;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-style-locked:yes;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-style-link:&quot;Balloon Text&quot;;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;ansi&lt;/span&gt;-font-size:8.0pt;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;bidi&lt;/span&gt;-font-size:8.0pt;
 font-family:&quot;&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;Tahoma&lt;/span&gt;&quot;,&quot;sans-serif&quot;;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;ascii&lt;/span&gt;-font-family:&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;Tahoma&lt;/span&gt;;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;hansi&lt;/span&gt;-font-family:&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;Tahoma&lt;/span&gt;;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;bidi&lt;/span&gt;-font-family:&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;Tahoma&lt;/span&gt;;}
span.&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;SpellE&lt;/span&gt;
 {&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-style-name:&quot;&quot;;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;spl&lt;/span&gt;-e:yes;}
span.&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;GramE&lt;/span&gt;
 {&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-style-name:&quot;&quot;;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-gram-e:yes;}
.&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;MsoChpDefault&lt;/span&gt;
 {&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-style-type:export-only;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-default-props:yes;
 font-size:10.0pt;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;ansi&lt;/span&gt;-font-size:10.0pt;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;bidi&lt;/span&gt;-font-size:10.0pt;
 font-family:&quot;&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;Calibri&lt;/span&gt;&quot;,&quot;sans-serif&quot;;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;ascii&lt;/span&gt;-font-family:&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;Calibri&lt;/span&gt;;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;ascii&lt;/span&gt;-theme-font:minor-&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;latin&lt;/span&gt;;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;fareast&lt;/span&gt;-font-family:&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;Calibri&lt;/span&gt;;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;fareast&lt;/span&gt;-theme-font:minor-&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;latin&lt;/span&gt;;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;hansi&lt;/span&gt;-font-family:&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;Calibri&lt;/span&gt;;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;hansi&lt;/span&gt;-theme-font:minor-&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;latin&lt;/span&gt;;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;bidi&lt;/span&gt;-font-family:&quot;Times New Roman&quot;;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;bidi&lt;/span&gt;-theme-font:minor-&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;bidi&lt;/span&gt;;}
@page WordSection1
 {size:8.5in 11.0in;
 margin:1.0in 1.0in 1.0in 1.0in;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-header-margin:35.4pt;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-footer-margin:35.4pt;
 &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot; class=&quot;goog-spellcheck-word&quot;&gt;mso&lt;/span&gt;-paper-source:0;}
div.WordSection1
 {page:WordSection1;}
--&gt;
&lt;/style&gt;





&lt;br /&gt;
&lt;div class=&quot;WordSection1&quot;&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Hello folks, I once needed to generate PWM wave&lt;/span&gt;&lt;span class=&quot;GramE&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp; in&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; my project related to power inverter design, I had
to generate PWM waveforms according to the potentiometer varied by the user.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;For that first method which I adopted was discussed &lt;a href=&quot;http://keyuracharya.blogspot.com/2011/09/power-inverter-design.html&quot;&gt;earlier post&lt;/a&gt; but now here is another sophisticated method which I came across while
studying the &lt;a href=&quot;http://www.mediafire.com/?g7bg5txjzz55oot&quot;&gt;datasheet&lt;/a&gt; of mine microcontroller (mine favorite &lt;/span&gt;&lt;span class=&quot;SpellE&quot; style=&quot;font-size: small;&quot;&gt;Atmega&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; 8535).I came across the &lt;/span&gt;&lt;span class=&quot;SpellE&quot; style=&quot;font-size: small;&quot;&gt;PWM&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;
modes given inbuilt in AVR series. &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;There are three modes of generating &lt;/span&gt;&lt;span class=&quot;SpellE&quot; style=&quot;font-size: small;&quot;&gt;PWM&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;
in Atmega8535&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span class=&quot;GramE&quot; style=&quot;font-size: small;&quot;&gt;1)Clear&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; timer on compare(CTC) mode.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPSZfTotGWxuFGhZJzUvEyQ5myGSY0iAW2zOukQS8W1zDYPIsotO6mVX3WWkbFUCxuoCumXjqZm7dyvUNQ-tQtWwB8xxebJ3FY43oyg97qYTDlUuQPnZ6w9w0xvfEoyH5P-XIUs_ImiAjn/s1600/CTC.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;267&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPSZfTotGWxuFGhZJzUvEyQ5myGSY0iAW2zOukQS8W1zDYPIsotO6mVX3WWkbFUCxuoCumXjqZm7dyvUNQ-tQtWwB8xxebJ3FY43oyg97qYTDlUuQPnZ6w9w0xvfEoyH5P-XIUs_ImiAjn/s640/CTC.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span class=&quot;GramE&quot; style=&quot;font-size: small;&quot;&gt;2)fast&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; PWM&lt;/span&gt;&lt;span class=&quot;SpellE&quot; style=&quot;font-size: small;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;
mode&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-W4xOMqqaBwcITokJx_jdWFxbizgzwjhj2JMrobMuHVG5kF5UfdMp7y1nORjaXXRggOiO6IAvPVF70_ey90ER3IgjEifnvG369SKov_99D3JNyKQ2VtGfhCrk9D8qpVryRlkARp1v9Usj/s1600/FAst+pwm.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;315&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-W4xOMqqaBwcITokJx_jdWFxbizgzwjhj2JMrobMuHVG5kF5UfdMp7y1nORjaXXRggOiO6IAvPVF70_ey90ER3IgjEifnvG369SKov_99D3JNyKQ2VtGfhCrk9D8qpVryRlkARp1v9Usj/s640/FAst+pwm.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span class=&quot;GramE&quot; style=&quot;font-size: small;&quot;&gt;3)Phase&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; correct &lt;/span&gt;&lt;span class=&quot;SpellE&quot; style=&quot;font-size: small;&quot;&gt;PWM&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;
mode.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLVJ6WcsMSq_fGt_fR-tFlPu7vfb84qoOjVAA1nxqhs17Uxu722ep7AC0ftscTMhcUB_izBU063lUXIHJPb00_BsWAKPVp3RFyaueXpjBrOVVFLNfzMFRhRjFO4odPGoVTc95BPK5IVyOP/s1600/phase+correct.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;390&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLVJ6WcsMSq_fGt_fR-tFlPu7vfb84qoOjVAA1nxqhs17Uxu722ep7AC0ftscTMhcUB_izBU063lUXIHJPb00_BsWAKPVp3RFyaueXpjBrOVVFLNfzMFRhRjFO4odPGoVTc95BPK5IVyOP/s640/phase+correct.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;You can select any of them according to your requirement as
in my requirement I had to select fast PWM&lt;/span&gt;&lt;span class=&quot;SpellE&quot; style=&quot;font-size: small;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; mode.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Here are the steps given to configure your timer in fast &lt;/span&gt;&lt;span class=&quot;SpellE&quot; style=&quot;font-size: small;&quot;&gt;PWM&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; mode…..&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Step 1) set Port in output mode &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; As
the &lt;/span&gt;&lt;span class=&quot;SpellE&quot; style=&quot;font-size: small;&quot;&gt;PWM&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; generated would be given to output pin first
of all that pin must be taken to output &lt;/span&gt;&lt;span class=&quot;SpellE&quot; style=&quot;font-size: small;&quot;&gt;mode.the&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; PIN
where &lt;/span&gt;&lt;span class=&quot;SpellE&quot; style=&quot;font-size: small;&quot;&gt;PWM&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; is to be generated depends on the timer
which you use to generate &lt;/span&gt;&lt;span class=&quot;SpellE&quot; style=&quot;font-size: small;&quot;&gt;PWM&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;. The pin &lt;/span&gt;&lt;span class=&quot;SpellE&quot; style=&quot;font-size: small;&quot;&gt;OCn&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; would be your output pin if you are using Timer-n. &lt;/span&gt;&lt;span class=&quot;GramE&quot; style=&quot;font-size: small;&quot;&gt;you&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; can find the location of pin from &lt;a href=&quot;http://www.mediafire.com/?g7bg5txjzz55oot&quot;&gt;datasheet&lt;/a&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Step 2) Set &lt;/span&gt;&lt;span class=&quot;SpellE&quot; style=&quot;font-size: small;&quot;&gt;TCCRn&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; register&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; You
have to configure your timer in &lt;/span&gt;&lt;span class=&quot;SpellE&quot; style=&quot;font-size: small;&quot;&gt;prescaler&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; mode, &lt;/span&gt;&lt;span class=&quot;SpellE&quot; style=&quot;font-size: small;&quot;&gt;OCn&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; pin in inverting or non-inverting mode, selection of
PWM mode etc. can be configured just within one register.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Step 3) Change the &lt;/span&gt;&lt;span class=&quot;SpellE&quot; style=&quot;font-size: small;&quot;&gt;value&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; of &lt;/span&gt;&lt;span class=&quot;SpellE&quot; style=&quot;font-size: small;&quot;&gt;OCRn&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; register in run time to generate &lt;/span&gt;&lt;span class=&quot;SpellE&quot; style=&quot;font-size: small;&quot;&gt;PWM&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;
whatever you want…&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Now your timer is configured to work with PWM mode&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;As I discussed earlier if we want to have a variable &lt;/span&gt;&lt;span class=&quot;GramE&quot; style=&quot;font-size: small;&quot;&gt;resistor&amp;nbsp; that&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; can
generate variable PWM for that we have to access ADC given in &lt;/span&gt;&lt;span class=&quot;SpellE&quot; style=&quot;font-size: small;&quot;&gt;Atmega&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;For &lt;/span&gt;&lt;span class=&quot;SpellE&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;GramE&quot;&gt;adc&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;
initialization you have to do following steps&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Step 1&lt;/span&gt;&lt;span class=&quot;GramE&quot; style=&quot;font-size: small;&quot;&gt;)&amp;nbsp;
Initialize&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;SpellE&quot; style=&quot;font-size: small;&quot;&gt;adc&lt;/span&gt; &lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; You
can do it by ADCSRA register you have to Enable, &lt;/span&gt;&lt;span class=&quot;SpellE&quot; style=&quot;font-size: small;&quot;&gt;prescale&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;
and set &lt;/span&gt;&lt;span class=&quot;GramE&quot; style=&quot;font-size: small;&quot;&gt;interrupt .&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Step 2&lt;/span&gt;&lt;span class=&quot;GramE&quot; style=&quot;font-size: small;&quot;&gt;)give&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; ADC channel no &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; This
no is given in ADMUX register.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Step 3&lt;/span&gt;&lt;span class=&quot;GramE&quot; style=&quot;font-size: small;&quot;&gt;)start&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; conversion&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&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; &lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&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; Setting &lt;span style=&quot;line-height: 115%;&quot;&gt;ADSC&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt; &lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small; line-height: 115%;&quot;&gt;bit in ADCSRA register will do this
thing.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span class=&quot;GramE&quot; style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;Step 4) give&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small; line-height: 115%;&quot;&gt; it some time to convert and then
read the result from ADCH and ADCL register.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small; line-height: 115%;&quot;&gt;Now you are done to interface your ADC with Timer&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Helvetica-Bold&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif; font-size: small;&quot;&gt;A sample code which I had used is given below.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;border: 1pt solid windowtext; padding: 1pt 4pt;&quot;&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: medium none; margin-bottom: 0in; padding: 0in;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-family: &amp;quot;Cambria&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 14pt; line-height: 115%;&quot;&gt;#include&amp;amp;lt;&lt;span class=&quot;SpellE&quot;&gt;avr&lt;/span&gt;/&lt;span class=&quot;SpellE&quot;&gt;io.h&lt;/span&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: medium none; margin-bottom: 0in; padding: 0in;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-family: &amp;quot;Cambria&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 14pt; line-height: 115%;&quot;&gt;#include&amp;amp;lt;&lt;span class=&quot;SpellE&quot;&gt;delay.h&lt;/span&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: medium none; margin-bottom: 0in; padding: 0in;&quot;&gt;
&lt;span class=&quot;GramE&quot;&gt;&lt;i&gt;&lt;span style=&quot;font-family: &amp;quot;Cambria&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 14pt; line-height: 115%;&quot;&gt;void&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;font-family: &amp;quot;Cambria&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 14pt; line-height: 115%;&quot;&gt; &lt;span class=&quot;SpellE&quot;&gt;adc_init&lt;/span&gt;()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: medium none; margin-bottom: 0in; padding: 0in;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-family: &amp;quot;Cambria&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 14pt; line-height: 115%;&quot;&gt;&amp;nbsp;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: medium none; margin-bottom: 0in; padding: 0in;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-family: &amp;quot;Cambria&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 14pt; line-height: 115%;&quot;&gt;ADCSRA=0X86;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //ADC enable, ADC
interrupt enable, set &lt;span class=&quot;SpellE&quot;&gt;prescaller&lt;/span&gt; to 64&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: medium none; margin-bottom: 0in; padding: 0in;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-family: &amp;quot;Cambria&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 14pt; line-height: 115%;&quot;&gt;&amp;nbsp;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: medium none; margin-bottom: 0in; padding: 0in;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-family: &amp;quot;Cambria&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 14pt; line-height: 115%;&quot;&gt;&amp;nbsp;&lt;span class=&quot;GramE&quot;&gt;unsigned&lt;/span&gt; char &lt;span class=&quot;SpellE&quot;&gt;getdata&lt;/span&gt;(unsigned char &lt;span class=&quot;SpellE&quot;&gt;chno&lt;/span&gt;)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: medium none; margin-bottom: 0in; padding: 0in;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-family: &amp;quot;Cambria&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 14pt; line-height: 115%;&quot;&gt;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: medium none; margin-bottom: 0in; padding: 0in;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-family: &amp;quot;Cambria&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 14pt; line-height: 115%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ADMUX=0X60;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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; //right
align the ADC result&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: medium none; margin-bottom: 0in; padding: 0in;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-family: &amp;quot;Cambria&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 14pt; line-height: 115%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ADMUX|=&lt;span class=&quot;SpellE&quot;&gt;chno&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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; //select
the ADC channel&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: medium none; margin-bottom: 0in; padding: 0in;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-family: &amp;quot;Cambria&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 14pt; line-height: 115%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ADCSRA|=0X40;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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; //start ADC &lt;span class=&quot;SpellE&quot;&gt;convertion&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: medium none; margin-bottom: 0in; padding: 0in;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-family: &amp;quot;Cambria&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 14pt; line-height: 115%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class=&quot;SpellE&quot;&gt;&lt;span class=&quot;GramE&quot;&gt;delayms&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;GramE&quot;&gt;(&lt;/span&gt;1);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //give
some time delay to &lt;span class=&quot;SpellE&quot;&gt;complit&lt;/span&gt; the &lt;span class=&quot;SpellE&quot;&gt;ADC&lt;/span&gt;
&lt;span class=&quot;SpellE&quot;&gt;convertion&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: medium none; margin-bottom: 0in; padding: 0in;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-family: &amp;quot;Cambria&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 14pt; line-height: 115%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class=&quot;GramE&quot;&gt;return&lt;/span&gt;
ADCH;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: medium none; margin-bottom: 0in; padding: 0in;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-family: &amp;quot;Cambria&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 14pt; line-height: 115%;&quot;&gt;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: medium none; margin-bottom: 0in; padding: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: medium none; margin-bottom: 0in; padding: 0in;&quot;&gt;
&lt;span class=&quot;GramE&quot;&gt;&lt;i&gt;&lt;span style=&quot;font-family: &amp;quot;Cambria&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 14pt; line-height: 115%;&quot;&gt;void&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;font-family: &amp;quot;Cambria&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 14pt; line-height: 115%;&quot;&gt; main()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: medium none; margin-bottom: 0in; padding: 0in;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-family: &amp;quot;Cambria&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 14pt; line-height: 115%;&quot;&gt;{&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class=&quot;GramE&quot;&gt;unsigned&lt;/span&gt; char
pot=0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: medium none; margin-bottom: 0in; padding: 0in;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-family: &amp;quot;Cambria&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 14pt; line-height: 115%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class=&quot;SpellE&quot;&gt;adc_&lt;span class=&quot;GramE&quot;&gt;init&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;GramE&quot;&gt;(&lt;/span&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: medium none; margin-bottom: 0in; padding: 0in;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-family: &amp;quot;Cambria&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 14pt; line-height: 115%;&quot;&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;SREG=SREG|0x80&lt;span class=&quot;GramE&quot;&gt;;/&lt;/span&gt;/global
interrupt enable&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: medium none; margin-bottom: 0in; padding: 0in;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-family: &amp;quot;Cambria&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 14pt; line-height: 115%;&quot;&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;DDRB=0XFF;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //set
data direction as output&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: medium none; margin-bottom: 0in; padding: 0in; text-indent: 0.5in;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-family: &amp;quot;Cambria&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 14pt; line-height: 115%;&quot;&gt;TCCR0=TCCR0|0x7A;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //fast &lt;span class=&quot;SpellE&quot;&gt;pwm&lt;span class=&quot;GramE&quot;&gt;,inverting&lt;/span&gt;&lt;/span&gt; mode,8 &lt;span class=&quot;SpellE&quot;&gt;prescaler&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: medium none; margin-bottom: 0in; padding: 0in; text-indent: 0.5in;&quot;&gt;
&lt;span class=&quot;GramE&quot;&gt;&lt;i&gt;&lt;span style=&quot;font-family: &amp;quot;Cambria&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 14pt; line-height: 115%;&quot;&gt;while(&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;font-family: &amp;quot;Cambria&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 14pt; line-height: 115%;&quot;&gt;1)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: medium none; margin-bottom: 0in; padding: 0in; text-indent: 0.5in;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-family: &amp;quot;Cambria&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 14pt; line-height: 115%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: medium none; margin-bottom: 0in; padding: 0in; text-indent: 0.5in;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-family: &amp;quot;Cambria&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 14pt; line-height: 115%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span class=&quot;SpellE&quot;&gt;&lt;span class=&quot;GramE&quot;&gt;delayms&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;GramE&quot;&gt;(&lt;/span&gt;10);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: medium none; margin-bottom: 0in; padding: 0in; text-indent: 0.5in;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-family: &amp;quot;Cambria&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 14pt; line-height: 115%;&quot;&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;OCR0= &lt;span class=&quot;SpellE&quot;&gt;&lt;span class=&quot;GramE&quot;&gt;getdata&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;GramE&quot;&gt;(&lt;/span&gt;0);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //read
value from pot to OCR0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: medium none; margin-bottom: 0in; padding: 0in; text-indent: 0.5in;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-family: &amp;quot;Cambria&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 14pt; line-height: 115%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: medium none; margin-bottom: 0in; padding: 0in;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-family: &amp;quot;Cambria&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 14pt; line-height: 115%;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Helvetica-Bold&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;&lt;o:p&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Link to .zip file containing source code and Proteus ISIS design is &lt;a href=&quot;http://www.mediafire.com/?io4wi5gh54tjwbs&quot;&gt;this.&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Helvetica-Bold&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;&lt;o:p&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;and datasheet of Atmega 8535 can be found from &lt;a href=&quot;http://www.mediafire.com/?g7bg5txjzz55oot&quot;&gt;here.&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Helvetica-Bold&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;&lt;o:p&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;if any question&amp;nbsp; then you can post a comment.&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://embeddedpro.blogspot.com/feeds/4515883712766204594/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://embeddedpro.blogspot.com/2011/10/fast-pwm-omode-of-avr-timers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5832476631874198582/posts/default/4515883712766204594'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5832476631874198582/posts/default/4515883712766204594'/><link rel='alternate' type='text/html' href='http://embeddedpro.blogspot.com/2011/10/fast-pwm-omode-of-avr-timers.html' title='Fast Pwm omode of AVR timers'/><author><name>Keyur</name><uri>http://www.blogger.com/profile/16623791462595264067</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPSZfTotGWxuFGhZJzUvEyQ5myGSY0iAW2zOukQS8W1zDYPIsotO6mVX3WWkbFUCxuoCumXjqZm7dyvUNQ-tQtWwB8xxebJ3FY43oyg97qYTDlUuQPnZ6w9w0xvfEoyH5P-XIUs_ImiAjn/s72-c/CTC.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5832476631874198582.post-6446786448940277801</id><published>2011-10-16T04:22:00.000-07:00</published><updated>2011-10-16T04:23:04.292-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="8051"/><category scheme="http://www.blogger.com/atom/ns#" term="DC motor"/><category scheme="http://www.blogger.com/atom/ns#" term="forward reverse"/><category scheme="http://www.blogger.com/atom/ns#" term="motor interfacing"/><title type='text'>DC motor interfacing with microcontroller</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgI2r00D33SkryEvQa_6caD-2hhhS5fB3DuUbdSebUARkACNswOG7JmNqKyKE5eCh4jCzpAMFDi6e4jdWv6cQYW-PeZJnTvhk8hl1GFa0-QcFeZMKViM-H22NgXixGhPFpOjPCG1OXGfeig/s1600/dc+moto1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;225&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgI2r00D33SkryEvQa_6caD-2hhhS5fB3DuUbdSebUARkACNswOG7JmNqKyKE5eCh4jCzpAMFDi6e4jdWv6cQYW-PeZJnTvhk8hl1GFa0-QcFeZMKViM-H22NgXixGhPFpOjPCG1OXGfeig/s320/dc+moto1.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;#include&amp;lt;reg51.h&amp;gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp; sbit sw1=P2^0;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;sbit sw2=P2^1;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp;sbit &amp;nbsp;L293D_A = P1^0; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Make positive of &lt;span class=&quot;IL_AD&quot; id=&quot;IL_AD4&quot; style=&quot;background-attachment: scroll ! important; background-color: transparent ! important; background-image: none ! important; background-position: 0% 50%; border-bottom: 1px solid rgb(0, 153, 0) ! important; color: black; cursor: pointer ! important; display: inline ! important; float: none ! important; font-family: Arial,serif; font-size: 14px ! important; font-style: normal ! important; font-weight: normal ! important; padding: 0px 0px 1px ! important; position: static; text-decoration: underline ! important;&quot;&gt;motor&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;sbit &amp;nbsp; &amp;nbsp;L293D_B = P1^1; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Make negative of motor 0&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; sbit &amp;nbsp; L293D_E = P1^2; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Enable L293D&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
void rotate_f(void); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Forward run funtion&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
void rotate_b(void); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Backward run function&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
void breaks(void); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Motor stop function&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
void delay(void); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Some delay&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
void main(){&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
P2=0xFF;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
P1=0x00;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Our main function&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;while(1){ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Infinite&amp;nbsp;&lt;span class=&quot;IL_AD&quot; id=&quot;IL_AD6&quot; style=&quot;background-attachment: scroll ! important; background-color: transparent ! important; background-image: none ! important; background-position: 0% 50%; border-bottom: 1px solid rgb(0, 153, 0) ! important; color: #009900; cursor: pointer ! important; display: inline ! important; float: none ! important; font-family: Arial,serif; font-size: 14px ! important; font-style: normal ! important; font-weight: normal ! important; padding: 0px 0px 1px ! important; position: static; text-decoration: underline ! important;&quot;&gt;loop&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&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;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&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;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(sw1==1 &amp;amp;&amp;amp; sw2==0)&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;rotate_f(); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Run forward&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;delay(); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Some delay&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;breaks(); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Stop&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;delay(); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Some delay&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(sw2==1 &amp;amp;&amp;amp; sw1==0)&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;rotate_b(); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Run Backwards&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;delay(); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Some delay&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;breaks(); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Stop&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;delay(); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Some delay&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&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;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
}&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
}&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
void rotate_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;&amp;nbsp;&amp;nbsp; //rotate forward&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
{&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;L293D_A = 1; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Make positive of&amp;nbsp;motor 1&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;L293D_B = 0; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Make negative of motor 0&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;L293D_E = 1; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Enable L293D&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
}&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
void rotate_b()&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //rotate backward&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
{&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;L293D_A = 0; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Make positive of motor 0&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;L293D_B = 1; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Make negative of&amp;nbsp;motor 1&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;L293D_E = 1; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Enable L293D&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
}&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
void breaks()&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; //stop motor&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
{&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;L293D_A = 0; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Make positive of motor 0&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;L293D_B = 0; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Make negative of motor 0&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;L293D_E = 0; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Disable L293D&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
}&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&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;&amp;nbsp; //Some delay...&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
{ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;unsigned char i,j,k;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;for(i=0;i&amp;lt;0x20;i++)&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for(j=0;j&amp;lt;255;j++)&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for(k=0;k&amp;lt;255;k++);&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;you can use these DC motors&lt;/div&gt;
&lt;iframe frameborder=&quot;0&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;http://rcm.amazon.com/e/cm?lt1=_blank&amp;amp;bc1=000000&amp;amp;IS2=1&amp;amp;bg1=FFFFFF&amp;amp;fc1=000000&amp;amp;lc1=0000FF&amp;amp;t=ksw07-20&amp;amp;o=1&amp;amp;p=8&amp;amp;l=as4&amp;amp;m=amazon&amp;amp;f=ifr&amp;amp;ref=ss_til&amp;amp;asins=B003GCGZSK&quot; style=&quot;height: 240px; width: 120px;&quot;&gt;&lt;/iframe&gt;

&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
but if you want to do such easy task with your microcontroller then you are wasting your resources and money so do take this program as an example only. if you want to drive motor directly with switch you can refer &lt;a href=&quot;http://embeddedpro.blogspot.com/2011/10/homemade-wired-toy-car.html&quot;&gt;my earlier post. &lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://embeddedpro.blogspot.com/feeds/6446786448940277801/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://embeddedpro.blogspot.com/2011/10/dc-motor-interfacing-with.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5832476631874198582/posts/default/6446786448940277801'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5832476631874198582/posts/default/6446786448940277801'/><link rel='alternate' type='text/html' href='http://embeddedpro.blogspot.com/2011/10/dc-motor-interfacing-with.html' title='DC motor interfacing with microcontroller'/><author><name>Keyur</name><uri>http://www.blogger.com/profile/16623791462595264067</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgI2r00D33SkryEvQa_6caD-2hhhS5fB3DuUbdSebUARkACNswOG7JmNqKyKE5eCh4jCzpAMFDi6e4jdWv6cQYW-PeZJnTvhk8hl1GFa0-QcFeZMKViM-H22NgXixGhPFpOjPCG1OXGfeig/s72-c/dc+moto1.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5832476631874198582.post-341691442720508648</id><published>2011-10-15T08:55:00.000-07:00</published><updated>2011-10-15T08:55:31.452-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ddram"/><category scheme="http://www.blogger.com/atom/ns#" term="Memoristor"/><category scheme="http://www.blogger.com/atom/ns#" term="memory resistor"/><title type='text'>A new circuit element Memoristor</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1pZ5yq71VlLppEOF7j48Hq_q6Um09mAlCM_iRiRj7PaR4hVCDT3GyTXNS2SwmD22-KbPsHA7M10GbSu1qIwOtF6LB7z-VlQLP1ywUXYfl0ZBufDQO_1geigcvFazZ1DtkLwmmsPqeYtXD/s1600/memoristor.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1pZ5yq71VlLppEOF7j48Hq_q6Um09mAlCM_iRiRj7PaR4hVCDT3GyTXNS2SwmD22-KbPsHA7M10GbSu1qIwOtF6LB7z-VlQLP1ywUXYfl0ZBufDQO_1geigcvFazZ1DtkLwmmsPqeYtXD/s1600/memoristor.jpeg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
As all science students know, there are only three basic elements 
that make up an electrical circuit:the resistor, the capacitor and the 
inductor.&lt;br /&gt;
 Sorry guys!It may be time to tear up your textbooks and
 write the new ones:scientists have realised physical samples of a 
fourth fundamental element which they call a memristor - short for 
memory resistor.&lt;br /&gt;
 In a paper published in the latest issue of 
NATURE MAGAZINE(”The missing memristor found”,may 1st ,2008;vol no.453 ;
 pp 80-83), researchs at hewlett packard labs, report that the missing 
fourth element of the circuitry that professor Leon Chua of the 
University of California in Berkeley predicted in 1971 is indeed 
realisable.&lt;br /&gt;
PRACTICAL UNITS :&lt;br /&gt;
 The team, led by R.Stanley 
Williams, believes that using nano technology one can soon build 
practical units of the resistor-with-memory that cannot be created by a 
mere combination of the three basic circuit elements.&lt;br /&gt;
 Such 
element could fuel a new class of computer memory that would ‘remember’,
 even if the machine were switched off……in other words, tomorrow’s PCs 
could boot up and spring to life instantly.&lt;br /&gt;
 The engineers are busy building memristors using Titanium Dioxide and have already realised a few hybrid versions in silicon.&lt;br /&gt;
 Memory
 banks built using memristors could be a thousand times faster than 
todays magnetic disk systems , and consume a fraction of the power, the 
scientists suggest.&lt;br /&gt;
 In electrical circuit theory, the &lt;strong&gt;memristor&lt;/strong&gt;
 is a passice circuit element. It has been described as the fourth basic
 type of passive circuit element, alongside the well-known capacitor, 
resistor, and inductor. The name is a portmanteau of &lt;em&gt;memory resistor&lt;/em&gt;.&lt;br /&gt;
Although the memristor was predicted and described in 1971 by Leon Chua of UC Berkeley, in a paper in &lt;em&gt;IEEE Transactions on Circuit Theory&lt;/em&gt;,&lt;sup&gt; &lt;/sup&gt;it was a hypothetical device for 37 years, with no known physical examples. According
 to Chua, the “era of nanoscale electronics will be enabled by the 
memristor. This is not just an invention, it is a basic scientific 
discovery.&lt;br /&gt;
In April 2008, a working device with similar 
characteristics to a memristor was announced by a team of researchers at
 HP Labs. The new circuit element may enable the development of a new 
class of high-density non-volatile digital memory. Performance of 
memristors improves as they are scaled down, and they generate less heat
 than transistors. The memristor also has unique analog properties that 
may lead to the invention of other devices.&lt;br /&gt;
 The memristor is an element in which the magnetic flux &lt;span class=&quot;texhtml&quot;&gt;Φ&lt;sub&gt;&lt;em&gt;m&lt;/em&gt;&lt;/sub&gt;&lt;/span&gt; is a function of the accumulated electric charge &lt;em&gt;q&lt;/em&gt; in the device. The rate of change of flux with charge&lt;br /&gt;
&lt;dl&gt;&lt;dd&gt;&lt;img alt=&quot;M(q)=\frac{\mathrm d\Phi_m}{\mathrm dq}&quot; class=&quot;tex&quot; src=&quot;http://upload.wikimedia.org/math/f/d/7/fd7e4cfb09b23627eaf176f5090989d5.png&quot; /&gt;&lt;/dd&gt;&lt;/dl&gt;
is known as &lt;em&gt;memristance&lt;/em&gt;. This is comparable to the other three fundamental circuit elements:&lt;br /&gt;
 &lt;ul&gt;
&lt;li&gt;Resistance: &lt;img alt=&quot;R(I)=\frac{\mathrm dV}{\mathrm dI}&quot; class=&quot;tex&quot; src=&quot;http://upload.wikimedia.org/math/a/e/1/ae11a712cc5837c11b7a7f4536bf103b.png&quot; /&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;Inductance: &lt;img alt=&quot;L(I) = \frac{\mathrm d\Phi_m}{\mathrm dI}&quot; class=&quot;tex&quot; src=&quot;http://upload.wikimedia.org/math/d/1/2/d12cc2f23580f527b0c09e53edc63f58.png&quot; /&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;Capacitance: &lt;img alt=&quot;\frac{1}{C(q)}=\frac{\mathrm dV}{\mathrm dq}&quot; class=&quot;tex&quot; height=&quot;42&quot; src=&quot;http://upload.wikimedia.org/math/8/7/c/87c54ea841641924f68b413383c31416.png&quot; width=&quot;97&quot; /&gt;&lt;/li&gt;
&lt;/ul&gt;
Here &lt;span class=&quot;texhtml&quot;&gt;&lt;em&gt;q&lt;/em&gt;&lt;/span&gt; is electrical charge, &lt;span class=&quot;texhtml&quot;&gt;&lt;em&gt;I&lt;/em&gt;&lt;/span&gt; is electrical current, &lt;span class=&quot;texhtml&quot;&gt;&lt;em&gt;V&lt;/em&gt;&lt;/span&gt; is electrical potential and &lt;span class=&quot;texhtml&quot;&gt;Φ&lt;sub&gt;&lt;em&gt;m&lt;/em&gt;&lt;/sub&gt;&lt;/span&gt;
 is magnetic flux. The differential forms of these equations are used 
because we are comparing non-linear circuit elements; a linear memristor
 would be uninteresting, as explained below.&lt;br /&gt;
 Applying Faraday’s 
law of electromagnetic induction and the chain rule to the equation 
defining the memristance, one obtains that the voltage &lt;em&gt;V&lt;/em&gt; across a memristor is related to the current &lt;em&gt;I&lt;/em&gt; by the instantaneous value of the memristance:&lt;br /&gt;
&lt;dl&gt;&lt;dd&gt;&lt;img alt=&quot;V(t) = M(q(t)) I(t) \,&quot; class=&quot;tex&quot; src=&quot;http://upload.wikimedia.org/math/f/9/2/f92364b56b0b7fc817893c2a77e41ee0.png&quot; /&gt;&lt;/dd&gt;&lt;/dl&gt;
Thus at any given instant, a memristor behaves like an ordinary resistor. However, its “resistance” &lt;em&gt;M(q)&lt;/em&gt;
 is a value which depends on the charge accumulated in the device. This 
differs from ordinary resistors where the resistance is determined by 
fixed physical properties and transistors where the resistance is 
controlled by either the voltage at or current through a gate electrode.
 A linear memristor (one for which &lt;em&gt;M&lt;/em&gt; is constant) would thus be indistinguishable from an ordinary linear resistor (one for which &lt;em&gt;R&lt;/em&gt; is constant), with &lt;em&gt;M = R&lt;/em&gt;.
 Memristance can be said to depend on the history of the charge that has
 flowed through the device in the same way that the voltage of 
capacitors does.&lt;br /&gt;
 The memristor is capable of “remembering” how 
much electrical charge most recently passed through it in one direction 
versus another. Thus, it can “remember” the state it was last in.&lt;br /&gt;
 Fabrication :&lt;br /&gt;
 Interest in the memristor revived in 2007 when an experimental solid-state version was reported&lt;sup&gt; &lt;/sup&gt;by
 Stanley Williams of hewlett packard. A solid-state device could not be 
constructed until the unusual behavior of nanoscale materials made it 
possible. The device does not use magnetic flux as the theoretical 
memristor suggested, nor stores charge as a capacitor does, but instead 
achieves a resistance dependent on the history of current using a 
chemical mechanism.&lt;br /&gt;
 The HP device is composed of a thin (5 nm) 
titanium dioxide film between two electrodes. Initially, there are two 
layers to the film, one of which has a slight depletion of oxygen atoms.
 The oxygen vacancies act as charge carriers, meaning that the depleted 
layer has a much lower resistance than the non-depleted layer. When an 
electric field is applied, the oxygen vacancies drift, changing the 
boundary between the high-resistance and low-resistance layers. Thus the
 resistance of the film as a whole is dependent on how much charge has 
been passed through it in a particular direction, which is reversible by
 changing the direction of current.&lt;br /&gt;
 Samsung has a pending U.S. patent application for a memristor similar to that described by Williams.&lt;br /&gt;
 &lt;a href=&quot;&quot; id=&quot;Potential_applications&quot; name=&quot;Potential_applications&quot;&gt;&lt;/a&gt;&lt;br /&gt;
 Potential applications :&lt;br /&gt;
 Williams’s
 solid-state memristors can be combined into devices called crossbar 
latches, which would replace transistors in future computers, taking up a
 much smaller area. They can also be fashioned into non-volatile 
solid-state memory, which would allow greater data density than hard 
drives with access times potentially similar to DRAM, replacing both 
components. HP prototyped a crossbar latch memory using the devices that
 can fit 100 gigabits in a square centimeter. For comparison, the 
highest-density flash memories at this time (2008) hold 16 gigabits. HP 
has reported that its version of the memristor is about one tenth the 
speed of DRAM.&lt;br /&gt;
 The devices’ resistance would be read with alternating current so that they do not affect the stored value.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://embeddedpro.blogspot.com/feeds/341691442720508648/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://embeddedpro.blogspot.com/2011/10/new-circuit-element-memoristor.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5832476631874198582/posts/default/341691442720508648'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5832476631874198582/posts/default/341691442720508648'/><link rel='alternate' type='text/html' href='http://embeddedpro.blogspot.com/2011/10/new-circuit-element-memoristor.html' title='A new circuit element Memoristor'/><author><name>Keyur</name><uri>http://www.blogger.com/profile/16623791462595264067</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1pZ5yq71VlLppEOF7j48Hq_q6Um09mAlCM_iRiRj7PaR4hVCDT3GyTXNS2SwmD22-KbPsHA7M10GbSu1qIwOtF6LB7z-VlQLP1ywUXYfl0ZBufDQO_1geigcvFazZ1DtkLwmmsPqeYtXD/s72-c/memoristor.jpeg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5832476631874198582.post-5237123931042822268</id><published>2011-10-15T08:46:00.000-07:00</published><updated>2013-01-11T10:42:29.007-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="infrared"/><category scheme="http://www.blogger.com/atom/ns#" term="ir communication"/><category scheme="http://www.blogger.com/atom/ns#" term="obstacle avoider"/><category scheme="http://www.blogger.com/atom/ns#" term="obstacle detection"/><category scheme="http://www.blogger.com/atom/ns#" term="remote control"/><category scheme="http://www.blogger.com/atom/ns#" term="TSOP 1738"/><title type='text'>Obstacle sensor with TSOP 1738</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBw0J1wkMPChCgvdJ2wDAfFCYfjK6yXkjHBvAkL0AA1vVe-7UMhGirzRx4eIBGENRJa8GyYFyGtiRtZS4sSEJ1ey1GkntGLduu6VM6gwQHGp4tT51pPyDwgkd1oA6vCzyR5N0xTNV0Ftmi/s400/TTSOP%252Bbased%252Bobstacle.jpg&quot; width=&quot;371&quot; /&gt;&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
This is a simple yet effective IR proximity sensor built around the 
TSOP 1738 module. The TSOP module is commonly found at the receiving end
 of an IR remote control system; e.g., in TVs, CD players etc. These 
modules require the incoming data to be modulated at a particular 
frequency and would ignore any other IR signals. It is also immune to 
ambient IR light, so one can easily use these sensors outdoors or under 
heavily lit conditions.&lt;br /&gt;
Such modules are available for different  carrier frequencies from 32 kHz to 42 kHz.They cost some thing around 20Rs.&lt;br /&gt;
In
 this particular proximity sensor, we will be generating a constant 
stream of square wave signal using IC555 centered at 38 kHz and would 
use it to drive an IR led. So whenever this signal bounces off the 
obstacles, the receiver would detect it and change its output. Since the
 TSOP 1738 module works in the active-low configuration, its output 
would normally remain high and would go low when it detects the signal 
(the obstacle).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
you can see other post related to IR sensors &lt;a href=&quot;http://embeddedpro.blogspot.com/2011/10/sensors-for-line-follower.html&quot;&gt;here&lt;/a&gt;, where direct transistors are used for switching &lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span id=&quot;goog_1958038303&quot;&gt;&lt;/span&gt;&lt;span id=&quot;goog_1958038304&quot;&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://embeddedpro.blogspot.com/feeds/5237123931042822268/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://embeddedpro.blogspot.com/2011/10/Obstacle-sensor-with-microcontroller-and-TSOP-1738.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5832476631874198582/posts/default/5237123931042822268'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5832476631874198582/posts/default/5237123931042822268'/><link rel='alternate' type='text/html' href='http://embeddedpro.blogspot.com/2011/10/Obstacle-sensor-with-microcontroller-and-TSOP-1738.html' title='Obstacle sensor with TSOP 1738'/><author><name>Keyur</name><uri>http://www.blogger.com/profile/16623791462595264067</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBw0J1wkMPChCgvdJ2wDAfFCYfjK6yXkjHBvAkL0AA1vVe-7UMhGirzRx4eIBGENRJa8GyYFyGtiRtZS4sSEJ1ey1GkntGLduu6VM6gwQHGp4tT51pPyDwgkd1oA6vCzyR5N0xTNV0Ftmi/s72-c/TTSOP%252Bbased%252Bobstacle.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5832476631874198582.post-2438860096311251860</id><published>2011-10-14T10:11:00.000-07:00</published><updated>2011-10-14T10:11:46.951-07:00</updated><title type='text'>Effective use of header file and .c files</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
I recently worked with some embedded system teams who were struggling 
with the best way to use .c and .h files for their source code. As I was
 doing this, I remembered that back when I was learning how to program 
that it took me quite a while to figure all this out too!&amp;nbsp; So, here are 
some guidelines on a reasonable way to use .c and .h files for 
organizing your source code. They are listed as a set of rules, but it 
helps to apply common sense too:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Use multiple .c files, not just one &quot;main.c&quot; file. Every .c file
 should have a set of variables and functions that are tightly related 
to each other, and only loosely related to the other .c files.&amp;nbsp; &quot;Main.c&quot;
 should only have the main loop in it.&lt;/li&gt;
&lt;li&gt;.C files allocate storage and define executable code. Only .c files 
have a function defined in them.&amp;nbsp; Only .c files allocate storage for 
variables&lt;/li&gt;
&lt;li&gt;.H files define external storage and define function prototypes The 
.h files give other modules the information they need to work with a 
particular .c file, but don&#39;t actually define storage and don&#39;t actually
 define code.&amp;nbsp; The keyword &quot;extern&quot; should generally be showing up in .h
 files only.&lt;/li&gt;
&lt;li&gt;Every .c file should have a corresponding .h file. The .h file 
provides the external interface information to other modules for using 
the corresponding .c file.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
Here is an example of how this works. Let&#39;s say you have files:&amp;nbsp; main.c &amp;nbsp;&amp;nbsp; adc.c &amp;nbsp; output.c&amp;nbsp; process.c&amp;nbsp; watchdog.c&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;main.c&lt;/b&gt; would have the main loop that polls the A/D converter, 
processes values, sends outputs, and pets the watchdog timer.&amp;nbsp; This 
would look like a sequence of consecutive subroutine calls within an 
infinite loop.&amp;nbsp; There would be a corresponding main.h that might have 
global definitions in it&amp;nbsp; (you can also have &quot;globals.h&quot; although I 
prefer not to do that myself).&amp;nbsp;&amp;nbsp; Main.c would #include&amp;nbsp; main.h, adc.h, 
output.h, process.h and watchdog.h because it needs to call functions 
from all the corresponding .c files.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;adc.c&lt;/b&gt; would have the A/D converter code and functions to poll the
 A/D and store most recent A/D values in a data structure.&amp;nbsp; The 
corresponding adc.h would have extern declarations and function 
prototypes for any other routine that uses A/D calls (for example, a 
call to look up a recent A/D value from polling).&amp;nbsp; Adc.c would #include 
adc.h and perhaps nothing else.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;output.c&lt;/b&gt; would take values and send them to outputs.&amp;nbsp; The 
corresponding output.h would have information for calling output 
functions.&amp;nbsp; Output.c would probably just #include output.h.&amp;nbsp; (Whether 
main.c actually calls something in output.c depends on your particular 
code structure, but I&#39;m assuming that outputs have two steps: process.c 
queues outputs, and the main.c call actually sends them.)&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;process.c &lt;/b&gt;would take A/D values, compute on them, and queue 
results for output. It might need to call functions in adc.c to get 
recent values, and functions in output.c to send results out. For that 
reason it would #include process.h, adc.h, output.h&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;watchdog.c&lt;/b&gt; would set up and service the watchdog timer. It would #include watchdog.h&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
One wrinkle is that some compilers can only optimize in a single .c file
 (e.g., only do &quot;inline&quot; within a single file). This is no reason to put
 everything in a single .c file!&amp;nbsp; Instead, you can just #include all the
 other .c files from within main.c. (You might have to make sure you 
include each .h file once depending on what&#39;s in them, but often that 
isn&#39;t necessary.) You should avoid #including a .c file from within 
another .c file unless there is a compelling reason to do so such as 
getting your optimizer to actually work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
you can see my another &lt;a href=&quot;http://embeddedpro.blogspot.com/2011/10/header-file-making.html&quot;&gt;post about making a header file.&lt;/a&gt; &lt;br /&gt;
&lt;br /&gt;
This is only intended to convey the basics. There are many hairs to 
split depending on your situation, but if you follow the above 
guidelines you&#39;re off to a good start.
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://embeddedpro.blogspot.com/feeds/2438860096311251860/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://embeddedpro.blogspot.com/2011/10/effective-use-of-header-file-and-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5832476631874198582/posts/default/2438860096311251860'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5832476631874198582/posts/default/2438860096311251860'/><link rel='alternate' type='text/html' href='http://embeddedpro.blogspot.com/2011/10/effective-use-of-header-file-and-c.html' title='Effective use of header file and .c files'/><author><name>Keyur</name><uri>http://www.blogger.com/profile/16623791462595264067</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5832476631874198582.post-8812836619411432710</id><published>2011-10-14T09:46:00.001-07:00</published><updated>2011-10-14T09:48:24.680-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="animation on lcd"/><category scheme="http://www.blogger.com/atom/ns#" term="atmega 8535"/><category scheme="http://www.blogger.com/atom/ns#" term="avr"/><category scheme="http://www.blogger.com/atom/ns#" term="avr 8535"/><category scheme="http://www.blogger.com/atom/ns#" term="custom character"/><category scheme="http://www.blogger.com/atom/ns#" term="game on lcd"/><category scheme="http://www.blogger.com/atom/ns#" term="microcontroller"/><title type='text'>Animation and custom character on lcd</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;style&gt;
&lt;!--
 /* Font Definitions */
 @font-face
 {font-family:Calibri;
 panose-1:2 15 5 2 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
 {margin-top:0in;
 margin-right:0in;
 margin-bottom:10.0pt;
 margin-left:0in;
 line-height:115%;
 font-size:11.0pt;
 font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;}
.MsoChpDefault
 {font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;}
.MsoPapDefault
 {margin-bottom:10.0pt;
 line-height:115%;}
@page WordSection1
 {size:8.5in 11.0in;
 margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
 {page:WordSection1;}
--&gt;
&lt;/style&gt;





&lt;br /&gt;
&lt;div class=&quot;WordSection1&quot;&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiy_43UV1KldH5uHyMGKSOSSPPLxUIYNYUxBCz2N4HLqG2B-qIOMEFmkGX7tXXKbXHBKuTPyo_PrVgfSbJWx3eewiSIZPXaiCo6V0kQijPHq8BGEfFflnQii9uuQIcmS5c-keq-K2AetamL/s1600/oct+2011--0012.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiy_43UV1KldH5uHyMGKSOSSPPLxUIYNYUxBCz2N4HLqG2B-qIOMEFmkGX7tXXKbXHBKuTPyo_PrVgfSbJWx3eewiSIZPXaiCo6V0kQijPHq8BGEfFflnQii9uuQIcmS5c-keq-K2AetamL/s640/oct+2011--0012.jpg&quot; width=&quot;480&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
Hello friends I have been very fascinated about the custom
character generation on normal (16x2) LCD&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
So I decided to have some hands on about it. I started
reading about it on net and finding data about CGRAM. &lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
I came across many good websites they are listed at the end
of the post..&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
There are mainly two RAMs in our LCD display &lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
1)DDRAM-you put the ASCII value and it is displayed on the
screen (normally everybody is aware with it)&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
2)CGRAM-discussed below in detail &amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&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; CGRAM is 64 Byte ram we can use it to make 8
custom characters.so this is clear that each character consist 8 bytes now let
us start generating a custom character.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1szHpy-EFeIOIq2zX6_THSUwHapau_ft9G97uT956xoEJyHXsPe8mwO9XJMzeThX5FwcY_aLaJApLuNUnjOCo3sDIKZ8-XFAJyMCwetEwqGiNjIWQoyjAdZrxgYv0PvA_lzfuW4YhhLnU/s1600/bell.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;153&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1szHpy-EFeIOIq2zX6_THSUwHapau_ft9G97uT956xoEJyHXsPe8mwO9XJMzeThX5FwcY_aLaJApLuNUnjOCo3sDIKZ8-XFAJyMCwetEwqGiNjIWQoyjAdZrxgYv0PvA_lzfuW4YhhLnU/s320/bell.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Each block we see in our LCD is 5x8 pixels(5 columns &amp;amp; 8
rows) we can configure lcd row by row as shown in the figure thus we get 8
bytes for one pixel.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
We can make 8 characters in CGRAM so after obtaining the
values of each row just load it to CGRAM .To do so you have to point starting
address of RAM you can take help of the below given able you have to do&amp;nbsp; 0x40+(CGRAM
address)once a byte is written on the RAM location then you need not to point
the next data then the&lt;u&gt; pointer is incremented by itself.&lt;/u&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9nPeCue83bvaSw4iEKjsWx-7lADILYr1ILiPIUsmgseQeqvPlBYoEc_3XM6Sn61jYoCbwDGqPh_Ku-1yUbd-Vuoyp9KPSTlITNSCVL4Z8CYzboY4TVk1hc8cZYlVR-xPo3L8Y8o480W2r/s1600/memory.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;206&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9nPeCue83bvaSw4iEKjsWx-7lADILYr1ILiPIUsmgseQeqvPlBYoEc_3XM6Sn61jYoCbwDGqPh_Ku-1yUbd-Vuoyp9KPSTlITNSCVL4Z8CYzboY4TVk1hc8cZYlVR-xPo3L8Y8o480W2r/s320/memory.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Now if you have constructed your character in CGRAM how
would you display it ?&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
This is the question puzzled me the most. I’ll try to
explain in easy words .once you have created your character in any location in
CGRAM (say 1&lt;sup&gt;st&lt;/sup&gt; location=0x40 to 0x48) &amp;nbsp;&amp;nbsp;and you want to display it
in any location (say 1&lt;sup&gt;st&lt;/sup&gt; row 6&lt;sup&gt;th&lt;/sup&gt; column=0x86)then point
to 0x86 by using &amp;nbsp;&amp;nbsp;&amp;nbsp;“lcd_cmd(0x86)” and write ASCII value zero&amp;nbsp; (‘0’)(this is
the equivalent value of CGRAM 1&lt;sup&gt;st&lt;/sup&gt; location)there you can see the
table below to get the ASCII values of &amp;nbsp;&amp;nbsp;Characters generated in CGRAM.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifWuG1v94pAtdt8CF9zix4OIoUhyphenhyphenxe4RghFJ0fcCUG6BdnoSY2qxnf-AX_k0GT-pSNGdohe7ayQBQBim_xjrMSRjwEzFQuLPOM-RBP96V5U6XLuXwnGkmAQuS-b8JGqZ3mWX0rrDu-iAcH/s1600/base_address.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifWuG1v94pAtdt8CF9zix4OIoUhyphenhyphenxe4RghFJ0fcCUG6BdnoSY2qxnf-AX_k0GT-pSNGdohe7ayQBQBim_xjrMSRjwEzFQuLPOM-RBP96V5U6XLuXwnGkmAQuS-b8JGqZ3mWX0rrDu-iAcH/s1600/base_address.gif&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
So you are now done with all the basics of generating a
custom character you can generate a character independently or with the help of
two or more blocks as shown below.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisua-dsEGjqLLv-lRKUkvNRFFJz0gvgmDfpzANi57fyUpny3cJFvDcSMwnzmzj3sIIlCnzGRFODcPEGFFyBfKYFrFxjlb2lLtK-tZG_VSYZHGHb4XHIGfenmgAM2Ki_CuzuRtYyszrsJ7_/s1600/oct+2011--0013.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;480&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisua-dsEGjqLLv-lRKUkvNRFFJz0gvgmDfpzANi57fyUpny3cJFvDcSMwnzmzj3sIIlCnzGRFODcPEGFFyBfKYFrFxjlb2lLtK-tZG_VSYZHGHb4XHIGfenmgAM2Ki_CuzuRtYyszrsJ7_/s640/oct+2011--0013.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
I tried to generate the rupee symbol on LCD. But first I generated
it on paper to get some better idea. &amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
So here are some demos of what you can do…..&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;Indian Rupee symbol (Designer: kishan. keyur)….&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiiJm4fsvrzB2chfJ7ZMmAGqV88mJ6nN-5ETfaccLgczzixdpUxKzg3L8_bzB24H68XJTL0_k2eEIyZaTOIKDDY3gsHtLQIqx0eZ5l_RuACUl58TpXyDOofY9Wz5Bs2Id6mHVSWuG02J7s/s1600/oct+2011--0017.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;280&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiiJm4fsvrzB2chfJ7ZMmAGqV88mJ6nN-5ETfaccLgczzixdpUxKzg3L8_bzB24H68XJTL0_k2eEIyZaTOIKDDY3gsHtLQIqx0eZ5l_RuACUl58TpXyDOofY9Wz5Bs2Id6mHVSWuG02J7s/s640/oct+2011--0017.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
A car( Designer: Preet)……&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7vcecSG5j1tFemBAk7R0EQ2n_W0A4zBQ5vJGW_Qb3eTiBKwJsSlObutwHtHcf5uHX0CDjIX7aEy08qjocYKATeTrruwn_IpXKMkndp-GQVoln6mXwQVlSNpQ54-skqTzsnfmQyN_rSYB4/s1600/oct+2011--0018.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;216&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7vcecSG5j1tFemBAk7R0EQ2n_W0A4zBQ5vJGW_Qb3eTiBKwJsSlObutwHtHcf5uHX0CDjIX7aEy08qjocYKATeTrruwn_IpXKMkndp-GQVoln6mXwQVlSNpQ54-skqTzsnfmQyN_rSYB4/s640/oct+2011--0018.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;a href=&quot;http://www.amazon.com/gp/product/0750656352/ref=as_li_tf_tl?ie=UTF8&amp;amp;tag=ksw07-20&amp;amp;linkCode=as2&amp;amp;camp=217145&amp;amp;creative=399369&amp;amp;creativeASIN=0750656352&quot;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
now thats not all&lt;br /&gt;
do it sound cool then look at the video you can see the animation done in 16x2 lcd....&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/CDSg3z9FWmE?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;br /&gt;
further more you can develop interactive game with the help of this experience. &lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
links:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;a href=&quot;http://ashishrd.blogspot.com/2010/01/adding-small-hd44780-lcd-display_29.html&quot;&gt;Ashish&#39;s programming journal &lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;a href=&quot;http://www.8051projects.net/lcd-interfacing/lcd-custom-character.php&quot;&gt;Ricky&#39;s world&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;a href=&quot;http://www.dinceraydin.com/lcd/custom.htm&quot;&gt;Defining custom character&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;a href=&quot;http://www.lcdinterfacing.info/&quot;&gt;interfacing lcd&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
you can see some books of avr here&lt;br /&gt;
&lt;a href=&quot;http://www.amazon.com/gp/product/1418039594/ref=as_li_tf_tl?ie=UTF8&amp;amp;tag=ksw07-20&amp;amp;linkCode=as2&amp;amp;camp=217145&amp;amp;creative=399369&amp;amp;creativeASIN=1418039594&quot;&gt;Embedded C Programming and the Atmel AVR&lt;/a&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=ksw07-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=1418039594&amp;amp;camp=217145&amp;amp;creative=399369&quot; style=&quot;border: medium none ! important; margin: 0px ! important;&quot; width=&quot;1&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.amazon.com/gp/product/0750656352/ref=as_li_tf_tl?ie=UTF8&amp;amp;tag=ksw07-20&amp;amp;linkCode=as2&amp;amp;camp=217145&amp;amp;creative=399369&amp;amp;creativeASIN=0750656352&quot;&gt;AVR: An Introductory Course&lt;/a&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=ksw07-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=0750656352&amp;amp;camp=217145&amp;amp;creative=399369&quot; style=&quot;border: medium none ! important; margin: 0px ! important;&quot; width=&quot;1&quot; /&gt;

&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
the LCD which i used&lt;br /&gt;
&lt;br /&gt;
&lt;iframe frameborder=&quot;0&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;http://rcm.amazon.com/e/cm?t=ksw07-20&amp;amp;o=1&amp;amp;p=8&amp;amp;l=as1&amp;amp;asins=B004MGXOUQ&amp;amp;ref=tf_til&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;f=ifr&quot; style=&quot;height: 240px; width: 120px;&quot;&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
hope you enjoyed the post as i did...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:)&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://embeddedpro.blogspot.com/feeds/8812836619411432710/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://embeddedpro.blogspot.com/2011/10/animation-and-custom-character-on-lcd.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5832476631874198582/posts/default/8812836619411432710'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5832476631874198582/posts/default/8812836619411432710'/><link rel='alternate' type='text/html' href='http://embeddedpro.blogspot.com/2011/10/animation-and-custom-character-on-lcd.html' title='Animation and custom character on lcd'/><author><name>Keyur</name><uri>http://www.blogger.com/profile/16623791462595264067</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiy_43UV1KldH5uHyMGKSOSSPPLxUIYNYUxBCz2N4HLqG2B-qIOMEFmkGX7tXXKbXHBKuTPyo_PrVgfSbJWx3eewiSIZPXaiCo6V0kQijPHq8BGEfFflnQii9uuQIcmS5c-keq-K2AetamL/s72-c/oct+2011--0012.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5832476631874198582.post-6188137901136184988</id><published>2011-10-14T09:45:00.001-07:00</published><updated>2011-10-14T09:50:11.576-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="atmega 8535"/><category scheme="http://www.blogger.com/atom/ns#" term="avr"/><category scheme="http://www.blogger.com/atom/ns#" term="avr 8535"/><category scheme="http://www.blogger.com/atom/ns#" term="firing pulse"/><category scheme="http://www.blogger.com/atom/ns#" term="gate control"/><category scheme="http://www.blogger.com/atom/ns#" term="inductive kick"/><category scheme="http://www.blogger.com/atom/ns#" term="isis"/><category scheme="http://www.blogger.com/atom/ns#" term="microcontroller"/><category scheme="http://www.blogger.com/atom/ns#" term="mosfet inverter"/><category scheme="http://www.blogger.com/atom/ns#" term="power inverter"/><category scheme="http://www.blogger.com/atom/ns#" term="proteus"/><title type='text'>Design of power inverter in Proteus</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;link href=&quot;inverter_files/filelist.xml&quot; rel=&quot;File-List&quot;&gt;&lt;/link&gt;

&lt;link href=&quot;inverter_files/themedata.thmx&quot; rel=&quot;themeData&quot;&gt;&lt;/link&gt;
&lt;link href=&quot;inverter_files/colorschememapping.xml&quot; rel=&quot;colorSchemeMapping&quot;&gt;&lt;/link&gt;

&lt;style&gt;
&lt;!--
 /* Font Definitions */
 @font-face
 {font-family:Calibri;
 panose-1:2 15 5 2 2 2 4 3 2 4;
 mso-font-charset:0;
 mso-generic-font-family:swiss;
 mso-font-pitch:variable;
 mso-font-signature:-520092929 1073786111 9 0 415 0;}
@font-face
 {font-family:Tahoma;
 panose-1:2 11 6 4 3 5 4 4 2 4;
 mso-font-charset:0;
 mso-generic-font-family:swiss;
 mso-font-pitch:variable;
 mso-font-signature:-520081665 -1073717157 41 0 66047 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
 {mso-style-unhide:no;
 mso-style-qformat:yes;
 mso-style-parent:&quot;&quot;;
 margin-top:0in;
 margin-right:0in;
 margin-bottom:10.0pt;
 margin-left:0in;
 line-height:115%;
 mso-pagination:widow-orphan;
 font-size:11.0pt;
 font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
 mso-ascii-font-family:Calibri;
 mso-ascii-theme-font:minor-latin;
 mso-fareast-font-family:Calibri;
 mso-fareast-theme-font:minor-latin;
 mso-hansi-font-family:Calibri;
 mso-hansi-theme-font:minor-latin;
 mso-bidi-font-family:&quot;Times New Roman&quot;;
 mso-bidi-theme-font:minor-bidi;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
 {mso-style-noshow:yes;
 mso-style-priority:99;
 mso-style-link:&quot;Balloon Text Char&quot;;
 margin:0in;
 margin-bottom:.0001pt;
 mso-pagination:widow-orphan;
 font-size:8.0pt;
 font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;
 mso-fareast-font-family:Calibri;
 mso-fareast-theme-font:minor-latin;}
span.BalloonTextChar
 {mso-style-name:&quot;Balloon Text Char&quot;;
 mso-style-noshow:yes;
 mso-style-priority:99;
 mso-style-unhide:no;
 mso-style-locked:yes;
 mso-style-link:&quot;Balloon Text&quot;;
 mso-ansi-font-size:8.0pt;
 mso-bidi-font-size:8.0pt;
 font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;
 mso-ascii-font-family:Tahoma;
 mso-hansi-font-family:Tahoma;
 mso-bidi-font-family:Tahoma;}
span.SpellE
 {mso-style-name:&quot;&quot;;
 mso-spl-e:yes;}
span.GramE
 {mso-style-name:&quot;&quot;;
 mso-gram-e:yes;}
.MsoChpDefault
 {mso-style-type:export-only;
 mso-default-props:yes;
 font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
 mso-ascii-font-family:Calibri;
 mso-ascii-theme-font:minor-latin;
 mso-fareast-font-family:Calibri;
 mso-fareast-theme-font:minor-latin;
 mso-hansi-font-family:Calibri;
 mso-hansi-theme-font:minor-latin;
 mso-bidi-font-family:&quot;Times New Roman&quot;;
 mso-bidi-theme-font:minor-bidi;}
.MsoPapDefault
 {mso-style-type:export-only;
 margin-bottom:10.0pt;
 line-height:115%;}
@page WordSection1
 {size:8.5in 11.0in;
 margin:1.0in 1.0in 1.0in 1.0in;
 mso-header-margin:.5in;
 mso-footer-margin:.5in;
 mso-paper-source:0;}
div.WordSection1
 {page:WordSection1;}
--&gt;
&lt;/style&gt;





&lt;br /&gt;
&lt;div class=&quot;WordSection1&quot;&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
Hello friends&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
Rright now I am working with induction furnace
as a final year project.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
As a part of that I am working on an inverter made up of
H-bridge connection of Power MOSFETs.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
Basic connection of an inverter would be as shown in figure
below….&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBSBWNbLGjrcm9W5HC1_1CdOg8bm7c3sEcsstwTk5Wubr0z17ToyWO2FlRlWhqazseIJZVLnVlx-YbWUk_ppZZVgs7iMyfmhrPWhX-zL4a9rGDZFn_JI2u9aehlHQjPbD3sZ86jOLQ1Lda/s1600/bridge.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;298&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBSBWNbLGjrcm9W5HC1_1CdOg8bm7c3sEcsstwTk5Wubr0z17ToyWO2FlRlWhqazseIJZVLnVlx-YbWUk_ppZZVgs7iMyfmhrPWhX-zL4a9rGDZFn_JI2u9aehlHQjPbD3sZ86jOLQ1Lda/s320/bridge.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
If s1 and s4 are on current through load is positive.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMvWLXtJhFYGusYiIK8QKGX5iiH_83dWJrfAVJj2dDFc7mwgGvoAnPWlOXeFhkv3JQQwqXj_EpGHTmIA-BABUlieVr4Sa5UNe24tLoiC20NY5ulcUU2wc1tNikcJ2RgRMo5tCUs8YPMN9W/s1600/bridge%252B.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;298&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMvWLXtJhFYGusYiIK8QKGX5iiH_83dWJrfAVJj2dDFc7mwgGvoAnPWlOXeFhkv3JQQwqXj_EpGHTmIA-BABUlieVr4Sa5UNe24tLoiC20NY5ulcUU2wc1tNikcJ2RgRMo5tCUs8YPMN9W/s320/bridge%252B.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
If s2 and s3 are on current through load is negative.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitQmDF8wiwGiwovaEW6-8-yzJPzDKRZLtkh5QNdxJLu2WdVxQ9mytmQ0VNroHLaATzh1UQTzcuahbkRHUbQ-6RyBu3pZ61UTuHCwzJLWQ5UUr7367I4g1BTBQXx0gv206RrTyRGD-tsFb7/s1600/bridge-.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;298&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitQmDF8wiwGiwovaEW6-8-yzJPzDKRZLtkh5QNdxJLu2WdVxQ9mytmQ0VNroHLaATzh1UQTzcuahbkRHUbQ-6RyBu3pZ61UTuHCwzJLWQ5UUr7367I4g1BTBQXx0gv206RrTyRGD-tsFb7/s320/bridge-.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
Be careful about simultaneous conduction of s1 and s2 or s3
and s4 if either are conducting simultaneously you will end up with something blown
either it is fuse of lab or your own design..:(&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
we can come up the short circuit by &quot;crow bar circuit&quot;but that is not discussed here.. &lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
Now comes the most challenging work generation of gate
pulses for MOSFETs. &lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
As I know that my &lt;span class=&quot;GramE&quot;&gt;load(&lt;/span&gt;in future)is
inductive in nature so I have to design it including &lt;a href=&quot;http://books.google.co.in/books?id=eS1z95mzi28C&amp;amp;printsec=frontcover&amp;amp;dq=inauthor:%22M.+H.+Rashid%22&amp;amp;hl=en&amp;amp;ei=1fqCTumrLqahiAeEt5jtDg&amp;amp;sa=X&amp;amp;oi=book_result&amp;amp;ct=result&amp;amp;resnum=1&amp;amp;ved=0CDEQ6AEwAA#v=onepage&amp;amp;q&amp;amp;f=false&quot;&gt;“zero voltage freewheeling”&lt;/a&gt;.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;o:p&gt;&lt;/o:p&gt;The pulses &lt;span class=&quot;GramE&quot;&gt;that &amp;nbsp;I&lt;/span&gt; have to generate are shown below this
fig is taken from Power electronics by &lt;a href=&quot;http://books.google.co.in/books?id=LX5GKpQz2CgC&amp;amp;printsec=frontcover&amp;amp;dq=inauthor:%22joseph+vithayathil%22&amp;amp;hl=en&amp;amp;ei=J_uCTrvRDMiciAeEqpWWDw&amp;amp;sa=X&amp;amp;oi=book_result&amp;amp;ct=result&amp;amp;resnum=1&amp;amp;ved=0CDQQ6AEwAA#v=onepage&amp;amp;q&amp;amp;f=false&quot;&gt;Joseph &lt;span class=&quot;SpellE&quot;&gt;Vithayathi&lt;/span&gt;.&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpOJivrMTrekSftckFPrBf8HGum_3gkWJ4HHmC_r18dTYgqJBP5LIQiOsTUGf1bhdqS_bQf87hcs_ur8SOyskKUg10FNBwFb5-eYa0OYE9U7oyYDHYwfoTWbnEdVroIl9RYUTN7Eby8XsN/s1600/Pulses+.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpOJivrMTrekSftckFPrBf8HGum_3gkWJ4HHmC_r18dTYgqJBP5LIQiOsTUGf1bhdqS_bQf87hcs_ur8SOyskKUg10FNBwFb5-eYa0OYE9U7oyYDHYwfoTWbnEdVroIl9RYUTN7Eby8XsN/s640/Pulses+.jpg&quot; width=&quot;562&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
The method of generating these pulses is shown below.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEUCwcrIJDPKbFg3d-Jt3QvWB9lRjliF4GWh83Nd5zUhUWc8CmrNOudxCKRo_Kyr_1wdb70hVw6bt9xZ9NVGKnwMrZ0Vx0UIGK0guNqVNOwrQvYlLHHGvSbMP-ef7w4ddIaZi6rrsx_ctF/s1600/flow+chart.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEUCwcrIJDPKbFg3d-Jt3QvWB9lRjliF4GWh83Nd5zUhUWc8CmrNOudxCKRo_Kyr_1wdb70hVw6bt9xZ9NVGKnwMrZ0Vx0UIGK0guNqVNOwrQvYlLHHGvSbMP-ef7w4ddIaZi6rrsx_ctF/s640/flow+chart.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
I have used microcontroller (My favorite AVR &lt;span class=&quot;SpellE&quot;&gt;Atmega&lt;/span&gt; &lt;span class=&quot;GramE&quot;&gt;8535 )to generate Ramp wave.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span class=&quot;GramE&quot;&gt; Code&lt;/span&gt; to generate ramp
wave of 10 KHz is given below(crystal &lt;span class=&quot;SpellE&quot;&gt;freq&lt;/span&gt; is 16MHz)&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; margin-bottom: 0in;&quot;&gt;
&lt;span class=&quot;GramE&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot;&gt;include&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;SpellE&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot;&gt;avr&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: none repeat scroll 0% 0% yellow; font-family: Verdana,sans-serif;&quot;&gt;/&lt;span class=&quot;SpellE&quot;&gt;io.&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% lime;&quot;&gt;#include&amp;lt;&lt;span class=&quot;SpellE&quot;&gt;delay.h&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; margin-bottom: 0in;&quot;&gt;
&lt;span class=&quot;GramE&quot;&gt;&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot;&gt;void&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot;&gt; main()&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% lime;&quot;&gt;{&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot;&gt;DDRB=0xFF;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; margin-bottom: 0in;&quot;&gt;
&lt;span class=&quot;GramE&quot;&gt;&lt;span style=&quot;background: none repeat scroll 0% 0% lime;&quot;&gt;unsigned&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: none repeat scroll 0% 0% lime;&quot;&gt; char i=0;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; margin-bottom: 0in;&quot;&gt;
&lt;span class=&quot;GramE&quot;&gt;&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot;&gt;while(&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot;&gt;1)&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% lime;&quot;&gt;{&lt;/span&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; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot;&gt;PORTB=i++;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; margin-bottom: 0in;&quot;&gt;
&lt;span class=&quot;SpellE&quot;&gt;&lt;span class=&quot;GramE&quot;&gt;&lt;span style=&quot;background: none repeat scroll 0% 0% lime;&quot;&gt;asm&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;GramE&quot;&gt;&lt;span style=&quot;background: none repeat scroll 0% 0% lime;&quot;&gt;(&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: none repeat scroll 0% 0% lime;&quot;&gt;&quot;&lt;span class=&quot;SpellE&quot;&gt;nop&lt;/span&gt;&quot;);&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; margin-bottom: 0in;&quot;&gt;
&lt;span class=&quot;SpellE&quot;&gt;&lt;span class=&quot;GramE&quot;&gt;&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot;&gt;asm&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;GramE&quot;&gt;&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot;&gt;(&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot;&gt;&quot;&lt;span class=&quot;SpellE&quot;&gt;nop&lt;/span&gt;&quot;);&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% lime;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif; margin-bottom: 0in;&quot;&gt;
Then the
wave is fed to a comparator, the reference voltage &lt;span class=&quot;GramE&quot;&gt;is &amp;nbsp;given&lt;/span&gt; with the &amp;nbsp;help of a &amp;nbsp;potentiometer user can adjust it.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwo6Dv7RVsKNRJoOTG-_je2yKSwfi3_0zt6GivyOJ8UphUifwOcAfFd4y8GnMslXLdQU-5yHqa1hQWC2cUi7cFT49rtMtIHXeSmPP79YylOtNELzUh1eFio-B59XWLQtRY3W9s1sRK46nZ/s1600/pwm.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwo6Dv7RVsKNRJoOTG-_je2yKSwfi3_0zt6GivyOJ8UphUifwOcAfFd4y8GnMslXLdQU-5yHqa1hQWC2cUi7cFT49rtMtIHXeSmPP79YylOtNELzUh1eFio-B59XWLQtRY3W9s1sRK46nZ/s640/pwm.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif; margin-bottom: 0in;&quot;&gt;
&lt;o:p&gt;you can see the pwm changing with reference to the DC level changed by user..&amp;nbsp; &lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi00hbflYLGzi5P9WXVjYNfhdZgh_KvHhW1HD-PwcPHToKO8Fu6KsJDvnQC1bZDKWrTPryIIrBupFM1T4_c3ZUksfd0rRu53gGt0ug8qiy7_0i5LXAFO9mOy1I-sVbh9w73QOyJrCJIpfR7/s1600/10.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;414&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi00hbflYLGzi5P9WXVjYNfhdZgh_KvHhW1HD-PwcPHToKO8Fu6KsJDvnQC1bZDKWrTPryIIrBupFM1T4_c3ZUksfd0rRu53gGt0ug8qiy7_0i5LXAFO9mOy1I-sVbh9w73QOyJrCJIpfR7/s640/10.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOzPji-mIqjc9VCFJANGsCKnIRw5a_58PcuM935KoK6oIQ2TnDbp8qIetEjMNDCF76RTtVWUC099M-m4k8FgZdPJyKILzEZC6v4pvPoKwUjTC5KMqIzbl0r6sPrIjG9bzuo3eG4MOdBTzP/s1600/90.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;412&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOzPji-mIqjc9VCFJANGsCKnIRw5a_58PcuM935KoK6oIQ2TnDbp8qIetEjMNDCF76RTtVWUC099M-m4k8FgZdPJyKILzEZC6v4pvPoKwUjTC5KMqIzbl0r6sPrIjG9bzuo3eG4MOdBTzP/s640/90.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;o:p&gt;after connecting this stage to the Flip Flop stage we can observe these waveforms&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizrFCGYm2vhOS3t0g44iOI76pvBwWv3JsZvzIwNoxX4x1AL9lB2c0j6HVPvcqIqYPiB5Z0KBK_DjyVrGx7MxlQbS1_UKQwEih666UWj83w_7IIMnEZ7h10-5oMCBAZBZZPjSA8SzPZBec7/s1600/gate+pulse.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;416&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizrFCGYm2vhOS3t0g44iOI76pvBwWv3JsZvzIwNoxX4x1AL9lB2c0j6HVPvcqIqYPiB5Z0KBK_DjyVrGx7MxlQbS1_UKQwEih666UWj83w_7IIMnEZ7h10-5oMCBAZBZZPjSA8SzPZBec7/s640/gate+pulse.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
after applying these gate pulses to MOSFET (IRF640)we can see the changing direction of current through the load branch...&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiT69UAqzoxDoxO6pGAWTTVp1uXm_6_kgC-7ewVL8GSVQLblc9n9p2Q0snxUcA5WVVCUFfqx50GKulQXVsW7QRIBZZ0vWQDKEN3LJ-S_Eofpk2EvAxmrwVnRNEaiZs3QP78DebTMGDQKtrL/s1600/current+through+load+-.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiT69UAqzoxDoxO6pGAWTTVp1uXm_6_kgC-7ewVL8GSVQLblc9n9p2Q0snxUcA5WVVCUFfqx50GKulQXVsW7QRIBZZ0vWQDKEN3LJ-S_Eofpk2EvAxmrwVnRNEaiZs3QP78DebTMGDQKtrL/s640/current+through+load+-.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFdUAkwTBrWmmXI8zGfbIFZUTyst_zLwbDOf7kKfZIDT2Wj2tRm07RN9CaoQOlVcwcayg07_KsRAYYD_3SNsSR_AeXnsHPDFpUyXRw7GXu_nzGZzvEtsDxlLKC9pTWVcK4QH7T9r8ynqIe/s1600/Current+through+load+%252B.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFdUAkwTBrWmmXI8zGfbIFZUTyst_zLwbDOf7kKfZIDT2Wj2tRm07RN9CaoQOlVcwcayg07_KsRAYYD_3SNsSR_AeXnsHPDFpUyXRw7GXu_nzGZzvEtsDxlLKC9pTWVcK4QH7T9r8ynqIe/s640/Current+through+load+%252B.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;the codes for generating ramp wave and ISIS Proteus design can be found from&lt;a href=&quot;http://www.mediafire.com/?3s4euffv3bhge5n&quot;&gt; here&lt;/a&gt;. &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;that&#39;s all for this post friends next I&#39;ll post what difficulties i faced in implementing this ISIS design to reality.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;feel free to comment &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif; font-size: small;&quot;&gt;:)&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://embeddedpro.blogspot.com/feeds/6188137901136184988/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://embeddedpro.blogspot.com/2011/10/design-of-power-inverter-in-proteus.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5832476631874198582/posts/default/6188137901136184988'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5832476631874198582/posts/default/6188137901136184988'/><link rel='alternate' type='text/html' href='http://embeddedpro.blogspot.com/2011/10/design-of-power-inverter-in-proteus.html' title='Design of power inverter in Proteus'/><author><name>Keyur</name><uri>http://www.blogger.com/profile/16623791462595264067</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBSBWNbLGjrcm9W5HC1_1CdOg8bm7c3sEcsstwTk5Wubr0z17ToyWO2FlRlWhqazseIJZVLnVlx-YbWUk_ppZZVgs7iMyfmhrPWhX-zL4a9rGDZFn_JI2u9aehlHQjPbD3sZ86jOLQ1Lda/s72-c/bridge.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5832476631874198582.post-5528092142339321556</id><published>2011-10-14T09:43:00.001-07:00</published><updated>2011-10-14T09:52:11.956-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="bidirectional motor in single power"/><category scheme="http://www.blogger.com/atom/ns#" term="dpdt"/><category scheme="http://www.blogger.com/atom/ns#" term="robo race"/><category scheme="http://www.blogger.com/atom/ns#" term="robo wars"/><category scheme="http://www.blogger.com/atom/ns#" term="rocker switch"/><category scheme="http://www.blogger.com/atom/ns#" term="wired car"/><title type='text'>A homemade  wired toy car</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;When you want to build a wired your first robot with least circuitry you can go for this option.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;this can be your first mini project on school level or for first year college student.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;all you need to have is two motors,two DPDT switch with hold in center (that is some times referred as &quot;rocker switch&quot;) ,and a battery.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ1ER30cVkREuilFm7nljxMo-3MFiv4z5uUnSC0lNUWZCCgXSTN0tv_2T4CRHQm2oIehB-YOz3UB53R2THS2xTJt3VOsmI7B1B-KqPhL9D_mj6xKsFIYaPw9hvzlrjxS6z2ok1INDUUDDP/s1600/dpdt.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ1ER30cVkREuilFm7nljxMo-3MFiv4z5uUnSC0lNUWZCCgXSTN0tv_2T4CRHQm2oIehB-YOz3UB53R2THS2xTJt3VOsmI7B1B-KqPhL9D_mj6xKsFIYaPw9hvzlrjxS6z2ok1INDUUDDP/s1600/dpdt.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_XJn8Ta4XVIXAIJCSrk8_hB1czlS2HvofJYQNhl4aG6mRMvKVl9UqtY3SReSAlNKiiUpKlwdbCFOltJTcoIc2X-cxhYWjYydO3XUndPQcTMPcpVOgEf65cJdzmfa3FeUOGlvEJS3xOPph/s1600/dpdt+rocker+switch.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_XJn8Ta4XVIXAIJCSrk8_hB1czlS2HvofJYQNhl4aG6mRMvKVl9UqtY3SReSAlNKiiUpKlwdbCFOltJTcoIc2X-cxhYWjYydO3XUndPQcTMPcpVOgEf65cJdzmfa3FeUOGlvEJS3xOPph/s1600/dpdt+rocker+switch.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;here is the switch which is preferred.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;you can get it from here&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;iframe frameborder=&quot;0&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;http://rcm.amazon.com/e/cm?t=ksw07-20&amp;amp;o=1&amp;amp;p=8&amp;amp;l=as1&amp;amp;asins=B001PNO4OE&amp;amp;ref=tf_til&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;f=ifr&quot; style=&quot;height: 240px; width: 120px;&quot;&gt;&lt;/iframe&gt;
&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;you are now ready to make your own robot that can go in all four directions...&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;connect the motors as directed here in figure and you are ready to &quot;GO&quot; &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2DCwepNsZCBgrqCATkJNun4eY9KJ4f_Ug1e46CN34nZxAJU8caNbEWyDApxxOm1ptUhnrmUQbwK9kH3r58m8LfjRFevwub5GBj5Bln1QZEJ_58zgPFS4uGEYTzr1BQNslACQaV7HCqJcZ/s1600/m1.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;178&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2DCwepNsZCBgrqCATkJNun4eY9KJ4f_Ug1e46CN34nZxAJU8caNbEWyDApxxOm1ptUhnrmUQbwK9kH3r58m8LfjRFevwub5GBj5Bln1QZEJ_58zgPFS4uGEYTzr1BQNslACQaV7HCqJcZ/s320/m1.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMqbu_j_6ESVmb6l6gt6QUzTy37LMRUipeKTnGZfeSN4XiVYZ7ml-3ZuAUnahlHJcOIk4utVjBINHXsuhM3NGCmi6V1lxfjGLTqPE6rKyDGVfLrdnQ5rBFtE-tSNJKj7Pg_Bcx4HyBYGfo/s1600/m2.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;166&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMqbu_j_6ESVmb6l6gt6QUzTy37LMRUipeKTnGZfeSN4XiVYZ7ml-3ZuAUnahlHJcOIk4utVjBINHXsuhM3NGCmi6V1lxfjGLTqPE6rKyDGVfLrdnQ5rBFtE-tSNJKj7Pg_Bcx4HyBYGfo/s320/m2.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;hope it is easy to implement it you can easily participate to locally held Robowars and Roborace events in which robots with wired connections are allowed...&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;if any question then feel free to leave a comment...&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif; font-size: small;&quot;&gt;: ) &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://embeddedpro.blogspot.com/feeds/5528092142339321556/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://embeddedpro.blogspot.com/2011/10/homemade-wired-toy-car.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5832476631874198582/posts/default/5528092142339321556'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5832476631874198582/posts/default/5528092142339321556'/><link rel='alternate' type='text/html' href='http://embeddedpro.blogspot.com/2011/10/homemade-wired-toy-car.html' title='A homemade  wired toy car'/><author><name>Keyur</name><uri>http://www.blogger.com/profile/16623791462595264067</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ1ER30cVkREuilFm7nljxMo-3MFiv4z5uUnSC0lNUWZCCgXSTN0tv_2T4CRHQm2oIehB-YOz3UB53R2THS2xTJt3VOsmI7B1B-KqPhL9D_mj6xKsFIYaPw9hvzlrjxS6z2ok1INDUUDDP/s72-c/dpdt.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5832476631874198582.post-5815297768007605554</id><published>2011-10-14T09:42:00.001-07:00</published><updated>2011-10-16T01:44:19.792-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="atmega 8535"/><category scheme="http://www.blogger.com/atom/ns#" term="autonomous"/><category scheme="http://www.blogger.com/atom/ns#" term="autonomous robots"/><category scheme="http://www.blogger.com/atom/ns#" term="avr 8535"/><category scheme="http://www.blogger.com/atom/ns#" term="line follower"/><category scheme="http://www.blogger.com/atom/ns#" term="line tracker"/><category scheme="http://www.blogger.com/atom/ns#" term="robotics."/><title type='text'>Programming a line follower</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;style&gt;
&lt;!--
 /* Font Definitions */
 @font-face
 {font-family:Calibri;
 panose-1:2 15 5 2 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
 {margin-top:0in;
 margin-right:0in;
 margin-bottom:10.0pt;
 margin-left:0in;
 line-height:115%;
 font-size:11.0pt;
 font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;}
.MsoChpDefault
 {font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;}
.MsoPapDefault
 {margin-bottom:10.0pt;
 line-height:115%;}
@page WordSection1
 {size:8.5in 11.0in;
 margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
 {page:WordSection1;}
--&gt;
&lt;/style&gt;





&lt;br /&gt;
&lt;div class=&quot;WordSection1&quot;&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Hello friends I hope you all have read my &lt;a href=&quot;http://keyuracharya.blogspot.com/2011/09/my-line-follower.html&quot;&gt;post about the sensors &lt;/a&gt;used in line follower..&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
So now it is the time to go for the logical side…..&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Let us start with how actually a line is followed &lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
According to the position of sensors we have to make a look-up table for all the possibilities….&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Let us start…..&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
If i am using 3 sensors I can do…&lt;/div&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoTableGrid&quot; style=&quot;border-collapse: collapse; border: medium none;&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: 1pt solid windowtext; padding: 0in 5.4pt; width: 95.75pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
LEFT SENSOR&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border: 1pt solid windowtext; padding: 0in 5.4pt; width: 95.75pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
CENTER SENSOR&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border: 1pt solid windowtext; padding: 0in 5.4pt; width: 95.75pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
RIGHT SENSOR&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border: 1pt solid windowtext; padding: 0in 5.4pt; width: 95.75pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
LEFT MOTOR&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border: 1pt solid windowtext; padding: 0in 5.4pt; width: 95.8pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
RIGHT MOTOR&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border: 1pt solid windowtext; padding: 0in 5.4pt; width: 95.8pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
comment&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: 1pt solid windowtext; padding: 0in 5.4pt; width: 95.75pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
0&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 95.75pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
0&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 95.75pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
0&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 95.75pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
FORWARD&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 95.8pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
FORWARD&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 95.8pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
To avoid the cross…&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: 1pt solid windowtext; padding: 0in 5.4pt; width: 95.75pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
0&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 95.75pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
0&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 95.75pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
1&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 95.75pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
STOP&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 95.8pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
FORWARD&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 95.8pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: 1pt solid windowtext; padding: 0in 5.4pt; width: 95.75pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
0&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 95.75pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
1&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 95.75pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
0&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 95.75pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
FORWARD&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 95.8pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
FORWARD&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 95.8pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
Worst case!!!&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: 1pt solid windowtext; padding: 0in 5.4pt; width: 95.75pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
0&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 95.75pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
1&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 95.75pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
1&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 95.75pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
STOP&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 95.8pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
FORWARD&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 95.8pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: 1pt solid windowtext; padding: 0in 5.4pt; width: 95.75pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
1&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 95.75pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
0&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 95.75pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
0&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 95.75pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
FORWARD&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 95.8pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
STOP&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 95.8pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: 1pt solid windowtext; padding: 0in 5.4pt; width: 95.75pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
1&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 95.75pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
0&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 95.75pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
1&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 95.75pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
FORWARD&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 95.8pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
FORWARD&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 95.8pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: 1pt solid windowtext; padding: 0in 5.4pt; width: 95.75pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
1&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 95.75pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
1&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 95.75pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
0&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 95.75pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
FORWARD&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 95.8pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
STOP&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 95.8pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: 1pt solid windowtext; padding: 0in 5.4pt; width: 95.75pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
1&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 95.75pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
1&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 95.75pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
1&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 95.75pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
REVERSE&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 95.8pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
REVERSE&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 95.8pt;&quot; valign=&quot;top&quot; width=&quot;128&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
Line is lost&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;
Return to line&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
*note that when sensor is on black surface we get 0&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
*and assume that we have to follow a black track in white
surface…&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
After understanding the logic it is always easy to convert
it to programming…&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
Here the programming I have given
is for AVR 8535.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% lime;&quot;&gt;//motors
are connected to PORTB&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot;&gt;//sensors
are connected to PORTA&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% lime;&quot;&gt;//as
the motor is too much fast we had to turn off motor for certain time..&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot;&gt;//program
of line follower with three sensors&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% lime;&quot;&gt;//6/8/11&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot;&gt;#include&amp;lt;avr/io.h&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% lime;&quot;&gt;#include&amp;lt;delay.h&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot;&gt;void
main(void)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% lime;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot;&gt;&amp;nbsp;DDRD=0xF0;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
//Setting the data direction of Port-D where motors are connected&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% lime;&quot;&gt;&amp;nbsp;PORTA=0XFF;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot;&gt;&amp;nbsp;DDRA=0X00;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% lime;&quot;&gt;&amp;nbsp;DDRC=0XFF;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot;&gt;&amp;nbsp;while(1)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% lime;&quot;&gt;&amp;nbsp;{&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while((PINA
&amp;amp; 0X07)==0X03)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% lime;&quot;&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; {&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PORTD=0X20;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% lime;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delayms(75);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PORTD=0x00;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delayms(200);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% lime;&quot;&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; }&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while((PINA
&amp;amp; 0x07)==0x00)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% lime;&quot;&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; {&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PORTD=0XA0;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% lime;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delayms(50);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PORTD=0x00;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% lime;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delayms(200);&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot;&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; }&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% lime;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while((PINA
&amp;amp; 0x07)==0x01)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot;&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; {&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% lime;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PORTD=0x20;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delayms(75);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% lime;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PORTD=0x00;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delayms(200);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% lime;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while((PINA
&amp;amp; 0x07)==0x02)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% lime;&quot;&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; {&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PORTD=0x50;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% lime;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delayms(75);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PORTD=0x00;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% lime;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delayms(200);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot;&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; }&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% lime;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while((PINA
&amp;amp; 0x07)==0x04)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot;&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; {&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% lime;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PORTD=0x80;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delayms(75);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% lime;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PORTD=0x00;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delayms(200);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% lime;&quot;&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; }&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while((PINA
&amp;amp; 0x07)==0x05)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% lime;&quot;&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; {&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% lime;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PORTD=0xA0;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% lime;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delayms(75);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PORTD=0x00;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% lime;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delayms(200);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot;&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; }&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% lime;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while((PINA
&amp;amp; 0x07)==0x06)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot;&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; {&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% lime;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PORTD=0x80;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delayms(75);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% lime;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PORTD=0x00;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delayms(200);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% lime;&quot;&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; }&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot;&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; while((PINA
&amp;amp; 0x07)==0x07)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% lime;&quot;&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; {&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PORTD=0x50;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% lime;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delayms(75);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PORTD=0x00;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% lime;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delayms(200);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot;&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; }&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% lime;&quot;&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; }&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
-----------------------------------------------------------&lt;br /&gt;
Now let us see a video in action...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/MxTD79XpN1Q?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
you can see all the logic being applied in video.... &lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
hope you loved it...&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
place any comment if you want to ask.....&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
We had a fun making it....&lt;br /&gt;
&lt;br /&gt;
-keyur&lt;br /&gt;
:)&lt;br /&gt;
&lt;iframe border=&quot;0&quot; frameborder=&quot;0&quot; height=&quot;600&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;http://rcm.amazon.com/e/cm?t=ksw07-20&amp;amp;o=1&amp;amp;p=11&amp;amp;l=ur1&amp;amp;category=textbooks&amp;amp;banner=17P1AE8RQ1T7ZFC62V82&amp;amp;f=ifr&quot; style=&quot;border: medium none;&quot; width=&quot;120&quot;&gt;&lt;/iframe&gt;

&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://embeddedpro.blogspot.com/feeds/5815297768007605554/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://embeddedpro.blogspot.com/2011/10/programming-line-follower.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5832476631874198582/posts/default/5815297768007605554'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5832476631874198582/posts/default/5815297768007605554'/><link rel='alternate' type='text/html' href='http://embeddedpro.blogspot.com/2011/10/programming-line-follower.html' title='Programming a line follower'/><author><name>Keyur</name><uri>http://www.blogger.com/profile/16623791462595264067</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5832476631874198582.post-4078856001807216703</id><published>2011-10-14T09:41:00.003-07:00</published><updated>2011-10-14T09:42:05.182-07:00</updated><title type='text'>Collision detector for robots</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h3 class=&quot;post-title entry-title&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;




&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif; font-size: small;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;post-header&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif; font-size: small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div align=&quot;left&quot; class=&quot;text&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;How to detect if your robot has collided with a wall or object?&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot; class=&quot;text&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;           &lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif; font-size: small;&quot;&gt;           &lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;left&quot; class=&quot;text&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;
           A Micro switch is one of the easiest ways 
of letting your robot            know that it has collided with something. The 
simplest way to do this is to            fix a micro switch to the front
 of your robot in a way so that when it            collides the switch 
will get pushed in, making an electrical            connection. Normally
 the switch will be held open by an internal            spring.&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot; class=&quot;text&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif; font-size: small;&quot;&gt;           &lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;left&quot; class=&quot;text&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;
                      Micro switches are easy to connect to micro 
controllers because they            are either off or on, making them 
digital. All micro controllers are            digital, so this is a good option.&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot; class=&quot;text&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot; class=&quot;text&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif; font-size: small;&quot;&gt;           &lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;left&quot; class=&quot;text&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=466944340230542686&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;The
            following diagram shows a typical circuit for a micro switch
 bump            sensor. The resistor is important because it holds the 
signal line at            ground while the switch is off. Without it the
 signal line is            effectively &#39;floating&#39; because there is 
nothing connected to it, and            may cause unreliable readings as
 the processor tries to decide if the            line is on or off.&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot; class=&quot;text&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiulUiB6xiwg6w020oAhu39_bZYEsbsmp1bbBgahbYxxNVMOMy26meMrqRxGHSNvK-u8mA6FnWS-HVqSdV-vkowTP6xzXMEMyq4aAo_qriPcNC8t04BzMYMnuIYRAm0LM_jt_l3P0xGuWU/s1600-h/senser1.gif&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5212425457292397058&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiulUiB6xiwg6w020oAhu39_bZYEsbsmp1bbBgahbYxxNVMOMy26meMrqRxGHSNvK-u8mA6FnWS-HVqSdV-vkowTP6xzXMEMyq4aAo_qriPcNC8t04BzMYMnuIYRAm0LM_jt_l3P0xGuWU/s400/senser1.gif&quot; /&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&amp;nbsp;you can get a micro switch easily from&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;a href=&quot;http://www.amazon.com/gp/product/B000UEHFS6/ref=as_li_tf_tl?ie=UTF8&amp;amp;tag=ksw07-20&amp;amp;linkCode=as2&amp;amp;camp=217145&amp;amp;creative=399373&amp;amp;creativeASIN=B000UEHFS6&quot;&gt;RACO 6347 SWITCH SNAP-ACTION SPDT&lt;/a&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.amazon.com/gp/product/B000UEHFS6/ref=as_li_tf_il?ie=UTF8&amp;amp;tag=ksw07-20&amp;amp;linkCode=as2&amp;amp;camp=217145&amp;amp;creative=399373&amp;amp;creativeASIN=B000UEHFS6&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://ws.assoc-amazon.com/widgets/q?_encoding=UTF8&amp;amp;Format=_SL110_&amp;amp;ASIN=B000UEHFS6&amp;amp;MarketPlace=US&amp;amp;ID=AsinImage&amp;amp;WS=1&amp;amp;tag=ksw07-20&amp;amp;ServiceVersion=20070822&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=ksw07-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=B000UEHFS6&amp;amp;camp=217145&amp;amp;creative=399373&quot; style=&quot;border: none !important; margin: 0px !important;&quot; width=&quot;1&quot; /&gt;

&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;or if you don&#39;t want to get collided you can certainly use an optical sensor as mentioned in my &lt;/span&gt;&lt;a href=&quot;http://keyuracharya.blogspot.com/2011/09/my-line-follower.html&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;earlier post&lt;/a&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;. &lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://embeddedpro.blogspot.com/feeds/4078856001807216703/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://embeddedpro.blogspot.com/2011/10/collision-detector-for-robots.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5832476631874198582/posts/default/4078856001807216703'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5832476631874198582/posts/default/4078856001807216703'/><link rel='alternate' type='text/html' href='http://embeddedpro.blogspot.com/2011/10/collision-detector-for-robots.html' title='Collision detector for robots'/><author><name>Keyur</name><uri>http://www.blogger.com/profile/16623791462595264067</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiulUiB6xiwg6w020oAhu39_bZYEsbsmp1bbBgahbYxxNVMOMy26meMrqRxGHSNvK-u8mA6FnWS-HVqSdV-vkowTP6xzXMEMyq4aAo_qriPcNC8t04BzMYMnuIYRAm0LM_jt_l3P0xGuWU/s72-c/senser1.gif" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5832476631874198582.post-8909955939539416316</id><published>2011-10-14T09:41:00.001-07:00</published><updated>2011-10-14T09:41:22.603-07:00</updated><title type='text'>Sensors for line follower</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;title&gt;&lt;/title&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
How to make a line follower?&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
What a big question
coming in the mind of almost all UG students....&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
I have a solution
for that …..&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
what basically a
line follower has to do is to detect the line with the sensors 
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
The sensors are
mainly the optical transmitter and receivers.&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
They throw light at
the surface and receive to detect if the light is fully reflected or
absorbed by the surface&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
absorption means
the surface below that sensor is black and reflection means that the
surface below that surface is white.&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
Now let us go to
the sensor side...&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
I have experimenter
many sensors related to optical transmission and reception I would
like to mention them in brief here&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
1)first I tried
directly with the IR LED and Photo diode but the configuration didn&#39;t
work perfectly according to my needs.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1IZw6d1NTibNorBp_EibP4AV9iyPx9xbvIQ6OvHyBpLIB__GLTts5QKOvDNUJsnniTMrIS4sYwi8hjlbwm2K8coKhW23ugtmDN0CpNZ-dlHx5HNbjipBTSxsuwe-q2RXhxrPN2MpNHB_4/s1600/opto+sensor.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1IZw6d1NTibNorBp_EibP4AV9iyPx9xbvIQ6OvHyBpLIB__GLTts5QKOvDNUJsnniTMrIS4sYwi8hjlbwm2K8coKhW23ugtmDN0CpNZ-dlHx5HNbjipBTSxsuwe-q2RXhxrPN2MpNHB_4/s320/opto+sensor.jpg&quot; width=&quot;243&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
So I have to go for
the other configuration&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
2)second one is
just the enhanced version of first one I included an indicator LED to
show whether  the sensor is working or not and used a simple
transistor as a switch configuration …&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibKcEcXagQechxz2lYgrADRWhhLXpWfdfSXTRoqoqq9QjGast_pSmINaiv8GVehBxj542bOOY3nmCk7NkOe0x7BoIbFQBE4hIEptv6x0xOKmrW_KadHtia5LMEwag7-SlKC6hivYMtXsnq/s1600/Sensor.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;271&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibKcEcXagQechxz2lYgrADRWhhLXpWfdfSXTRoqoqq9QjGast_pSmINaiv8GVehBxj542bOOY3nmCk7NkOe0x7BoIbFQBE4hIEptv6x0xOKmrW_KadHtia5LMEwag7-SlKC6hivYMtXsnq/s320/Sensor.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
Here you can put a
potentiometer  in the base so that you can vary the sensitivity of
the sensor ,  but we got perfect result with the help of  steady
values also so you can also try “Trial and error method”.&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
Many people
recommend the sensor based on Photo Resistor(LDR)  but I would say
“don&#39;t go for it”..&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
and now one video
speaks more than one post.&amp;nbsp;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/ULem9vPO-6Q?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;font-family: Times New Roman,serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
Now you have all
you need to start programming a micro controller to make decision and
a good algorithm to keep following the line.....&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
you can go for &lt;a href=&quot;http://keyuracharya.blogspot.com/2011/09/my-line-follower-programming.html&quot;&gt;programming and logic of line follower&lt;/a&gt; in my another post&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
enjoy
“sensing”  :)&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://embeddedpro.blogspot.com/feeds/8909955939539416316/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://embeddedpro.blogspot.com/2011/10/sensors-for-line-follower.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5832476631874198582/posts/default/8909955939539416316'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5832476631874198582/posts/default/8909955939539416316'/><link rel='alternate' type='text/html' href='http://embeddedpro.blogspot.com/2011/10/sensors-for-line-follower.html' title='Sensors for line follower'/><author><name>Keyur</name><uri>http://www.blogger.com/profile/16623791462595264067</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1IZw6d1NTibNorBp_EibP4AV9iyPx9xbvIQ6OvHyBpLIB__GLTts5QKOvDNUJsnniTMrIS4sYwi8hjlbwm2K8coKhW23ugtmDN0CpNZ-dlHx5HNbjipBTSxsuwe-q2RXhxrPN2MpNHB_4/s72-c/opto+sensor.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5832476631874198582.post-1933219995153914159</id><published>2011-10-14T09:40:00.001-07:00</published><updated>2011-10-14T09:40:29.907-07:00</updated><title type='text'>Header file making</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Hello folks many friends asked me &quot;wouldn&#39;t it be better idea if we have our headerfile to include our own functions and not even copy paste them in coding?&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;The solution is here, to create your own header file....&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt; first of all make any C program which you want to include in header file...&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;like the one given &lt;a href=&quot;http://www.mediafire.com/?x26btptm0bxxdox&quot;&gt;here&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;this is a file for including a password in your micro controller... &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-family: Verdana,sans-serif; text-align: center;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggLsaadaJfYf1Q9h7haKIJgWU-Hn4pAl1UwTgEo7ZxOW-kOz1tDsU3aLmDOpLCYcMz4gonz19Q5eTTrYGGMB3GuK_ozAoJc33UFacm8DKYbsxKnrp2745pQwQEuU9XWaUBhNfHC9mHHYPo/s1600/avr.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;260&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggLsaadaJfYf1Q9h7haKIJgWU-Hn4pAl1UwTgEo7ZxOW-kOz1tDsU3aLmDOpLCYcMz4gonz19Q5eTTrYGGMB3GuK_ozAoJc33UFacm8DKYbsxKnrp2745pQwQEuU9XWaUBhNfHC9mHHYPo/s320/avr.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;basically this program is for the AVR8535 development board by Technophilia. and all hardware connections are assumed to be of that only, but it doesn&#39;t matter here which microcontroller I use because you have to make your own header file.........&lt;br /&gt;so take this just as a demo..&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;After debugging every syntax and (a lot of)logical errors when you think that the program is working fine&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;you are ready to make your own header file...&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;step 1)Copy and paste your all codes into a notepad...&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;step2) edit your function&#39;s name&lt;/span&gt;&lt;/div&gt;
&lt;ul style=&quot;font-family: Verdana,sans-serif; text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt; we must have to declare the function here which we want to call...&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;font-family: Verdana,sans-serif; text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;like in my demo i changed the name of &quot;main&quot; program to &quot;pass&quot;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;font-family: Verdana,sans-serif; text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;here you can declare it as any function which can accept values or&amp;nbsp; return&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; programming remains just same as C.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;step3)at the top of your header file you have to define the name of your header file&lt;/span&gt;&lt;/div&gt;
&lt;ul style=&quot;font-family: Verdana,sans-serif; text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;#ifndef _(your header file name)_H&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //and do write name without braces&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;#define _(your header file name)_H&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //and do write name without braces&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;step 4)at the end of your header file write&lt;/span&gt;&lt;/div&gt;
&lt;ul style=&quot;font-family: Verdana,sans-serif; text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;#endif&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;step5)save the document as &quot;(your header file name).h&quot; as we mentioned earlier...&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;You are done now&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;a href=&quot;http://www.mediafire.com/?733a43d2fxtfx5n&quot;&gt;here&lt;/a&gt; is how my header file looks like you can see no fuzzy thing is done over here &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;you can include your program any time you want just dont forget to put the header file in your work directory......&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;a href=&quot;http://www.blogger.com/goog_264750686&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;a href=&quot;http://www.mediafire.com/?9xyu6vlao5ef572&quot;&gt;here&lt;/a&gt; is the example of how we can minimize the coding time including our own &quot;home made header file&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;you can see the size of both the main files and feel the HUGE difference because of including a header file,this is good because we have to deal with less on-chip memory.... &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;so now guys you know that making your own header file&amp;nbsp; is not Rocket Science....&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;see ya :)&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;iframe border=&quot;0&quot; frameborder=&quot;0&quot; height=&quot;90&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;http://rcm.amazon.com/e/cm?t=ksw07-20&amp;amp;o=1&amp;amp;p=48&amp;amp;l=ur1&amp;amp;category=amazonhomepage&amp;amp;f=ifr&quot; style=&quot;border: medium none;&quot; width=&quot;728&quot;&gt;&lt;/iframe&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://embeddedpro.blogspot.com/feeds/1933219995153914159/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://embeddedpro.blogspot.com/2011/10/header-file-making.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5832476631874198582/posts/default/1933219995153914159'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5832476631874198582/posts/default/1933219995153914159'/><link rel='alternate' type='text/html' href='http://embeddedpro.blogspot.com/2011/10/header-file-making.html' title='Header file making'/><author><name>Keyur</name><uri>http://www.blogger.com/profile/16623791462595264067</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggLsaadaJfYf1Q9h7haKIJgWU-Hn4pAl1UwTgEo7ZxOW-kOz1tDsU3aLmDOpLCYcMz4gonz19Q5eTTrYGGMB3GuK_ozAoJc33UFacm8DKYbsxKnrp2745pQwQEuU9XWaUBhNfHC9mHHYPo/s72-c/avr.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5832476631874198582.post-315658444466248812</id><published>2011-10-14T09:39:00.000-07:00</published><updated>2011-10-14T09:39:36.460-07:00</updated><title type='text'>Hyper terminal in windows 7....</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div style=&quot;margin: 0px; padding: 10px 22px 0px; text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;I have talked to many friends and one of the big complaints about Windows 7 is the lack of HyperTerminal. &amp;nbsp;So here is how to get HyperTerminal on to Windows 7 (32 or 64-bit).&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0px; padding: 10px 22px 0px; text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;From a Windows XP box copy the following 3 files and paste them in&amp;nbsp;equivalent&amp;nbsp;folders of windows 7 :&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0px; padding: 10px 22px 0px; text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;C:\Program Files\Windows NT\hypertrm.exe&lt;br /&gt;
C:\WINODWS\system32\hypertrm.dll&lt;br /&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0px; padding: 10px 22px 0px; text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Now just run hypertrm.exe and HyperTerminal is on Windows 7.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0px; padding: 10px 22px 0px; text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;If you want to have HyperTerminal on your Start Menu just create a shortcut to hypertrm.exe and put it inC:\ProgramData\Microsoft\Windows\Start Menu\Programs and when you go to All Programs under the Start Menu HyperTerminal will be there.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;if you don&#39;t have access to any windows XP pc just download the zip file given &lt;a href=&quot;http://www.mediafire.com/?9rj5w2bu68eunl5&quot;&gt;here&lt;/a&gt; &lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://embeddedpro.blogspot.com/feeds/315658444466248812/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://embeddedpro.blogspot.com/2011/10/hyper-terminal-in-windows-7.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5832476631874198582/posts/default/315658444466248812'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5832476631874198582/posts/default/315658444466248812'/><link rel='alternate' type='text/html' href='http://embeddedpro.blogspot.com/2011/10/hyper-terminal-in-windows-7.html' title='Hyper terminal in windows 7....'/><author><name>Keyur</name><uri>http://www.blogger.com/profile/16623791462595264067</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>