<?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-1617923873776016015</id><updated>2024-10-06T21:31:31.748-07:00</updated><category term="program for Dual DAC"/><category term="8051 Microcontroller Based DC Motor Control"/><category term="AVR Serial Port Programmer"/><category term="Automatic Room Light Controller"/><category term="CELLPHONE OPERATED LANDROVER"/><category term="Demonstrate how to multiplex 64 LED&#39;s"/><category term="Digital clock project using PIC16C54A microcontroller"/><category term="First PICMicro Project"/><category term="Frequency Counter Circuit"/><category term="Home Security System Using AT89C52"/><category term="How To Program PIC Microcontroller Interrupt in C"/><category term="How To Program PIC(18F) Microcontroller In C Using MPLAB IDE"/><category term="How to do IR communications."/><category term="How to do RS232"/><category term="How to read a PC Joystick."/><category term="How to use a HEX keypad."/><category term="How to use an LCD text module."/><category term="MSP-EXP430FG4618 Development Tool and the eZ430 kits"/><category term="MSP430FG4618 device implement a Buzzer tone generator"/><category term="MSP430FG4618 device implement a Real Time Clock"/><category term="MSP430FG4618 device implement a voltage ramp generator"/><category term="MSP430FG4618 device present a message on the LCD Basic"/><category term="Microchip PIC Serial Port Programmer"/><category term="Microcontroller Based Access Control system"/><category term="Microcontroller(8051) Lab"/><category term="PIC 16f84a LED on/off with delay project"/><category term="PIC Microcontroller Programming"/><category term="PIC12F683 microcontroller based metal detector"/><category term="PIC16C54 dual dice electronic project circuit"/><category term="PIC16F84A digital thermometer microcontroller project"/><category term="PIC16F886 horn driver"/><category term="PIC16f84a Push Button for Blinking Led project"/><category term="PWM motor contoller with MSP430"/><category term="Program to add two BCD numbers in 8051"/><category term="Program to convert ASCII to hex in 8051"/><category term="Program to count from 0-9 in 8051"/><category term="Program to find the square of an 8 bit number in 8051"/><category term="Program to generate 50msec delay in 8051"/><category term="Program to implement BCD counter to count from 0-99 in 8051"/><category term="RAMP wave in 8051"/><category term="RFID Based Door Access Control System using Microcontroller"/><category term="Remotely Programmable RTC-Interfaced Microcontroller for Multiple Device Control"/><category term="The Best PIC Microcontroller Projects on Web (Part 1)"/><category term="USB 8051 (89 series)  AVR Microcontroller Programmer"/><category term="Write a C program to display the code of the key pressed in 8051"/><category term="eZ430-F2013 Development Tool use SD16_A ADC"/><category term="eZ430-RF2500 Development Tool use ADC10 to perform a single temperature sample on channel"/><category term="microcontroller using IAR Embedded Workbench"/><category term="program for Elevator Interface in 8051"/><category term="program for Seven segment display in 8051"/><category term="program for Stepper motor interface in 8051"/><category term="square wave in 8051"/><category term="triangle wave in 8051"/><title type='text'>Microcontrollers</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://microcontrollersdesign.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1617923873776016015/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://microcontrollersdesign.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/1617923873776016015/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>T.sreedhar Reddy</name><uri>http://www.blogger.com/profile/11833688005891158344</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>52</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1617923873776016015.post-982929013979304396</id><published>2011-07-15T10:11:00.003-07:00</published><updated>2011-07-15T10:11:51.416-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Program to convert ASCII to hex in 8051"/><title type='text'>Program to convert ASCII to hex in 8051</title><content type='html'>&lt;h3 class=&quot;post-title entry-title&quot; style=&quot;color: black; font-family: Arial, serif; font-size: 23px; font-weight: normal; line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0.25em; padding-bottom: 4px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: tahoma, verdana, arial, helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;ASCII codes 30 to 39 represent 0 to 9 in binary and 41 to 46 represent A to F. Therefore&lt;/span&gt;&lt;/h3&gt;&lt;div class=&quot;post-body entry-content&quot; style=&quot;color: #333333; font-family: Arial, serif; font-size: 14px; line-height: 1.6em; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: x-small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: tahoma, verdana, arial, helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;div class=&quot;para&quot; id=&quot;id4717797&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;if the ASCII code is between 30-39h then 30h is subtracted from the code. If the number&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365047761&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;lies between A to F then 37h is subtracted from the code to get its binary equivalent&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365075707&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;mov dptr, #9000h ;load dptr with address 9000h&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365995677&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;movx a,@dptr ; move data from external memory location to a&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7598149&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;clr c ;clear carry bit&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365069142&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;mov r1,a ;move data from a to r1&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id4629377&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;subb a,#40h ;subtract 40h from a&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id5615663&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;jc l2 ;jump to location l2, if carry&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365110791&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;mov a,r1 ;move data from r1 to a&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365106940&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;subb a,#37h ;subtract with borrow, 37h from a&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id4703892&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;sjmp here ;jump to location here&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7642267&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;l2:mov a,r1 ;move data from r1 to a&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7715974&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;clr c ;clear carry bit&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170370343750&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;subb a,#30h ;subtract with borrow, 30h from a&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id6333663&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;here:inc dptr ;increment dptr&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365073619&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;movx @dptr,a ;move data from a to external memory location&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id6468606&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;rep:sjmp rep&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id3361194&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;end&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://microcontrollersdesign.blogspot.com/feeds/982929013979304396/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://microcontrollersdesign.blogspot.com/2011/07/program-to-convert-ascii-to-hex-in-8051.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1617923873776016015/posts/default/982929013979304396'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1617923873776016015/posts/default/982929013979304396'/><link rel='alternate' type='text/html' href='http://microcontrollersdesign.blogspot.com/2011/07/program-to-convert-ascii-to-hex-in-8051.html' title='Program to convert ASCII to hex in 8051'/><author><name>T.sreedhar Reddy</name><uri>http://www.blogger.com/profile/11833688005891158344</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-1617923873776016015.post-937476655666389613</id><published>2011-07-15T10:11:00.001-07:00</published><updated>2011-07-15T10:11:27.673-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Program to add two BCD numbers in 8051"/><title type='text'>Program to add two BCD numbers in 8051</title><content type='html'>&lt;h3 class=&quot;post-title entry-title&quot; style=&quot;color: black; font-family: Arial, serif; font-size: 23px; font-weight: normal; line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0.25em; padding-bottom: 4px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: tahoma, verdana, arial, helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;mov dptr,#9000h ;move dptr with 9000h&lt;/span&gt;&lt;/h3&gt;&lt;div class=&quot;post-body entry-content&quot; style=&quot;color: #333333; font-family: Arial, serif; font-size: 14px; line-height: 1.6em; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: x-small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: tahoma, verdana, arial, helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365149907&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;movx a,@dptr ; move data from external memory location to a&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id8837460&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;mov b,a ;move data from a to b&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id8854552&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;inc dptr ;increment dptr&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7952146&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;movx a,@dptr ; move data from external memory location to a&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170370298783&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;add a,b ;add a and b&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id8556151&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;da a ;decimal adjust accumulator after addition&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365062021&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;jc down ;if carry, jump to label down&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id8267487&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;inc dptr ;increment dptr&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170370384806&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;movx @dptr,a ;move data from a to external memory location&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7598333&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;sjmp last ;jump to label last&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170370299563&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;down:mov r2,a ;move data from a to r2&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365079979&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;mov a,#01h ;move data 01h to a&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170364946382&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;movx @dptr,a ;move data from a to external memory location&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170370217946&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;inc dptr ;increment dptr&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id3700334&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;mov a,r2 ;move data from r2 to a&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170369561224&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;movx @dptr,a ;move data from external memory location to a&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365979131&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;last:sjmp last&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170367345091&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;end&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://microcontrollersdesign.blogspot.com/feeds/937476655666389613/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://microcontrollersdesign.blogspot.com/2011/07/program-to-add-two-bcd-numbers-in-8051.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1617923873776016015/posts/default/937476655666389613'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1617923873776016015/posts/default/937476655666389613'/><link rel='alternate' type='text/html' href='http://microcontrollersdesign.blogspot.com/2011/07/program-to-add-two-bcd-numbers-in-8051.html' title='Program to add two BCD numbers in 8051'/><author><name>T.sreedhar Reddy</name><uri>http://www.blogger.com/profile/11833688005891158344</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-1617923873776016015.post-8689603152026211503</id><published>2011-07-15T10:10:00.005-07:00</published><updated>2011-07-15T10:10:57.993-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Program to find the square of an 8 bit number in 8051"/><title type='text'>Program to find the square of an 8 bit number in 8051</title><content type='html'>&lt;h3 class=&quot;post-title entry-title&quot; style=&quot;color: black; font-family: Arial, serif; font-size: 23px; font-weight: normal; line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0.25em; padding-bottom: 4px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: tahoma, verdana, arial, helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;mov dptr,#9000h ;load dptr with 9000h&lt;/span&gt;&lt;/h3&gt;&lt;div class=&quot;post-body entry-content&quot; style=&quot;color: #333333; font-family: Arial, serif; font-size: 14px; line-height: 1.6em; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: x-small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: tahoma, verdana, arial, helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;div class=&quot;para&quot; id=&quot;id7331772&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;movx a,@dptr ;move data from external memory location to a&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id3367994&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;mov b,a ;move data from a to b&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365059295&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;mul ab ;multiply and b&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170366008986&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;inc dptr ;increment dptr&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365110211&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;mov r0,a ;move data from a to r0&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170370343658&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;mov a,b ;move data from b to a&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7861772&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;movx @dptr,a ;move data from a to external memory location&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365116533&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;inc dptr ;increment dptr&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7645823&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;mov a,r0 ;move data from r0 to a&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id8756239&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;movx @dptr,a ;move data from a to external memory location&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365909749&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;here:sjmp here&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7944044&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;end&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://microcontrollersdesign.blogspot.com/feeds/8689603152026211503/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://microcontrollersdesign.blogspot.com/2011/07/program-to-find-square-of-8-bit-number.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1617923873776016015/posts/default/8689603152026211503'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1617923873776016015/posts/default/8689603152026211503'/><link rel='alternate' type='text/html' href='http://microcontrollersdesign.blogspot.com/2011/07/program-to-find-square-of-8-bit-number.html' title='Program to find the square of an 8 bit number in 8051'/><author><name>T.sreedhar Reddy</name><uri>http://www.blogger.com/profile/11833688005891158344</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-1617923873776016015.post-4817352988112015938</id><published>2011-07-15T10:10:00.003-07:00</published><updated>2011-07-15T10:10:30.018-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Program to count from 0-9 in 8051"/><title type='text'>Program to count from 0-9 in 8051</title><content type='html'>&lt;h3 class=&quot;post-title entry-title&quot; style=&quot;color: black; font-family: Arial, serif; font-size: 23px; font-weight: normal; line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0.25em; padding-bottom: 4px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: tahoma, verdana, arial, helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;here:mov a,#0h ;move 0 to a&lt;/span&gt;&lt;/h3&gt;&lt;div class=&quot;post-body entry-content&quot; style=&quot;color: #333333; font-family: Arial, serif; font-size: 14px; line-height: 1.6em; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: x-small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: tahoma, verdana, arial, helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;div class=&quot;para&quot; id=&quot;id7290143&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;up:mov p0,a ;move data from a to port0&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id3855573&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;acall delay ;call delay routine&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365093206&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;add a,#01 ;increment a&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7335540&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;cjne a,#010,up ;compare a with 10, if not equal, jump to location up&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id6533472&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;sjmp here ;jump to location here&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170364967534&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;;delay routine&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365974732&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;delay:mov r1,#0ffh ;move 0ffh to r1&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170364989374&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;l3:mov r2,#0ffh ;move 0ffh to r2&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365114213&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;l2:mov r3,#0ffh ;move 0ffh to r3&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7485099&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;l1:djnz r1,l1 ;decrement r1, repeat till r1=0&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365931389&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;djnz r3,l2 ;decrement r3,repeat l2 till r3=0&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id8471010&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;djnz r2,l3 ;decrement r2, repeat l3 till r2=0&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170370426822&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;ret ;return&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170366009896&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;end&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://microcontrollersdesign.blogspot.com/feeds/4817352988112015938/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://microcontrollersdesign.blogspot.com/2011/07/program-to-count-from-0-9-in-8051.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1617923873776016015/posts/default/4817352988112015938'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1617923873776016015/posts/default/4817352988112015938'/><link rel='alternate' type='text/html' href='http://microcontrollersdesign.blogspot.com/2011/07/program-to-count-from-0-9-in-8051.html' title='Program to count from 0-9 in 8051'/><author><name>T.sreedhar Reddy</name><uri>http://www.blogger.com/profile/11833688005891158344</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-1617923873776016015.post-8855352941444512443</id><published>2011-07-15T10:10:00.001-07:00</published><updated>2011-07-15T10:10:04.091-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Program to implement BCD counter to count from 0-99 in 8051"/><title type='text'>Program to implement BCD counter to count from 0-99 in 8051</title><content type='html'>&lt;h3 class=&quot;post-title entry-title&quot; style=&quot;color: black; font-family: Arial, serif; font-size: 23px; font-weight: normal; line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0.25em; padding-bottom: 4px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: tahoma, verdana, arial, helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;here:mov a,#0h ;move 0 to a&lt;/span&gt;&lt;/h3&gt;&lt;div class=&quot;post-body entry-content&quot; style=&quot;color: #333333; font-family: Arial, serif; font-size: 14px; line-height: 1.6em; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: x-small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: tahoma, verdana, arial, helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;div class=&quot;para&quot; id=&quot;id6632725&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;up:mov p0,a ;move data fr&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7834032&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;acall delay ;call delay program&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365103228&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;inc a ;increment a&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id5877462&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;da a ;decimal adjust accumulator after addition&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170364945783&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;cjne a,#100,up ;compare a with 100, if not equal, jump to location up&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365097498&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;sjmp here ;jump to location here&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170369525073&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;delay routine&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id5602245&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;delay:mov r1,#0ffh ;move 0ffh to r1&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365931157&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;l3:mov r2,#0ffh ;move 0ffh to r2&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170366153306&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;l2:mov r3,#0ffh ;move 0ffh to r3&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id6192671&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;l1:djnz r1,l1 ;decrement r1, repeat till r1=0&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365119597&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;djnz r3,l2 ;decrement r3,repeat l2 till r3=0&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365094018&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;djnz r2,l3 ;decrement r2, repeat l3 till r2=0&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365138817&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;ret ;return&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365068446&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;end&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://microcontrollersdesign.blogspot.com/feeds/8855352941444512443/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://microcontrollersdesign.blogspot.com/2011/07/program-to-implement-bcd-counter-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1617923873776016015/posts/default/8855352941444512443'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1617923873776016015/posts/default/8855352941444512443'/><link rel='alternate' type='text/html' href='http://microcontrollersdesign.blogspot.com/2011/07/program-to-implement-bcd-counter-to.html' title='Program to implement BCD counter to count from 0-99 in 8051'/><author><name>T.sreedhar Reddy</name><uri>http://www.blogger.com/profile/11833688005891158344</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-1617923873776016015.post-4676381024649996494</id><published>2011-07-15T10:09:00.001-07:00</published><updated>2011-07-15T10:09:29.374-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Automatic Room Light Controller"/><title type='text'>Automatic Room Light Controller</title><content type='html'>&lt;h2 class=&quot;title&quot; style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; line-height: 17px; margin-top: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-family: inherit;&quot;&gt;Project title is&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: inherit;&quot;&gt;&amp;nbsp;“AUTOMATIC ROOM LIGHT CONTROLLER WITH BIDIRECTIONAL VISITOR COUNTER “.&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;div class=&quot;post-body entry-content&quot; style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; line-height: 17px;&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div class=&quot;post&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.microproject4u.com/images/templatemo_hd.jpg); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; clear: both; font-style: normal; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div style=&quot;color: black; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-family: inherit;&quot;&gt;The objective of this project is to make a controller based model to count number of persons visiting particular room and accordingly light up the room. Here we can use sensor and can know present number of persons.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-family: inherit;&quot;&gt;In today’s world, there is a continuous need for automatic appliances with the increase in standard of living, there is a sense of urgency for developing circuits that would ease the complexity of life.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-family: inherit;&quot;&gt;Also if at all one wants to know the number of people present in room so as not to have congestion. This circuit proves to be helpful.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;margin_bottom_10&quot; style=&quot;clear: both; color: black; height: 10px; width: 440px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;post_info&quot; style=&quot;clear: both; color: black;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;post&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.microproject4u.com/images/templatemo_hd.jpg); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; clear: both; color: black; font-style: normal; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;header_01&quot; style=&quot;color: #990000; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-family: inherit;&quot;&gt;Circuit Diagram:1&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;post_image&quot; style=&quot;float: left; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 3px; width: 140px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-family: inherit;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/images/room.gif&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;427&quot; src=&quot;http://www.microproject4u.com/images/room.gif&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;post_text&quot; style=&quot;float: right; width: 290px;&quot;&gt;&lt;div style=&quot;margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;margin_bottom_10&quot; style=&quot;clear: both; height: 10px; width: 440px;&quot;&gt;&lt;div style=&quot;margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/images/room1.gif&quot; style=&quot;clear: left; color: white; float: left; font-weight: normal; margin-bottom: 1em; margin-right: 1em; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;383&quot; longdesc=&quot;http://www.microproject4u.com/images/room1.gif&quot; src=&quot;http://www.microproject4u.com/images/room1.gif&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; width=&quot;400&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;post&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.microproject4u.com/images/templatemo_hd.jpg); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; clear: both; font-style: normal; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;header_01&quot; style=&quot;color: #990000; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-family: inherit;&quot;&gt;Circuit Diagram: 2&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;post_image&quot; style=&quot;color: black; float: left; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 3px; width: 140px;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 11px; line-height: 16px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;header_02&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.microproject4u.com/images/templatemo_header_right.jpg); background-origin: initial; background-position: 100% 50%; background-repeat: no-repeat no-repeat; color: #333333; font-size: 18px; height: 40px; padding-bottom: 0px; padding-left: 15px; padding-right: 0px; padding-top: 10px; position: relative;&quot;&gt;Download Project&amp;nbsp;&lt;img height=&quot;64&quot; src=&quot;http://www.microproject4u.com/images/download.png&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; width=&quot;64&quot; /&gt;&lt;/div&gt;&lt;ul class=&quot;photo_list&quot; style=&quot;color: #333333; list-style-image: initial; list-style-position: initial; list-style-type: none; margin-bottom: 0px; margin-left: 10px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;li style=&quot;float: left; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/room.html#&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;float: left; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/room.html#&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;float: left; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/room.html#&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;float: left; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/room.html#&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;float: left; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/room.html#&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;float: left; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/room.html#&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;float: left; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/room.html#&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;float: left; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/room.html#&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;margin_bottom_20&quot; style=&quot;clear: both; color: #333333; font-size: 16px; height: 20px; width: 450px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;section_w450_content&quot; style=&quot;padding-bottom: 0px; padding-left: 15px; padding-right: 15px; padding-top: 0px;&quot;&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/images/room.gif&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;Schematic Diagram:1&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/images/room1.gif&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;Schematic Diagram:2&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/images/1.tif&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;PCB Layout:1&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/images/2.tif&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;PCB Layout:2&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/images/2.JPG&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;Component Layout&lt;/a&gt;:1&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/images/2.JPG&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;Component Layout:1&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/files/PROGRAM.zip&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;Program&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/files/Report.docx&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;Report&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;Click on above links to Download&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://microcontrollersdesign.blogspot.com/feeds/4676381024649996494/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://microcontrollersdesign.blogspot.com/2011/07/automatic-room-light-controller.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1617923873776016015/posts/default/4676381024649996494'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1617923873776016015/posts/default/4676381024649996494'/><link rel='alternate' type='text/html' href='http://microcontrollersdesign.blogspot.com/2011/07/automatic-room-light-controller.html' title='Automatic Room Light Controller'/><author><name>T.sreedhar Reddy</name><uri>http://www.blogger.com/profile/11833688005891158344</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1617923873776016015.post-568649688065359320</id><published>2011-07-15T10:08:00.003-07:00</published><updated>2011-07-15T10:08:57.143-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Microcontroller Based Access Control system"/><title type='text'>Microcontroller Based Access Control system</title><content type='html'>&lt;h2 class=&quot;title&quot; style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; line-height: 17px; margin-top: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-weight: normal;&quot;&gt;Now a days, a problem of security is very much important everywhere&amp;nbsp;&amp;nbsp; in the world. So, in large firms or companies, to make protect of entering of unauthorized person or to secure their important section, they generally use this type of security. &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/h2&gt;&lt;div class=&quot;post-body entry-content&quot; style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; line-height: 17px;&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;&lt;div class=&quot;post&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.microproject4u.com/images/templatemo_hd.jpg); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; clear: both; font-style: normal; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;style3&quot; style=&quot;color: black; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;style4&quot; style=&quot;color: black;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-family: inherit;&quot;&gt;vThis project, AN ACCESS CONTROL SYSTEM provides a facility of security. This type of security lock is generally attached at the main entrance door of the firms. By using this type of security, only authorized fellow can enter.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;style3&quot; style=&quot;color: black; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;style4&quot; style=&quot;color: black; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-family: inherit;&quot;&gt;It is quite easy in installation and use. Through this, one can allocate more number of passwords to many fellows. It is easy to use as the fellow don’t need to carry any type of id card or chip etc.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;margin_bottom_10&quot; style=&quot;clear: both; color: black; height: 10px; width: 440px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;post_info&quot; style=&quot;clear: both; color: black;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&lt;b&gt;Circuit Diagram:&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/images/access_control_system.jpg&quot; style=&quot;color: white; font-weight: normal; margin-left: 1em; margin-right: 1em; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;295&quot; src=&quot;http://www.microproject4u.com/images/access_control_system.jpg&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; width=&quot;440&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;post&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.microproject4u.com/images/templatemo_hd.jpg); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; clear: both; color: black; font-style: normal; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;header_01&quot; style=&quot;color: #990000; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;post_image&quot; style=&quot;float: left; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 3px; width: 140px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-family: inherit;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;post_image&quot; style=&quot;float: left; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 3px; width: 140px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;post_image&quot; style=&quot;float: left; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 3px; width: 140px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 11px; line-height: 16px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;header_02&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.microproject4u.com/images/templatemo_header_right.jpg); background-origin: initial; background-position: 100% 50%; background-repeat: no-repeat no-repeat; color: #333333; font-size: 18px; height: 40px; padding-bottom: 0px; padding-left: 15px; padding-right: 0px; padding-top: 10px; position: relative;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Download Project&amp;nbsp;&lt;img height=&quot;64&quot; src=&quot;http://www.microproject4u.com/images/download.png&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; width=&quot;64&quot; /&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul class=&quot;photo_list&quot; style=&quot;color: #333333; list-style-image: initial; list-style-position: initial; list-style-type: none; margin-bottom: 0px; margin-left: 10px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;li style=&quot;float: left; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/acs.html#&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;float: left; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/acs.html#&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;float: left; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/acs.html#&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;float: left; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/acs.html#&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;float: left; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/acs.html#&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;float: left; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/acs.html#&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;float: left; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/acs.html#&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;float: left; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/acs.html#&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;margin_bottom_20&quot; style=&quot;clear: both; color: #333333; font-size: 16px; height: 20px; width: 450px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;section_w450_content&quot; style=&quot;padding-bottom: 0px; padding-left: 15px; padding-right: 15px; padding-top: 0px;&quot;&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/images/access_control_system.jpg&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;Schematic Diagram:1&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/files/acs.c&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;Programm&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/files/PRESENTATION-ACS-03.ppt&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;Presentation&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #cc0000;&quot;&gt;Click on above links to download&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://microcontrollersdesign.blogspot.com/feeds/568649688065359320/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://microcontrollersdesign.blogspot.com/2011/07/microcontroller-based-access-control.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1617923873776016015/posts/default/568649688065359320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1617923873776016015/posts/default/568649688065359320'/><link rel='alternate' type='text/html' href='http://microcontrollersdesign.blogspot.com/2011/07/microcontroller-based-access-control.html' title='Microcontroller Based Access Control system'/><author><name>T.sreedhar Reddy</name><uri>http://www.blogger.com/profile/11833688005891158344</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-1617923873776016015.post-2804075583038723816</id><published>2011-07-15T10:08:00.001-07:00</published><updated>2011-07-15T10:08:27.202-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CELLPHONE OPERATED LANDROVER"/><title type='text'>CELLPHONE OPERATED LANDROVER</title><content type='html'>&lt;h2 class=&quot;title&quot; style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; line-height: 17px; margin-top: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Calibri; font-size: medium; font-weight: normal;&quot;&gt;Project Overview&lt;/span&gt;&lt;/h2&gt;&lt;div class=&quot;post-body entry-content&quot; style=&quot;line-height: 17px;&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div class=&quot;post&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-origin: initial; background-position: 50% 100%; clear: both; color: black; font-style: normal; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Calibri; font-size: medium;&quot;&gt;Conventionally, wireless-controlled robots use RF circuits,which have the drawbacks of limited working range, limited frequency range and limited control. Use of a mobile phone for robotic control can overcome these limitations.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Calibri; font-size: medium;&quot;&gt;It provides the advantages of robust control, working range as large as the coverage area of the service provider,no interference with other controllers and up to twelve controls.Although the appearance and capabilities of robots vary vastly, all robots share the features of a mechanical, movable structure under some form of control.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Calibri; font-size: medium;&quot;&gt;The control of robot involves three distinct phases: reception, processing and action. Generally, the preceptors are sensors mounted on the robot, processing is done by the on-board microcontroller or processor, and the task (action) is performed using motors or with some other actuators.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;margin_bottom_10&quot; style=&quot;clear: both; font-family: Calibri; font-size: 16px; height: 10px; width: 440px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;post_info&quot; style=&quot;clear: both; color: black; font-family: Arial, Helvetica, sans-serif; font-size: 14px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;post&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-origin: initial; background-position: 50% 100%; clear: both; color: black; font-family: Calibri; font-size: 14px; font-style: normal; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;header_01&quot; style=&quot;color: #990000; font-size: 24px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Calibri; font-size: medium;&quot;&gt;Schematic Diagram&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;post_image&quot; style=&quot;float: left; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 3px; width: 140px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Calibri; font-size: medium;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/images/landrover_schematic_atmega16.JPG&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;289&quot; src=&quot;http://www.microproject4u.com/images/landrover_schematic_atmega16.JPG&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;post_text&quot; style=&quot;float: right; width: 290px;&quot;&gt;&lt;div style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;margin_bottom_10&quot; style=&quot;clear: both; font-size: 16px; height: 10px; width: 440px;&quot;&gt;&lt;div style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;post&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-origin: initial; background-position: 50% 100%; clear: both; font-family: Calibri; font-size: 14px; font-style: normal; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;header_01&quot; style=&quot;color: #990000; font-size: 24px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Calibri; font-size: medium;&quot;&gt;Block Diagram&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;post_image&quot; style=&quot;color: black; float: left; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 3px; width: 140px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;post_text&quot; style=&quot;color: black; float: right; width: 290px;&quot;&gt;&lt;div style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;margin_bottom_10 style3&quot; style=&quot;clear: both; font-size: 18px; font-weight: bold; height: 10px; width: 440px;&quot;&gt;&lt;div style=&quot;color: black; font-family: Arial, Helvetica, sans-serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Calibri; font-size: medium;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/images/dtmf_landrover_intro.JPG&quot; style=&quot;color: white; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;243&quot; longdesc=&quot;http://www.microproject4u.com/images/room1.gif&quot; src=&quot;http://www.microproject4u.com/images/dtmf_landrover_intro.JPG&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; font-family: Arial, Helvetica, sans-serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Calibri; font-size: medium;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Calibri; font-size: medium;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 11px; font-weight: normal;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;header_02&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.microproject4u.com/images/templatemo_header_right.jpg); background-origin: initial; background-position: 100% 50%; background-repeat: no-repeat no-repeat; color: #333333; font-size: 18px; height: 40px; padding-bottom: 0px; padding-left: 15px; padding-right: 0px; padding-top: 10px; position: relative;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Calibri; font-size: medium;&quot;&gt;Download Project&amp;nbsp;&lt;img height=&quot;64&quot; src=&quot;http://www.microproject4u.com/images/download.png&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; width=&quot;64&quot; /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://microcontrollersdesign.blogspot.com/feeds/2804075583038723816/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://microcontrollersdesign.blogspot.com/2011/07/cellphone-operated-landrover.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1617923873776016015/posts/default/2804075583038723816'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1617923873776016015/posts/default/2804075583038723816'/><link rel='alternate' type='text/html' href='http://microcontrollersdesign.blogspot.com/2011/07/cellphone-operated-landrover.html' title='CELLPHONE OPERATED LANDROVER'/><author><name>T.sreedhar Reddy</name><uri>http://www.blogger.com/profile/11833688005891158344</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-1617923873776016015.post-6460630493731587512</id><published>2011-07-15T10:07:00.003-07:00</published><updated>2011-07-15T10:07:41.301-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Remotely Programmable RTC-Interfaced Microcontroller for Multiple Device Control"/><title type='text'>Remotely Programmable RTC-Interfaced Microcontroller for Multiple Device Control</title><content type='html'>&lt;h2 class=&quot;title&quot; style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; line-height: 17px; margin-top: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-weight: normal; line-height: 16px;&quot;&gt;Since the circuit makes use of Philips TV remote for device-switching time parameters, you need to know the fundamentals of the coding format used&amp;nbsp;in these IR remotes.&lt;/span&gt;&lt;/h2&gt;&lt;div class=&quot;post-body entry-content&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;
&lt;div style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; line-height: 17px; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 16px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Calibri; font-size: x-large; line-height: 17px; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 16px;&quot;&gt;The Philips IR format makes use of RC5 code, which is also known as ‘bi-phase coding.’ In RC5-coded signals (Fig. 2), each bit has a uniform duration. A transition in the middle of the time interval assigned to each bit&amp;nbsp;encodes its logical value (‘0’ or ‘1’). A high-to-low transition assigns the bit a logic value of ‘0,’ and a low-to-high transition assigns the bit a logic value of ‘1.’ We need additional transitions at the beginning of each bit if a stream of equal bits is sent. However, there is no need of additional transitions if the&amp;nbsp;next bit has a different logic value.Table II shows how all the commands of an RC5 remote control are encoded.&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; line-height: 17px; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 16px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Calibri; font-size: medium; line-height: 17px;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 16px;&quot;&gt;The first two bits are ‘start’ bits, which are used to adjust and synchronise the receiver. These bits are used to calculate and analyse the bit length of the other bits.&amp;nbsp;The third bit is a ‘toggle’ bit, which is toggled every time a button ispressed at the remote control. This bit is used to identify whether the button is really pressed or whether an obstacle came in between the IR path of the remote and the IR receiver.&lt;/span&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 16px;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 14px;&quot;&gt;The five bits (A4 through A0) immediately following the toggle bit are used to identify the device (see Table III). So, a maximum of 32 devices can be identified to and respond individually to the same type of coding without any disturbance, i.e., one among the 64 devices can be identified uniquely. Addresses of some of the remotes are shown in Table III.&amp;nbsp;The six bits (C5 through C0) immediately following the five address bits are the control/command bits. Therefore a maximum of 64 commands can be equipped in an RC5-type remote. Some of the command codes (decimal equivalents), as used in this project, are shown in Table IV. When any of the command/control buttons on the remote is pressed, the coded signal is received by the IR receiver-demodulator TSOP1738.The output of the IR demodulator circuit is normally high, but when any of the buttons in the remote is pressed, a stream of low-going demodulated pulses will appear at its output. These pulses are fed to the external active-low interrupt input pin (INT/0) of 89C52. On receipt of the first low-going pulse, the monitor program of 89C52 will get interrupted and jump to the location ‘0003H,’ where the execution is redirected to ‘receive’ sub-routine of the&lt;/span&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 14px;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;program.&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; line-height: 17px; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Calibri; font-size: medium;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; line-height: 17px; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 16px;&quot;&gt;&amp;nbsp;The outputs from the subroutineare:&lt;/span&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Calibri; font-size: medium; line-height: 17px;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 16px;&quot;&gt;1. Toggle bit, which toggles (either ‘0’ or ‘1’) each time the button in a remote is pressed.&lt;/span&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 16px;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 14px;&quot;&gt;2. Address byte, whose value is zero for a normal Philips-type TV remote control.&lt;/span&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 14px;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;3. Control byte, which has a unique value for each button in the remote control.&amp;nbsp;&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;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 11px;&quot;&gt;&lt;div class=&quot;header_02&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.microproject4u.com/images/templatemo_header_right.jpg); background-origin: initial; background-position: 100% 50%; background-repeat: no-repeat no-repeat; color: #333333; font-size: 18px; height: 40px; padding-bottom: 0px; padding-left: 15px; padding-right: 0px; padding-top: 10px; position: relative;&quot;&gt;Download Project&amp;nbsp;&lt;img height=&quot;64&quot; src=&quot;http://www.microproject4u.com/images/download.png&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; width=&quot;64&quot; /&gt;&lt;/div&gt;&lt;ul class=&quot;photo_list&quot; style=&quot;color: #333333; list-style-image: initial; list-style-position: initial; list-style-type: none; margin-bottom: 0px; margin-left: 10px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;li style=&quot;float: left; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/multi_device_control.html#&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;float: left; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/multi_device_control.html#&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;float: left; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/multi_device_control.html#&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;float: left; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/multi_device_control.html#&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;float: left; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/multi_device_control.html#&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;float: left; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/multi_device_control.html#&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;float: left; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/multi_device_control.html#&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;float: left; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/multi_device_control.html#&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;margin_bottom_20&quot; style=&quot;clear: both; color: #333333; font-size: 16px; height: 20px; width: 450px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;section_w450_content&quot; style=&quot;padding-bottom: 0px; padding-left: 15px; padding-right: 15px; padding-top: 0px;&quot;&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/images/multi_device_control_schematic.JPG&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;Schematic Diagram&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/images/room1.gif&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://www.microproject4u.com/images/1.tif&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;PCB Layout&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/images/2.tif&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #cc0000;&quot;&gt;Click on above links to download&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://microcontrollersdesign.blogspot.com/feeds/6460630493731587512/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://microcontrollersdesign.blogspot.com/2011/07/remotely-programmable-rtc-interfaced.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1617923873776016015/posts/default/6460630493731587512'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1617923873776016015/posts/default/6460630493731587512'/><link rel='alternate' type='text/html' href='http://microcontrollersdesign.blogspot.com/2011/07/remotely-programmable-rtc-interfaced.html' title='Remotely Programmable RTC-Interfaced Microcontroller for Multiple Device Control'/><author><name>T.sreedhar Reddy</name><uri>http://www.blogger.com/profile/11833688005891158344</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-1617923873776016015.post-461427146919478192</id><published>2011-07-15T10:07:00.001-07:00</published><updated>2011-07-15T10:07:03.441-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Program to generate 50msec delay in 8051"/><title type='text'>Program to generate 50msec delay in 8051</title><content type='html'>&lt;h3 class=&quot;post-title entry-title&quot; style=&quot;color: black; font-family: Arial, serif; font-size: 23px; font-weight: normal; line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0.25em; padding-bottom: 4px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: tahoma, verdana, arial, helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;mov tmod,#01 ;select timer 0&lt;/span&gt;&lt;/h3&gt;&lt;div class=&quot;post-body entry-content&quot; style=&quot;color: #333333; font-family: Arial, serif; font-size: 14px; line-height: 1.6em; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: x-small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: tahoma, verdana, arial, helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365139357&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;here:mov tl0,#0fdh ;load tl0 with 0fdh&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170364963396&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;mov th0,#4bh ;load th0 with 4bh&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365114677&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;cpl p1.5 ;compliment p1.5&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365046650&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;acall delay ;call delay routine&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id3649087&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;sjmp here ;jump to here&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170369305557&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;delay:mov r1,#0c8h ;load r1 with data 0c8h&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id6336436&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;l1:setb tr0 ;set bit tr0&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365046592&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;again:jnb tf0,again ;repeat till tf0=0&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170367042347&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;clr tr0 ;clear tr0&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id3597611&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;clr tf0 ;clear tf0&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7395596&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;djnz r1,l1 ;decrement r1, jump to l1, if not equal to 0&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id6880695&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;ret&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7393345&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;end&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://microcontrollersdesign.blogspot.com/feeds/461427146919478192/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://microcontrollersdesign.blogspot.com/2011/07/program-to-generate-50msec-delay-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1617923873776016015/posts/default/461427146919478192'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1617923873776016015/posts/default/461427146919478192'/><link rel='alternate' type='text/html' href='http://microcontrollersdesign.blogspot.com/2011/07/program-to-generate-50msec-delay-in.html' title='Program to generate 50msec delay in 8051'/><author><name>T.sreedhar Reddy</name><uri>http://www.blogger.com/profile/11833688005891158344</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-1617923873776016015.post-1695897043737837245</id><published>2011-07-15T10:06:00.003-07:00</published><updated>2011-07-15T10:06:38.397-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Write a C program to display the code of the key pressed in 8051"/><title type='text'>Write a C program to display the code of the key pressed in 8051</title><content type='html'>&lt;h3 class=&quot;post-title entry-title&quot; style=&quot;color: black; font-family: Arial, serif; font-size: 23px; font-weight: normal; line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0.25em; padding-bottom: 4px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: tahoma, verdana, arial, helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;#include &amp;lt;REG51xD2.H&amp;gt;&lt;/span&gt;&lt;/h3&gt;&lt;div class=&quot;post-body entry-content&quot; style=&quot;color: #333333; font-family: Arial, serif; font-size: 14px; line-height: 1.6em; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: x-small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: tahoma, verdana, arial, helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;div class=&quot;para&quot; id=&quot;id6725780&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;#include &quot;lcd.h&quot;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365981791&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;unsigned char getkey();&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7889527&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;void delay(unsigned int);&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7694564&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;main()&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365008513&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;{&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170369110967&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;unsigned char key;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id8191601&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;InitLcd(); /* Initialise LCD */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170367108494&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;WriteString(&quot;Key Pressed=&quot;); /* Display msg on LCD */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170364969368&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;while(1)&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365937198&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;{&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id6977755&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;GotoXY(12,0); /* Set Cursor Position */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id6899826&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;key = getkey(); /* Call Getkey method */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id8085046&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;}&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365085272&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;}&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7028994&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;unsigned char getkey()&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365052755&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;{&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id5464892&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;unsigned char i,j,k,indx,t;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365124759&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;P0=0x0ff;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170369636896&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;P1=0x0ff;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170370253869&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;P2 = 0x00; /* P2 as Output port */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365845080&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;indx = 0x00; /* Index for storing the first value of&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170364729097&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;scanline */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365905233&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;for(i=0x00E;i&amp;gt;=0x00B;i&amp;lt;&amp;lt;=1) /* for 4 scanlines */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id5169353&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;{&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7158078&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;P2 = i; /* write data to scanline */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365093728&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;t = P0; /* Read readlines connected to P0*/&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id8106586&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;t = ~t;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id3662323&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;if(t&amp;gt;0) /* If key press is true */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id6932770&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;{&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170369130646&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;delay(6000); /* Delay for bouncing */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170369148139&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;for(j=0;j&amp;lt;=7;j++) /* Check for 8 lines */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170370256956&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;{&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7833732&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;t &amp;gt;&amp;gt;=1;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170366014067&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;if(t==0) /* if get pressed key*/&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365050145&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;{&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7327139&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;k = indx+j; /* Display that by converting to Ascii */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170366158211&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;t = k&amp;gt;&amp;gt;4;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365104156&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;t +=0x30;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365973896&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;WriteChar(t); /* Write upper nibble */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id8101043&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;t = k &amp;amp; 0x0f;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170370223992&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;if(t &amp;gt; 9)&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id8103949&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;t+=0x37;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7269085&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;else&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365988285&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;t+=0x30;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170370293032&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;WriteChar(t); /* write lower nibble */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id6867678&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;return(indx+j); /* Return index of the key pressed */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id5195803&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;}&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365125397&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;}&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365050609&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;}&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id6796991&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;indx += 8; /* If no key pressed increment index */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id8851667&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;}&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170370314377&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;}&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365092671&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;void delay(unsigned int x) /* Delay routine */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id8688366&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;{&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170366158828&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;for(;x&amp;gt;0;x--);&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7602778&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;}&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://microcontrollersdesign.blogspot.com/feeds/1695897043737837245/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://microcontrollersdesign.blogspot.com/2011/07/write-c-program-to-display-code-of-key.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1617923873776016015/posts/default/1695897043737837245'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1617923873776016015/posts/default/1695897043737837245'/><link rel='alternate' type='text/html' href='http://microcontrollersdesign.blogspot.com/2011/07/write-c-program-to-display-code-of-key.html' title='Write a C program to display the code of the key pressed in 8051'/><author><name>T.sreedhar Reddy</name><uri>http://www.blogger.com/profile/11833688005891158344</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-1617923873776016015.post-7333349057621789595</id><published>2011-07-15T10:06:00.001-07:00</published><updated>2011-07-15T10:06:03.368-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="program for Elevator Interface in 8051"/><title type='text'>program for Elevator Interface in 8051</title><content type='html'>&lt;h3 class=&quot;post-title entry-title&quot; style=&quot;color: black; font-family: Arial, serif; font-size: 23px; font-weight: normal; line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0.25em; padding-bottom: 4px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: tahoma, verdana, arial, helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;#include &amp;lt;REG51F.H&amp;gt;&lt;/span&gt;&lt;/h3&gt;&lt;div class=&quot;post-body entry-content&quot; style=&quot;color: #333333; font-family: Arial, serif; font-size: 14px; line-height: 1.6em; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: x-small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: tahoma, verdana, arial, helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;div class=&quot;para&quot; id=&quot;id6998687&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;void delay(unsigned int);&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id8578607&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;main()&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id8241944&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;{&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id6750592&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;unsigned char Flr[9] = {0xff,0x00,0x03,0xff,0x06,0xff,0xff,0xff,0x09};&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170366991939&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;unsigned char FClr[9] = {0xff,0x0E0,0x0D3,0xff,0x0B6,0xff,0xff,0xff,0x79};&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7163845&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;unsigned char ReqFlr,CurFlr = 0x01,i,j;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7374857&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;P0 = 0x00;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id5739256&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;P0 = 0x0f0;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id6170025&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;while(1)&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365094772&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;{&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170367344143&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;P1 = 0x0f;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170366990479&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;ReqFlr = P1 | 0x0f0;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365045722&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;while(ReqFlr == 0x0ff)&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365044182&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;ReqFlr = P1 | 0x0f0; /* Read Request Floor from P1 */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365928684&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;ReqFlr = ~ReqFlr;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id8835821&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;if(CurFlr == ReqFlr) /* If Request floor is equal to Current Floor */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365972968&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;{&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365078181&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;P0 = FClr[CurFlr]; /* Clear Floor Indicator */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365973026&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;continue; /* Go up to read again */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365111371&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;}&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7368196&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;else if(CurFlr &amp;gt; ReqFlr) /* If Current floor is &amp;gt; request floor */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170370327056&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;{&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1461702&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;i = Flr[CurFlr] - Flr[ReqFlr]; /* Get the no of floors to travel */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170370398204&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;j = Flr[CurFlr];&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id3932258&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;for(;i&amp;gt;0;i--) /* Move the indicator down */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365042118&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;{&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170367323778&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;P0 = 0x0f0|j;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id4900572&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;j--;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7580985&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;delay(25000);&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id8788244&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;}&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365932955&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;}&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id4952147&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;else /* If Current floor is &amp;lt; request floor */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id8686186&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;{&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7068190&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;i = Flr[ReqFlr] - Flr[CurFlr]; /* Get the no of floors to travel */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id6997177&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;j = Flr[CurFlr];&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365939749&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;for(;i&amp;gt;0;i--) /* Move the indicator Up */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id5071721&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;{&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170364897776&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;P0 = 0x0f0 | j;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365054967&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;j++;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170367189060&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;delay(25000);&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id5741758&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;}&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id8510295&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;}&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365933567&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;CurFlr = ReqFlr; /* Update Current floor */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id8510938&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;P0 = FClr[CurFlr]; /* Clear the indicator */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id6984330&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;}&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365053219&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;}&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7536514&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;void delay(unsigned int x)&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365115779&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;{&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7806708&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;for(;x&amp;gt;0;x--);&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365087998&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;}&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://microcontrollersdesign.blogspot.com/feeds/7333349057621789595/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://microcontrollersdesign.blogspot.com/2011/07/program-for-elevator-interface-in-8051.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1617923873776016015/posts/default/7333349057621789595'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1617923873776016015/posts/default/7333349057621789595'/><link rel='alternate' type='text/html' href='http://microcontrollersdesign.blogspot.com/2011/07/program-for-elevator-interface-in-8051.html' title='program for Elevator Interface in 8051'/><author><name>T.sreedhar Reddy</name><uri>http://www.blogger.com/profile/11833688005891158344</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-1617923873776016015.post-8730604542156140123</id><published>2011-07-15T10:05:00.002-07:00</published><updated>2011-07-15T10:05:33.332-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="program for Stepper motor interface in 8051"/><title type='text'>program for Stepper motor interface in 8051</title><content type='html'>&lt;h3 class=&quot;post-title entry-title&quot; style=&quot;color: black; font-family: Arial, serif; font-size: 23px; font-weight: normal; line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0.25em; padding-bottom: 4px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/h3&gt;&lt;div class=&quot;post-header-line-1&quot; style=&quot;color: #333333; font-family: Arial, serif; font-size: 14px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;post-body entry-content&quot; style=&quot;color: #333333; font-family: Arial, serif; font-size: 14px; line-height: 1.6em; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: x-small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: tahoma, verdana, arial, helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;div class=&quot;para&quot; id=&quot;id8401242&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;#include &amp;lt;REG51xD2.H&amp;gt;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7222491&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;static bit Dir=0;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365095758&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;void delay(unsigned int x) /* Delay Routine */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id5707415&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;{&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170370217734&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;for(;x&amp;gt;0;x--);&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id8118551&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;}&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365928800&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;void ChangeDir(void) interrupt 0 /* Int Vector at 000BH, Reg Bank 1 */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365837035&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;{&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id8561119&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;Dir = ~Dir; /* Complement the Direction flag */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170370202163&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;ClrLcd();&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id3645941&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;if(Dir)&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id4456744&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;delay(32000);&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170370210249&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;else&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170369305140&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;delay(32000);&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7670338&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;}&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id3623346&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;main()&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7895394&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;{&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id3602362&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;unsigned char Val,i;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id3859554&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;EA=0x1; /* Enable Interrupt flag and Interrupt 0 &amp;amp; Serial Interrupt */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170369489693&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;EX0=0x1;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170367042315&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;ES=0x1;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id520794&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;P0=0x00; /*since the monitor is using the serial interrupt it has to be enabled*/&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7915583&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;while(1)&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7904523&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;{&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170367352761&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;if(Dir) /* If Dir Clockwise */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365017539&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;{&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170369340690&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;Val = 0x88;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7865674&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;for(i=0;i&amp;lt;4;i++)&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170370337655&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;{&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7916623&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;P0 = Val; /* Write data for clock wise direction*/&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365956382&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;Val = Val&amp;gt;&amp;gt;1;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7918462&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;delay(575);&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7521306&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;}&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365085968&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;}&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id6144528&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;else /* AntiClockwise Direction */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365957550&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;{&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id4300353&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;Val = 0x11;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7380065&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;for(i=0;i&amp;lt;4;i++)&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170370217907&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;{&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7645734&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;P0 = Val; /* Write data for anticlock wise direction*/&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365018989&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;Val = Val&amp;lt;&amp;lt;1;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id250270&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;delay(575);&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id4871908&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;}&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7690305&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;}&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7395495&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;}&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id8533743&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;}&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://microcontrollersdesign.blogspot.com/feeds/8730604542156140123/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://microcontrollersdesign.blogspot.com/2011/07/program-for-stepper-motor-interface-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1617923873776016015/posts/default/8730604542156140123'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1617923873776016015/posts/default/8730604542156140123'/><link rel='alternate' type='text/html' href='http://microcontrollersdesign.blogspot.com/2011/07/program-for-stepper-motor-interface-in.html' title='program for Stepper motor interface in 8051'/><author><name>T.sreedhar Reddy</name><uri>http://www.blogger.com/profile/11833688005891158344</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-1617923873776016015.post-4840172619932381855</id><published>2011-07-15T10:05:00.000-07:00</published><updated>2011-07-15T10:05:01.127-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Home Security System Using AT89C52"/><title type='text'>Home Security System Using AT89C52</title><content type='html'>&lt;h2 class=&quot;title&quot; style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; line-height: 17px; margin-top: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 14px; font-weight: normal;&quot;&gt;The project works on 5V DC derived from 230V. It will display the condition of home like temperature, door or window status, smoke detection, obstacle detection etc on 2&lt;strong&gt;×&lt;/strong&gt;16 display and here we can use any mechanical device by the use of relay so we can overcome the problem generated at home. The project is also use for controlling the temperature &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/h2&gt;&lt;div class=&quot;post-body entry-content&quot; style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; line-height: 17px;&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div class=&quot;post&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.microproject4u.com/images/templatemo_hd.jpg); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; clear: both; color: black; font-size: 14px; font-style: normal; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div style=&quot;font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The project is use for security purpose at night for security purpose alarm is generated so that we should know something is wrong going on and it will display the problem generated on 2&lt;strong&gt;×&lt;/strong&gt;16 display.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;margin_bottom_10&quot; style=&quot;clear: both; font-size: 16px; height: 10px; width: 440px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;post_info&quot; style=&quot;clear: both; color: black; font-size: 14px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;post&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.microproject4u.com/images/templatemo_hd.jpg); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; clear: both; color: black; font-size: 14px; font-style: normal; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;header_01&quot; style=&quot;color: #990000; font-size: 24px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Block Diagram&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;post_image&quot; style=&quot;float: left; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 3px; width: 140px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/images/room.gif&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;290&quot; src=&quot;http://www.microproject4u.com/images/home_security_system_block_diagram.JPG&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; width=&quot;438&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;post_text&quot; style=&quot;float: right; width: 290px;&quot;&gt;&lt;div style=&quot;font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;margin_bottom_10&quot; style=&quot;clear: both; font-size: 16px; height: 10px; width: 440px;&quot;&gt;&lt;div style=&quot;font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;post&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.microproject4u.com/images/templatemo_hd.jpg); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; clear: both; font-size: 14px; font-style: normal; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;header_01&quot; style=&quot;color: #990000; font-size: 24px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Description Of Block Diagram&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;post_text&quot; style=&quot;color: black; float: right; width: 290px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&amp;nbsp;&lt;div style=&quot;font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/images/room1.gif&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;color: black; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;margin_right_10&quot; style=&quot;color: black; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 10px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;ul style=&quot;color: black; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;li class=&quot;margin_right_10&quot; style=&quot;list-style-type: square; margin-bottom: 0px; margin-left: 20px; margin-right: 10px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;u&gt;POWER SUPPLY&lt;/u&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;margin_right_10&quot; style=&quot;color: black; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 10px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Power supply block gives us 5V DC from 230V AC to drive microcontroller and other devices.&lt;/span&gt;&lt;/div&gt;&lt;ul style=&quot;color: black; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;li class=&quot;margin_right_10&quot; style=&quot;list-style-type: square; margin-bottom: 0px; margin-left: 20px; margin-right: 10px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;u&gt;MICROCONTROLLER&lt;/u&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;margin_right_10&quot; style=&quot;color: black; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 10px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;Here we use AT89C52. The AT89C52 is a low-power, high-performance CMOS 8-bit microcontroller with 8K bytes of&amp;nbsp; Flash programmable and erasable ROM&lt;/span&gt;&lt;/div&gt;&lt;ul style=&quot;color: black; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;li class=&quot;margin_right_10&quot; style=&quot;list-style-type: square; margin-bottom: 0px; margin-left: 20px; margin-right: 10px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;u&gt;LCD&lt;/u&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;margin_right_10&quot; style=&quot;color: black; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 10px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Here we use 2×16 LCD. It display the condition of home, it display temperature.&lt;br /&gt;
&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;ul style=&quot;color: black; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;li class=&quot;margin_right_10&quot; style=&quot;list-style-type: square; margin-bottom: 0px; margin-left: 20px; margin-right: 10px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;u&gt;SOUND DETECTION&lt;/u&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;margin_right_10&quot; style=&quot;color: black; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 10px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&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; Sound signal is received from microphone in sound detection block and compared with threshold value if it is above threshold alarm is generated and display SND1 on LCD otherwise it display SND0.&lt;/span&gt;&lt;/div&gt;&lt;ul style=&quot;color: black; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;li class=&quot;margin_right_10&quot; style=&quot;list-style-type: square; margin-bottom: 0px; margin-left: 20px; margin-right: 10px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;u&gt;SMOKE DETECTION&lt;/u&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;margin_right_10&quot; style=&quot;color: black; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 10px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&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; If the smoke is present smoke detection block will sense it and compared it with threshold value if the value is below threshold alarm is generated and display SM1 otherwise it display SM0.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;margin_right_10&quot; style=&quot;color: black; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 10px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;margin_right_10&quot; style=&quot;font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 10px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 11px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;header_02&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.microproject4u.com/images/templatemo_header_right.jpg); background-origin: initial; background-position: 100% 50%; background-repeat: no-repeat no-repeat; color: #333333; font-size: 18px; height: 40px; padding-bottom: 0px; padding-left: 15px; padding-right: 0px; padding-top: 10px; position: relative;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Download Project&amp;nbsp;&lt;img height=&quot;64&quot; src=&quot;http://www.microproject4u.com/images/download.png&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; width=&quot;64&quot; /&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul class=&quot;photo_list&quot; style=&quot;color: #333333; list-style-image: initial; list-style-position: initial; list-style-type: none; margin-bottom: 0px; margin-left: 10px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;li style=&quot;float: left; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/home_security_system.html#&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;float: left; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/home_security_system.html#&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;float: left; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/home_security_system.html#&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;float: left; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/home_security_system.html#&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;float: left; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/home_security_system.html#&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;float: left; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/home_security_system.html#&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;float: left; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/home_security_system.html#&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;float: left; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/home_security_system.html#&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;margin_bottom_20&quot; style=&quot;clear: both; color: #333333; font-size: 16px; height: 20px; width: 450px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;section_w450_content&quot; style=&quot;padding-bottom: 0px; padding-left: 15px; padding-right: 15px; padding-top: 0px;&quot;&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/images/home_security_system_circuit_diagram.JPG&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;Schematic Diagram:1&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/images/home_security_system_block_diagram.JPG&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;Block Diagram&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/images/home_security_system_PCB_diagram.JPG&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;PCB Layout&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/files/PROGRAM.zip&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;Program&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/files/SECURITY%20FINAL.doc&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;Report&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #cc0000;&quot;&gt;Click on below links to download&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://microcontrollersdesign.blogspot.com/feeds/4840172619932381855/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://microcontrollersdesign.blogspot.com/2011/07/home-security-system-using-at89c52.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1617923873776016015/posts/default/4840172619932381855'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1617923873776016015/posts/default/4840172619932381855'/><link rel='alternate' type='text/html' href='http://microcontrollersdesign.blogspot.com/2011/07/home-security-system-using-at89c52.html' title='Home Security System Using AT89C52'/><author><name>T.sreedhar Reddy</name><uri>http://www.blogger.com/profile/11833688005891158344</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-1617923873776016015.post-7567435277093182111</id><published>2011-07-15T10:04:00.001-07:00</published><updated>2011-07-15T10:04:15.753-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="RFID Based Door Access Control System using Microcontroller"/><title type='text'>RFID Based Door Access Control System using Microcontroller</title><content type='html'>&lt;h2 class=&quot;title&quot; style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; line-height: 17px; margin-top: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 14px; font-weight: normal;&quot;&gt;Automation today has increased the speed of living. This project in which radio frequency is used to automatically control the door locks and grants access to the persons who are allowed to access that particular door.&lt;/span&gt;&lt;/h2&gt;&lt;div class=&quot;post-body entry-content&quot; style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; line-height: 17px;&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div class=&quot;post&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.microproject4u.com/images/templatemo_hd.jpg); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; clear: both; color: black; font-size: 14px; font-style: normal; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div style=&quot;font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;The technology used is termed as RFID meaning ‘Radio Frequency Identification’. Here tags are provided in the form of identity cards which contain a coil and a transmitter.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;When the coil is placed in a high frequency electromagnetic waves, it is energized and provides supply to the transmitter which transmits a code unique to the tag. This code is received and identify and hence the person is identified.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;After identifying the person the access permission to the person are verified and if he is trying to access a door, which he is allowed access to, the door is opened and a log is created with the person’s name and time accessing the door.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;margin_bottom_10&quot; style=&quot;clear: both; font-size: 16px; height: 10px; width: 440px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;post_info&quot; style=&quot;clear: both; color: black; font-family: Arial, Helvetica, sans-serif; font-size: 14px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;post&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.microproject4u.com/images/templatemo_hd.jpg); background-origin: initial; background-position: 50% 100%; background-repeat: repeat no-repeat; clear: both; font-family: Calibri; font-size: 14px; font-style: normal; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;header_01&quot; style=&quot;color: #990000; font-size: 24px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Circuit Diagram:1&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; color: black; text-align: center;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/images/rfid_schematic.JPG&quot; style=&quot;color: #0066cc; font-weight: normal; margin-left: 1em; margin-right: 1em; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; src=&quot;http://www.microproject4u.com/images/rfid_schematic1.JPG&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;post_image&quot; style=&quot;color: black; float: left; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 3px; width: 140px;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;color: black;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: black;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 11px;&quot;&gt;&lt;div class=&quot;header_02&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.microproject4u.com/images/templatemo_header_right.jpg); background-origin: initial; background-position: 100% 50%; background-repeat: no-repeat no-repeat; color: #333333; font-size: 18px; height: 40px; padding-bottom: 0px; padding-left: 15px; padding-right: 0px; padding-top: 10px; position: relative;&quot;&gt;Download Project&amp;nbsp;&lt;img height=&quot;64&quot; src=&quot;http://www.microproject4u.com/images/download.png&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; width=&quot;64&quot; /&gt;&lt;/div&gt;&lt;ul class=&quot;photo_list&quot; style=&quot;color: #333333; list-style-image: initial; list-style-position: initial; list-style-type: none; margin-bottom: 0px; margin-left: 10px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;li style=&quot;float: left; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/rfid.html#&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;float: left; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/rfid.html#&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;float: left; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/rfid.html#&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;float: left; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/rfid.html#&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;float: left; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/rfid.html#&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;float: left; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/rfid.html#&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;float: left; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/rfid.html#&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;float: left; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/rfid.html#&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;margin_bottom_20&quot; style=&quot;clear: both; color: #333333; font-size: 16px; height: 20px; width: 450px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;section_w450_content&quot; style=&quot;padding-bottom: 0px; padding-left: 15px; padding-right: 15px; padding-top: 0px;&quot;&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/images/rfid_schematic.JPG&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;Schematic Diagram:1&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/files/BOTpicrfid_rx.pdf&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;PCB Layout:1&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/files/BOTirf12b_tag.pdf&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;PCB Layout:2&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/files/comp_1.pdf&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;Component Layout:1&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/files/comp_2.pdf&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;Component Layout:2&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/files/rfid_program.txt&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;Program&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;a href=&quot;http://www.microproject4u.com/files/rfid_report.doc&quot; style=&quot;color: #0066cc; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;Report&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #cc0000;&quot;&gt;Click on above links to download&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://microcontrollersdesign.blogspot.com/feeds/7567435277093182111/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://microcontrollersdesign.blogspot.com/2011/07/rfid-based-door-access-control-system.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1617923873776016015/posts/default/7567435277093182111'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1617923873776016015/posts/default/7567435277093182111'/><link rel='alternate' type='text/html' href='http://microcontrollersdesign.blogspot.com/2011/07/rfid-based-door-access-control-system.html' title='RFID Based Door Access Control System using Microcontroller'/><author><name>T.sreedhar Reddy</name><uri>http://www.blogger.com/profile/11833688005891158344</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-1617923873776016015.post-5909369387506257245</id><published>2011-07-15T10:03:00.001-07:00</published><updated>2011-07-15T10:03:36.188-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Frequency Counter Circuit"/><title type='text'>Frequency Counter Circuit</title><content type='html'>&lt;h2 class=&quot;title&quot; style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; line-height: 17px; margin-top: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Arial, sans-serif; font-size: 12px; font-weight: normal; line-height: 18px;&quot;&gt;This frequency counter may seem simple but it is capable of measuring frequencies in range between 10Hz – 60MHz with 10Hz resolution.&amp;nbsp;Frequency counter&amp;nbsp;circuit is based on PIC16F282A&amp;nbsp;&amp;nbsp;microcontroller&amp;nbsp;clocked by 4MHz crystal.&lt;/span&gt;&lt;/h2&gt;&lt;div class=&quot;post-body entry-content&quot; style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; line-height: 17px;&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;h1 class=&quot;entrytitle&quot; id=&quot;post-4345&quot; style=&quot;display: block; font-family: &#39;Trebuchet MS&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, sans-serif; font-weight: bold; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 1px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Arial, sans-serif; font-weight: normal; line-height: 18px;&quot;&gt;&lt;div style=&quot;font-size: 12px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: center;&quot;&gt;&lt;a href=&quot;http://www.embedds.com/wp-content/uploads/2011/01/60MHz_Frequency_Meter_Counter_PIC16F628A.jpg&quot; style=&quot;color: #861b8f; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;img alt=&quot;Frequency Counter Circuit&quot; class=&quot;size-full wp-image-4346 aligncenter&quot; height=&quot;360&quot; src=&quot;http://www.embedds.com/wp-content/uploads/2011/01/60MHz_Frequency_Meter_Counter_PIC16F628A.jpg&quot; style=&quot;border-bottom-color: rgb(26, 68, 126); border-bottom-style: solid; border-bottom-width: 2px; border-left-color: rgb(26, 68, 126); border-left-style: solid; border-left-width: 2px; border-right-color: rgb(26, 68, 126); border-right-style: solid; border-right-width: 2px; border-top-color: rgb(26, 68, 126); border-top-style: solid; border-top-width: 2px; margin-bottom: 8px; margin-left: 5px; margin-right: 8px; margin-top: 5px; padding-bottom: 2px; padding-left: 2px; padding-right: 2px; padding-top: 2px;&quot; title=&quot;60MHz_Frequency_Meter_Counter_PIC16F628A&quot; width=&quot;375&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 12px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;Frequency counter has a transistor based TTL level&amp;nbsp;converter&amp;nbsp;where small signal is increased to level acceptable to PIC microcontroller logics. So it is capable of measuring signals from crystal oscillators. There is also no problem to use additional pre-scaller circuit and rise frequency range even to GHz level. I bet this frequency counter would find a place on any hobbyists workbench.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;&quot;&gt;&lt;a href=&quot;http://www.electronics-diy.com/50MHz_Frequency_Meter_Counter.php&quot; style=&quot;color: #861b8f; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;Full Project&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/h1&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://microcontrollersdesign.blogspot.com/feeds/5909369387506257245/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://microcontrollersdesign.blogspot.com/2011/07/frequency-counter-circuit.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1617923873776016015/posts/default/5909369387506257245'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1617923873776016015/posts/default/5909369387506257245'/><link rel='alternate' type='text/html' href='http://microcontrollersdesign.blogspot.com/2011/07/frequency-counter-circuit.html' title='Frequency Counter Circuit'/><author><name>T.sreedhar Reddy</name><uri>http://www.blogger.com/profile/11833688005891158344</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-1617923873776016015.post-1822570177109067414</id><published>2011-07-15T10:02:00.000-07:00</published><updated>2011-07-15T10:02:42.073-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="How To Program PIC(18F) Microcontroller In C Using MPLAB IDE"/><title type='text'>How To Program PIC(18F) Microcontroller In C Using MPLAB IDE</title><content type='html'>&lt;h2 class=&quot;title&quot; style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; line-height: 17px; margin-top: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;MPLAB IDE is a powerful tool used to program PIC Microcontroller. This software makes several output files of which hex file is used to burn PIC Microcontroller. You can download this software from Microchip site. You can Program any Microcontroller(18F) in C language in this software.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;div class=&quot;post-body entry-content&quot;&gt;&lt;br /&gt;
&lt;ol style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; margin-bottom: 0px; margin-left: 5px; margin-right: 0px; margin-top: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;li style=&quot;margin-bottom: 0.25em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 0px;&quot;&gt;Open&amp;nbsp; MPLAB IDE&amp;nbsp; and from Project tab choose “Project Wizard” and from Project Wizard choose “Next“&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;a href=&quot;http://howtoideas.net/wp-content/uploads/2011/03/1_thumb14.png&quot; style=&quot;color: #2198a6; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;&quot;&gt;&lt;img alt=&quot;mplab pic&quot; border=&quot;0&quot; height=&quot;313&quot; src=&quot;http://howtoideas.net/wp-content/uploads/2011/03/1_thumb14_thumb.png&quot; style=&quot;background-image: none; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: block; float: none; margin-left: auto; margin-right: auto; padding-bottom: 8px; padding-left: 0px; padding-right: 0px; padding-top: 0px; position: relative;&quot; title=&quot;mplab pic&quot; width=&quot;404&quot; /&gt;&lt;/a&gt;&amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0.25em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 0px;&quot;&gt;Select the device you want to use for programming and then choose “Next”&amp;nbsp;&lt;a href=&quot;http://howtoideas.net/wp-content/uploads/2011/03/13.png&quot; style=&quot;color: #2198a6; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;&quot;&gt;&lt;img alt=&quot;mplab pic&quot; border=&quot;0&quot; height=&quot;317&quot; src=&quot;http://howtoideas.net/wp-content/uploads/2011/03/1_thumb3.png&quot; style=&quot;background-image: none; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: block; float: none; margin-left: auto; margin-right: auto; padding-bottom: 8px; padding-left: 0px; padding-right: 0px; padding-top: 0px; position: relative;&quot; title=&quot;mplab pic&quot; width=&quot;404&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0.25em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 0px;&quot;&gt;From Active Toolsuite&amp;nbsp; choose Microchip C18 Toolsuite and from Toolsuite contents choose MPLAB C18 C Compiler then choose “Next”&amp;nbsp;&lt;a href=&quot;http://howtoideas.net/wp-content/uploads/2011/03/22.png&quot; style=&quot;color: #2198a6; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;&quot;&gt;&lt;img alt=&quot;mplab pic&quot; border=&quot;0&quot; height=&quot;316&quot; src=&quot;http://howtoideas.net/wp-content/uploads/2011/03/2_thumb2.png&quot; style=&quot;background-image: none; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: block; float: none; margin-left: auto; margin-right: auto; padding-bottom: 8px; padding-left: 0px; padding-right: 0px; padding-top: 0px; position: relative;&quot; title=&quot;mplab pic&quot; width=&quot;404&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0.25em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 0px;&quot;&gt;Now Browse and choose a New Project File and its Directory and choose “Next”&amp;nbsp;&lt;a href=&quot;http://howtoideas.net/wp-content/uploads/2011/03/32.png&quot; style=&quot;color: #2198a6; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;&quot;&gt;&lt;img alt=&quot;pic 18f&quot; border=&quot;0&quot; height=&quot;327&quot; src=&quot;http://howtoideas.net/wp-content/uploads/2011/03/3_thumb2.png&quot; style=&quot;background-image: none; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: block; float: none; margin-left: auto; margin-right: auto; padding-bottom: 8px; padding-left: 0px; padding-right: 0px; padding-top: 0px; position: relative;&quot; title=&quot;pic18f&quot; width=&quot;404&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0.25em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 0px;&quot;&gt;In Step Four the software will demand you to add any file to project. Since this is the first project so simply choose Next and then in next Step choose “Finish”.&lt;a href=&quot;http://howtoideas.net/wp-content/uploads/2011/03/4_thumb5.png&quot; style=&quot;color: #2198a6; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;&quot;&gt;&lt;img alt=&quot;pic 18 mplab&quot; border=&quot;0&quot; height=&quot;309&quot; src=&quot;http://howtoideas.net/wp-content/uploads/2011/03/4_thumb5_thumb.png&quot; style=&quot;background-image: none; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: block; float: none; margin-left: auto; margin-right: auto; padding-bottom: 8px; padding-left: 0px; padding-right: 0px; padding-top: 0px; position: relative;&quot; title=&quot;pic 18mplab&quot; width=&quot;404&quot; /&gt;&lt;/a&gt;&amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0.25em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 0px;&quot;&gt;Now click on New file button and and create a empty file and don’t forget to choose it’s extension as .C&amp;nbsp;&amp;nbsp;&lt;a href=&quot;http://howtoideas.net/wp-content/uploads/2011/03/51.png&quot; style=&quot;color: #2198a6; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;&quot;&gt;&lt;img alt=&quot;5&quot; border=&quot;0&quot; height=&quot;327&quot; src=&quot;http://howtoideas.net/wp-content/uploads/2011/03/5_thumb1.png&quot; style=&quot;background-image: none; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: block; float: none; margin-left: auto; margin-right: auto; padding-bottom: 8px; padding-left: 0px; padding-right: 0px; padding-top: 0px; position: relative;&quot; title=&quot;5&quot; width=&quot;404&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0.25em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 0px;&quot;&gt;From the view tab choose “Project” then on the left side you can see the following type of Tool bar. Now Right Click on “Source Files” and choose “Add Files” and Add the file you have saved(see 6th point)&amp;nbsp;&lt;a href=&quot;http://howtoideas.net/wp-content/uploads/2011/03/42.png&quot; style=&quot;color: #2198a6; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;&quot;&gt;&lt;img alt=&quot;pic mplab programming&quot; border=&quot;0&quot; height=&quot;290&quot; src=&quot;http://howtoideas.net/wp-content/uploads/2011/03/4_thumb2.png&quot; style=&quot;background-image: none; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: block; float: none; margin-left: auto; margin-right: auto; padding-bottom: 8px; padding-left: 0px; padding-right: 0px; padding-top: 0px; position: relative;&quot; title=&quot;pic mplab programming&quot; width=&quot;254&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0.25em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 0px;&quot;&gt;Similarly you need to add Header files, Library files, Linker files from your installed Program directory&lt;a href=&quot;http://howtoideas.net/wp-content/uploads/2011/03/52.png&quot; style=&quot;color: #2198a6; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;&quot;&gt;&lt;img alt=&quot;pic mplab programming&quot; border=&quot;0&quot; height=&quot;292&quot; src=&quot;http://howtoideas.net/wp-content/uploads/2011/03/5_thumb2.png&quot; style=&quot;background-image: none; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: block; float: none; margin-left: auto; margin-right: auto; padding-bottom: 8px; padding-left: 0px; padding-right: 0px; padding-top: 0px; position: relative;&quot; title=&quot;pic mplab programming&quot; width=&quot;254&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0.25em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 0px;&quot;&gt;Now you can write your code in the source file in C language. After writing the project from the Project Tab choose “build” and you will have the hex file on the same directory where your source file is…&lt;a href=&quot;http://howtoideas.net/wp-content/uploads/2011/03/image_thumb410.png&quot; style=&quot;color: #2198a6; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;&quot;&gt;&lt;img alt=&quot;pic 18f&quot; border=&quot;0&quot; height=&quot;235&quot; src=&quot;http://howtoideas.net/wp-content/uploads/2011/03/image_thumb4_thumb.png&quot; style=&quot;background-image: none; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; display: block; float: none; margin-left: auto; margin-right: auto; padding-bottom: 8px; padding-left: 0px; padding-right: 0px; padding-top: 0px; position: relative;&quot; title=&quot;pic 18f&quot; width=&quot;244&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;div style=&quot;clear: both; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; line-height: 17px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;meta&quot; style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 17px;&quot;&gt;&lt;div class=&quot;post-footer-line post-footer-line-1&quot;&gt;&lt;div class=&quot;post-footer&quot; style=&quot;border-bottom-color: rgb(183, 183, 183); border-bottom-style: dotted; border-bottom-width: 1px; color: #ff7800; letter-spacing: 0em; line-height: 1.3em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0.75em;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://microcontrollersdesign.blogspot.com/feeds/1822570177109067414/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://microcontrollersdesign.blogspot.com/2011/07/how-to-program-pic18f-microcontroller.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1617923873776016015/posts/default/1822570177109067414'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1617923873776016015/posts/default/1822570177109067414'/><link rel='alternate' type='text/html' href='http://microcontrollersdesign.blogspot.com/2011/07/how-to-program-pic18f-microcontroller.html' title='How To Program PIC(18F) Microcontroller In C Using MPLAB IDE'/><author><name>T.sreedhar Reddy</name><uri>http://www.blogger.com/profile/11833688005891158344</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-1617923873776016015.post-5453851196741475357</id><published>2011-07-15T10:01:00.001-07:00</published><updated>2011-07-15T10:01:28.858-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="program for Seven segment display in 8051"/><title type='text'>program for Seven segment display in 8051</title><content type='html'>&lt;h3 class=&quot;post-title entry-title&quot; style=&quot;color: black; font-family: Arial, serif; font-size: 23px; font-weight: normal; line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0.25em; padding-bottom: 4px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/h3&gt;&lt;div class=&quot;post-header-line-1&quot; style=&quot;color: #333333; font-family: Arial, serif; font-size: 14px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;post-body entry-content&quot; style=&quot;color: #333333; font-family: Arial, serif; font-size: 14px; line-height: 1.6em; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: x-small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: tahoma, verdana, arial, helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;div class=&quot;para&quot; id=&quot;id6868584&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;#include&amp;lt;stdio.h&amp;gt;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7577094&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;#include &amp;lt;REG51.H&amp;gt;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365103402&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;void delay(int g);&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id6188910&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;int port[20] = {0xff,0xff,0xff,0xff,&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170366988232&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;0xc6,0x86,0xc7,0x86,&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id3103136&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;0xbf,0xc0,0xde,0x87,&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id6941351&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;0xbf,0x92,0x91,0x92,&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365913057&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;0x92,0xc8,0x86,0x87},i;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7662910&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;void main(){&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170367341736&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;int d,b,j,k,s;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id5663478&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;while(1){&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170369120469&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;i=0;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365925874&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;for(d=0;d&amp;lt;5;d++)&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365958650&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;{&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id6993761&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;for(b=0;b&amp;lt;4;b++)&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id5095478&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;{&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365020526&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;k=port[i++];&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365118763&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;for(j=0;j&amp;lt;8;j++){&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365101256&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;s=k;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170369604132&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;s=s&amp;amp;0x80;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170367312967&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;if(s==0x00)&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7221284&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;P1= 0x00;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170370205433&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;else&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id5569413&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;P1=0x1;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170366153332&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;P2 = 0x1;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id8405412&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;P2=0x00;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id3895124&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;s=k;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7180003&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;s=s&amp;lt;&amp;lt;1;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365904800&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;k=s;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id3120433&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;}&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170367249697&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;}&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id6901061&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;delay(10000);&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7479742&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;delay(10000);&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365066474&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;}&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170367330026&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;}&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7616740&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;}&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170369313549&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;void delay(int g)&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id8578522&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;{&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id3118287&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;int h;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id8837051&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;for(h=0;h&amp;lt;=g;g++)&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id8851024&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;{&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365979193&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365027512&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;}&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170367324633&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;}&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://microcontrollersdesign.blogspot.com/feeds/5453851196741475357/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://microcontrollersdesign.blogspot.com/2011/07/program-for-seven-segment-display-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1617923873776016015/posts/default/5453851196741475357'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1617923873776016015/posts/default/5453851196741475357'/><link rel='alternate' type='text/html' href='http://microcontrollersdesign.blogspot.com/2011/07/program-for-seven-segment-display-in.html' title='program for Seven segment display in 8051'/><author><name>T.sreedhar Reddy</name><uri>http://www.blogger.com/profile/11833688005891158344</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-1617923873776016015.post-5511380500483088831</id><published>2011-07-15T10:00:00.003-07:00</published><updated>2011-07-15T10:00:35.640-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="program for Dual DAC"/><category scheme="http://www.blogger.com/atom/ns#" term="square wave in 8051"/><title type='text'>program for Dual DAC, square wave in 8051</title><content type='html'>&lt;h3 class=&quot;post-title entry-title&quot; style=&quot;color: black; font-family: Arial, serif; font-size: 23px; font-weight: normal; line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0.25em; padding-bottom: 4px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/h3&gt;&lt;div class=&quot;post-header-line-1&quot; style=&quot;color: #333333; font-family: Arial, serif; font-size: 14px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;post-body entry-content&quot; style=&quot;color: #333333; font-family: Arial, serif; font-size: 14px; line-height: 1.6em; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: x-small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: tahoma, verdana, arial, helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365112937&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;#include &amp;lt;REG51xD2.H&amp;gt;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id6867479&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;#include &quot;lcd.h&quot;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170367261482&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;sbit Amp = P3^3; /* Port line to change amplitude */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id5479037&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;sbit Fre = P3^2; /* Port line to change frequency */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365094250&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;void delay(unsigned int x) /* delay routine */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7200906&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;{&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7416975&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;for(;x&amp;gt;0;x--);&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170369104994&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;}&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7704194&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;main()&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7443940&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;{&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7966424&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;unsigned char on = 0x7f,off=0x00;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7199356&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;unsigned int fre = 100;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id6894921&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;InitLcd(); /* Initialize LCD */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id6227164&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;WriteString(&quot;Squarewave&quot;); /* Write to LCD */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7631083&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;while(1)&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id5084497&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;{&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170370396187&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;if(!Amp) /* if user choice is to change amplitude */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365121627&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;{&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170367251503&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;while(!Amp); /* wait for key release */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365117925&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;on+=0x08; /* Increase the amplitude */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7948724&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;}&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170369147566&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;if(!Fre) /* if user choice is to change frequency */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365163804&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;{&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id6957937&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;if(fre &amp;gt; 1000) /* if frequency exceeds 1000 reset to default */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id8784421&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;fre = 100;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7596048&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;while(!Fre); /* wait for key release */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365064200&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;fre += 50; /* Increase the frequency */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id6867869&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;}&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7616364&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;P0=on; /* write amplitude to port */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365070244&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;P1=on;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365105258&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;delay(fre);&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7393096&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;P0 = off; /* clear port */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id8097990&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;P1 = off;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id6334171&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;delay(fre);&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7484837&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;}&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365106244&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;}&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://microcontrollersdesign.blogspot.com/feeds/5511380500483088831/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://microcontrollersdesign.blogspot.com/2011/07/program-for-dual-dac-square-wave-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1617923873776016015/posts/default/5511380500483088831'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1617923873776016015/posts/default/5511380500483088831'/><link rel='alternate' type='text/html' href='http://microcontrollersdesign.blogspot.com/2011/07/program-for-dual-dac-square-wave-in.html' title='program for Dual DAC, square wave in 8051'/><author><name>T.sreedhar Reddy</name><uri>http://www.blogger.com/profile/11833688005891158344</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-1617923873776016015.post-174687242520563140</id><published>2011-07-15T10:00:00.001-07:00</published><updated>2011-07-15T10:00:03.747-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="program for Dual DAC"/><category scheme="http://www.blogger.com/atom/ns#" term="triangle wave in 8051"/><title type='text'>program for Dual DAC, triangle wave in 8051</title><content type='html'>&lt;h3 class=&quot;post-title entry-title&quot; style=&quot;color: black; font-family: Arial, serif; font-size: 23px; font-weight: normal; line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0.25em; padding-bottom: 4px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: tahoma, verdana, arial, helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;#include &amp;lt;REG51xD2.H&amp;gt;&lt;/span&gt;&lt;/h3&gt;&lt;div class=&quot;post-body entry-content&quot; style=&quot;color: #333333; font-family: Arial, serif; font-size: 14px; line-height: 1.6em; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: x-small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: tahoma, verdana, arial, helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365103750&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;#include &quot;lcd.h&quot;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id6268196&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;main()&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170366283293&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;{&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365004352&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;unsigned char i=0;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7644545&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;InitLcd(); /* Initialise LCD */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170367330613&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;WriteString(&quot;Triangular Wave&quot;); /* Display on LCD */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170367324010&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;P0 = 0x00; /* P0 as Output port */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170369121429&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;while(1)&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365077079&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;{&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7810994&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;for(i=0;i&amp;lt;0xff;i++){ /* Generate ON pulse */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170369132752&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;P1 = i;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170369084128&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;P0 = i; }&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170369118000&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;for(i=0xfe;i&amp;gt;0x00;i--) /* Generate OFF pulse */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id3897533&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;{P0 = i;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365021956&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;P1 = i;}&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170370336341&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;}&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365913599&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;}&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://microcontrollersdesign.blogspot.com/feeds/174687242520563140/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://microcontrollersdesign.blogspot.com/2011/07/program-for-dual-dac-triangle-wave-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1617923873776016015/posts/default/174687242520563140'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1617923873776016015/posts/default/174687242520563140'/><link rel='alternate' type='text/html' href='http://microcontrollersdesign.blogspot.com/2011/07/program-for-dual-dac-triangle-wave-in.html' title='program for Dual DAC, triangle wave in 8051'/><author><name>T.sreedhar Reddy</name><uri>http://www.blogger.com/profile/11833688005891158344</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-1617923873776016015.post-6171870944361672254</id><published>2011-07-15T09:59:00.001-07:00</published><updated>2011-07-15T09:59:24.907-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PIC 16f84a LED on/off with delay project"/><title type='text'>PIC 16f84a LED on/off with delay project</title><content type='html'>&lt;div class=&quot;post hentry uncustomized-post-template&quot; id=&quot;post-4993492311841284583&quot; style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif;&quot;&gt;&lt;h2 class=&quot;title&quot; style=&quot;font-size: 11px; line-height: 17px; margin-top: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 4px; -webkit-border-vertical-spacing: 4px; color: #666666; font-size: xx-small; font-weight: normal; line-height: 18px;&quot;&gt;Flowchart Explanation:&lt;/span&gt;&lt;/h2&gt;&lt;div class=&quot;post-body entry-content&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small; line-height: 17px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 4px; -webkit-border-vertical-spacing: 4px; color: #666666; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 18px;&quot;&gt;Set the Port B of the PIC 16F84A device as output Port. Turn the Led-on by sending the data one to the Port B and create a Delay of 0.5 seconds to keep the Led in on-state. Turn the Led-off by sending the data zero to the Port B and create a Delay of 0.5 seconds to keep the Led in off-state. this process is repeated untill the power supply to the PIC 16F84A goes off.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 4px; -webkit-border-vertical-spacing: 4px; color: #666666; line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif;&quot;&gt;Flowchart and Circuit Diagram:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;table border=&quot;0&quot; style=&quot;font-size: 11px; line-height: 17px; text-align: justify;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td width=&quot;38%&quot;&gt;&lt;div align=&quot;center&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;img height=&quot;365&quot; src=&quot;http://led-delay.webs.com/Led%20on-off%20with%20delay.JPG&quot; style=&quot;padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px;&quot; width=&quot;124&quot; /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td width=&quot;62%&quot;&gt;&lt;div align=&quot;center&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;img src=&quot;http://led-delay.webs.com/LED%20ON-OFF%20with%20delay_circuit.JPG&quot; style=&quot;padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px;&quot; /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div style=&quot;font-size: 11px; line-height: 17px; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small; line-height: 17px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif;&quot;&gt;Circuit Description:&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif;&quot;&gt;PIC 16F84A microcontroller device is programmed to turning a LED on/off continuously with delay. this device uses 4MHz crystal/Resonator oscillator to drive osc1 and osc2. Port B RB0 is used as output port and it output the positive current with some delay to blink the LED and this delay timing depends on the program. A 100 or120 ohms resistance is connected to the LED to limiting the output current from RB0. VDD(Pin 14) and pin 4 is connected to the +5V power supply. Vss(Pin 5) is connected to the -5V or ground.&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif;&quot;&gt;Embedded C Program&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;color: #ff8040;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #408080; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: black; font-family: Verdana, Arial, Helvetica, sans-serif;&quot;&gt;LED on/off with delay&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Verdana, Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Compiler:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: black; font-family: Verdana, Arial, Helvetica, sans-serif;&quot;&gt;PIC CCS C compiler&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small; line-height: 17px;&quot;&gt;&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif;&quot;&gt;Embedded C program for Turning a Led On/Off with delay. its very easy to learn and you can able to understand the concept and logic of the program from the flowchart and comment lines of the program.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: xx-small; line-height: 17px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;table bgcolor=&quot;#F2EFED&quot; border=&quot;0&quot; height=&quot;231&quot; style=&quot;font-size: 11px; line-height: 17px; text-align: justify;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td height=&quot;231&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif;&quot;&gt;/*Project Name: LED on/off with 0.5 second delay*/&lt;br /&gt;
&lt;br /&gt;
#include&amp;lt;16F84A.h&amp;gt; &amp;nbsp;&amp;nbsp;/*defines type of device to include device files*/&lt;br /&gt;
&lt;br /&gt;
#use delay(clock=4mhz) &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/* defines crystal frequency 4MHz */&lt;br /&gt;
&lt;br /&gt;
#fuses xt, nowdt, noprotect, noput&lt;br /&gt;
/* xt oscilator used and no watch dog timer, no code protection, no &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;power up timer is used */&lt;br /&gt;
&lt;br /&gt;
#byte portb=6 &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/* defines memory location of register */&lt;br /&gt;
&lt;br /&gt;
void main()&lt;br /&gt;
&amp;nbsp;&amp;nbsp;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set_tris_b(0x00); &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; /* it sets the portb as output port */&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; loop1: portb=0x01; &amp;nbsp;&amp;nbsp;&amp;nbsp;/* sends 1 to portb RB0 to turn the LED-on */&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delay_ms(500); &amp;nbsp;&amp;nbsp;&amp;nbsp;/* creates half second delay between LED on/off*/&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;portb=0x00; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;/* sends 0 to portb RB0 to turn the LED-off */&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delay_ms(500); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/*creates half second delay between LED off/on*/&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; goto loop1;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/* loop1 just turns-on/off the LED continuously until the power supply &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;OFF */&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;div style=&quot;font-size: 11px; line-height: 17px; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-weight: bold;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small; line-height: 17px;&quot;&gt;&lt;b style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Delay:&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;delay is used to keep the processor output as constant for the period of specified time. this period of time is called as Delay time. Delay time can be programmed according to your specified timings. for example&lt;/span&gt;&lt;/span&gt;&lt;table border=&quot;0&quot; height=&quot;8&quot; style=&quot;font-size: 11px; line-height: 17px; text-align: justify;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td width=&quot;97&quot;&gt;&lt;div align=&quot;center&quot;&gt;&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;delay in milli seconds&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td width=&quot;79&quot;&gt;&lt;div align=&quot;center&quot;&gt;&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;delay in seconds&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td width=&quot;97&quot;&gt;&lt;div align=&quot;center&quot;&gt;&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;250&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td width=&quot;79&quot;&gt;&lt;div align=&quot;center&quot;&gt;&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;0.25&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td width=&quot;97&quot;&gt;&lt;div align=&quot;center&quot;&gt;&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;500&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td width=&quot;79&quot;&gt;&lt;div align=&quot;center&quot;&gt;&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;0.5&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td width=&quot;97&quot;&gt;&lt;div align=&quot;center&quot;&gt;&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;1000&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td width=&quot;79&quot;&gt;&lt;div align=&quot;center&quot;&gt;&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td width=&quot;97&quot;&gt;&lt;div align=&quot;center&quot;&gt;&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;2000&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td width=&quot;79&quot;&gt;&lt;div align=&quot;center&quot;&gt;&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div style=&quot;clear: both; font-size: 11px; line-height: 17px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;meta&quot; style=&quot;font-size: 11px; line-height: 17px;&quot;&gt;&lt;div class=&quot;post-footer-line post-footer-line-1&quot;&gt;&lt;div class=&quot;post-footer&quot; style=&quot;border-bottom-color: rgb(183, 183, 183); border-bottom-style: dotted; border-bottom-width: 1px; color: #ff7800; font-size: 10px; letter-spacing: 0em; line-height: 1.3em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0.75em;&quot;&gt;&lt;span class=&quot;post-comment-link&quot;&gt;&lt;a class=&quot;comment-link&quot; href=&quot;http://microcontroller-project-codes.blogspot.com/2011/07/pic-16f84a-led-onoff-with-delay-project.html#comments&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhk4sMLcgHc6R1-sIykPaoOplt0xtjJ8I6oRl1Dy0d3vs3rnhhhh6adesDbcCnVGQhGDKbh9JaCruQb-KKE2bdN-j8-LrzHU_PUJ1wQm6bxIUpk978fRt3X5sIw8OpXUGXYteOUKiRbT14/s320/comment.png); background-origin: initial; background-position: 0% 50%; background-repeat: no-repeat no-repeat; color: #861b8f; float: right; outline-color: initial; outline-style: none; outline-width: initial; padding-left: 15px; padding-right: 10px; text-decoration: none; white-space: nowrap;&quot;&gt;0 comments&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;post-author vcard&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiRaJsSoIX_63TXb86u4DfbW2Tl5vVw5gX7keTQidLA2CEvGUvWjfZ3r7OeHGgW9geH62w322byxgQyrvEQXnnJL45unI87hceXd5ZCgcqeIlklF9lpAF7xDAnI5aOrQA9Be3OgzzJSQg/s320/author.png); background-origin: initial; background-position: 0% 50%; background-repeat: no-repeat no-repeat; clear: both; font-size: 11px; padding-left: 15px;&quot;&gt;Posted by&amp;nbsp;&lt;span class=&quot;fn&quot;&gt;bharadwaj&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class=&quot;post-icons&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;post-footer-line post-footer-line-2&quot;&gt;&lt;span class=&quot;post-labels&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhP6VNKj_b-24rwMqGMr09P8_s-iE04FKgCv32Bhx5WXccN1y1kS3V4qO0GhXsk_egBi4acUSQpcgwYZRxDtWqK93RhMt5l1ra59-ginfYhkRkaYPlyWNS4ihVxgw3yxZSK6chftx6FAKY/s320/folder.gif); background-origin: initial; background-position: 0% 50%; background-repeat: no-repeat no-repeat; padding-left: 15px;&quot;&gt;Labels:&amp;nbsp;&lt;a href=&quot;http://microcontroller-project-codes.blogspot.com/search/label/PIC%2016f84a%20LED%20on%2Foff%20with%20delay%20project&quot; rel=&quot;tag&quot; style=&quot;color: #861b8f; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;&quot;&gt;PIC 16f84a LED on/off with delay project&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;post-footer-line post-footer-line-3&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;post hentry uncustomized-post-template&quot; id=&quot;post-7748225557662189666&quot; style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; line-height: 17px;&quot;&gt;&lt;a href=&quot;&quot; name=&quot;7748225557662189666&quot; style=&quot;color: #861b8f; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;&quot;&gt;&lt;/a&gt;&lt;h2 class=&quot;title&quot; style=&quot;margin-top: 20px;&quot;&gt;&lt;a href=&quot;http://microcontroller-project-codes.blogspot.com/2011/07/pushbutton-for-led-chaser-with.html&quot; style=&quot;color: #861b8f; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;&quot;&gt;PushButton for Led Chaser with microcontroller&lt;/a&gt;&lt;/h2&gt;&lt;div class=&quot;post-body entry-content&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;img height=&quot;494&quot; src=&quot;http://pushbutton-ledchaser.webs.com/pushbutton_for_Led_Chaser.JPG&quot; style=&quot;padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px;&quot; width=&quot;156&quot; /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 4px; -webkit-border-vertical-spacing: 4px;&quot;&gt;&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;PushButton Led Chaser:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 4px; -webkit-border-vertical-spacing: 4px; color: #666666; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: xx-small; line-height: 18px;&quot;&gt;PushButton micro switch is used as an input to ON and OFF Led chaser. when you press the pushbutton then it starts(ON) the Led chaser. Led chaser means Led blinks one by one in continuous motion. if you press the pushbutton when an Led chaser in ON condition then it stops(OFF) Led chaser.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 4px; -webkit-border-vertical-spacing: 4px;&quot;&gt;&lt;span style=&quot;color: #666666; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small; line-height: 18px;&quot;&gt;Flowchart Explanation:&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 4px; -webkit-border-vertical-spacing: 4px;&quot;&gt;&lt;span style=&quot;color: #666666; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;Set the PortA RA0 as input and PortB RB0 as output of the PIC 16F84A device. Create a never ending while loop and inside the while loop read the PortA RA0 bit.&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;-webkit-border-horizontal-spacing: 4px; -webkit-border-vertical-spacing: 4px; font-family: Verdana, Arial, Helvetica, sans-serif;&quot;&gt;Check whether the PushButton switch is pressed or not. If the Button is Pressed means PortA RA0 = 1 or RA0 goes High and it enters into the while loop and starts the Led Chaser by shifting the data 1 stored in the variable value using Left Shift Operator with a 0.25 second delay and again checks for button is pressed if it is pressed again then Stops the Led Chaser by sending 0x00 to PortB and the control comes out of the second while loop and the same process is repeated. If the Button is not Pressed means it will go to while loop and again checks for switch press.&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;-webkit-border-horizontal-spacing: 4px; -webkit-border-vertical-spacing: 4px; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;Circuit Diagram:&lt;/span&gt;&lt;/span&gt;&lt;table border=&quot;0&quot; height=&quot;185&quot; style=&quot;-webkit-border-horizontal-spacing: 4px; -webkit-border-vertical-spacing: 4px; color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: justify;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td align=&quot;center&quot; class=&quot;bg-wtitle&quot; height=&quot;159&quot; valign=&quot;bottom&quot; width=&quot;67%&quot;&gt;&lt;img height=&quot;287&quot; src=&quot;http://pushbutton-ledchaser.webs.com/pushbutton_for_Led_Chaser_ckt.JPG&quot; style=&quot;padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px;&quot; width=&quot;349&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;-webkit-border-horizontal-spacing: 4px; -webkit-border-vertical-spacing: 4px; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;Circuit Description:&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 4px; -webkit-border-vertical-spacing: 4px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;-webkit-border-horizontal-spacing: 4px; -webkit-border-vertical-spacing: 4px; font-family: Verdana, Arial, Helvetica, sans-serif;&quot;&gt;PIC 16F84A microcontroller device is programmed for Led Chaser with Push Button when the button is pressed. this device uses the capacitor C1, C2(33pf) and 4MHz crystal/Resonator oscillator to drive the oscillator1 and oscillator2. The Push Button is connected to the PortA RA0 and +5V and pull down Resistor R2(10k) is connected to the PortA RA0 and Gnd.(Gnd means ground)&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; line-height: 18px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 4px; -webkit-border-vertical-spacing: 4px; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px;&quot;&gt;In this circuit Active High Input is used. Resistor R2(10k) is used to pull down the PIC input to Logic &#39;0&#39; or Low or Pull down the Voltage down to zero. when you press the switch it pulls the voltage from 0 to 5V and makes the input to Logic &#39;1&#39; or High. Resistor 1K is connected to the PortB and Leds. the other negative terminal of all the eight Led is connected to the ground.Resistor R is a Current Limiting Resistor R(1K) is used to prevent the damage to both the PIC and the Leds. Resistor R reduces the current to the sufficient level.&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;-webkit-border-horizontal-spacing: 4px; -webkit-border-vertical-spacing: 4px; font-family: Arial, Helvetica, sans-serif; font-size: xx-small;&quot;&gt;&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;Embedded C Program&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;-webkit-border-horizontal-spacing: 4px; -webkit-border-vertical-spacing: 4px; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #ff8040;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;-webkit-border-horizontal-spacing: 4px; -webkit-border-vertical-spacing: 4px; color: #408080; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: black; font-family: Verdana, Arial, Helvetica, sans-serif;&quot;&gt;PushButton for Led Chaser&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;-webkit-border-horizontal-spacing: 4px; -webkit-border-vertical-spacing: 4px; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: xx-small;&quot;&gt;Compiler:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 4px; -webkit-border-vertical-spacing: 4px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;-webkit-border-horizontal-spacing: 4px; -webkit-border-vertical-spacing: 4px; color: black; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: xx-small;&quot;&gt;&lt;span&gt;PIC CCS C compiler&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;-webkit-border-horizontal-spacing: 4px; -webkit-border-vertical-spacing: 4px; font-family: Verdana, Arial, Helvetica, sans-serif;&quot;&gt;Embedded C program for PushButton for Led Chaser. its very easy to learn and you can able to understand the concept and logic of the program from the flowchart and comment lines of the program.&lt;/span&gt;&lt;/span&gt;&lt;table bgcolor=&quot;#F2EFED&quot; border=&quot;0&quot; height=&quot;364&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: justify; width: 536px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td height=&quot;614&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: xx-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 4px; -webkit-border-vertical-spacing: 4px;&quot;&gt;/* Project Name: PushButton for Led Chaser */&lt;br /&gt;
&lt;br /&gt;
#include&amp;lt;16F84A.h&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/*defines type of device to include device files*/&lt;br /&gt;
&lt;br /&gt;
#use delay(clock=4mhz) &amp;nbsp;&amp;nbsp;&amp;nbsp;/* defines crystal frequency 4MHz */&lt;br /&gt;
&lt;br /&gt;
#fuses xt, nowdt, noprotect, noput&lt;br /&gt;
/* xt oscilator used and no watch dog timer, no code protection, no power up &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;timer is used */&lt;br /&gt;
&lt;br /&gt;
#byte portb=5&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/* defines memory location of register */&lt;br /&gt;
#byte portb=6 &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/* defines memory location of register */&lt;br /&gt;
&lt;br /&gt;
void main()&lt;br /&gt;
&amp;nbsp;&amp;nbsp;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;byte c,d;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;set_tris_a(0x01); &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; /* it sets the portA RA0 as input port */&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;set_tris_b(0x00); &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; /* it sets the portB RB0 as output port */&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;while(true)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(porta == 0x01)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* if switch pressed starts Disco Led */&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; while(true)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;c = 0;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; /*initialize the count c equal to zero */&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; d = 0x01; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/* assigns the content of d to 0x01 */&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; while(c &amp;lt; 8)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;portb = d; /*sends content of d to portb to turn-on 1st Led*/&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;delay_ms(250); &amp;nbsp;/* creates 0.25 second delay */&lt;span style=&quot;color: black;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: black;&quot;&gt;d = d &amp;lt;&amp;lt; 1;&amp;nbsp;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: black;&quot;&gt;/* shifts the value of data to the left by 1&lt;/span&gt;&lt;span style=&quot;color: black;&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;&lt;span style=&quot;color: black;&quot;&gt;c++;&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;/* increments the value of c by 1*/&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(porta == 0x01)&amp;nbsp;&amp;nbsp;&amp;nbsp;/*if switch pressed again stops DiscoLed*/&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; portb = 0x00;&amp;nbsp;/*assigns portB RB0 to 0x00 to turn-offLed*/&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; /* comes out of the loop*/&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://microcontrollersdesign.blogspot.com/feeds/6171870944361672254/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://microcontrollersdesign.blogspot.com/2011/07/pic-16f84a-led-onoff-with-delay-project.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1617923873776016015/posts/default/6171870944361672254'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1617923873776016015/posts/default/6171870944361672254'/><link rel='alternate' type='text/html' href='http://microcontrollersdesign.blogspot.com/2011/07/pic-16f84a-led-onoff-with-delay-project.html' title='PIC 16f84a LED on/off with delay project'/><author><name>T.sreedhar Reddy</name><uri>http://www.blogger.com/profile/11833688005891158344</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-1617923873776016015.post-9000615372649241125</id><published>2011-07-15T09:58:00.001-07:00</published><updated>2011-07-15T09:58:43.761-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PIC16f84a Push Button for Blinking Led project"/><title type='text'>PIC16f84a Push Button for Blinking Led project</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 4px; -webkit-border-vertical-spacing: 4px; color: #666666; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small; line-height: 18px;&quot;&gt;Flowchart Explanation:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;post hentry uncustomized-post-template&quot; id=&quot;post-82120067762658931&quot; style=&quot;line-height: 17px;&quot;&gt;&lt;div class=&quot;post-body entry-content&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 4px; -webkit-border-vertical-spacing: 4px; color: #666666; line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px;&quot;&gt;Set the PortA RA0 as input and PortB RB0 as output of the PIC 16F84A device as output Port. Create a never ending while loop and inside the while loop read the PortA RA0 bit.&lt;br /&gt;
&lt;br /&gt;
Check whether the Push Button is pressed or not. If the Button is Pressed means PortA RA0 = 1 or RA0 goes High and it enters into the while loop and starts the Led Blinking by sending 1 and 0 Alternately to RB0 with a 0.25 second delay and again checks for button is pressed if it is pressed again then stops the Led Blinking and the control comes out of the second while loop and the same process is repeated. If the Button is not Pressed means it will go to while loop and again checks for switch press.&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;Flowchart and Circuit Diagram:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;table border=&quot;0&quot; height=&quot;241&quot; style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td height=&quot;368&quot; width=&quot;33%&quot;&gt;&lt;div align=&quot;center&quot;&gt;&lt;img height=&quot;494&quot; src=&quot;http://pushbutton-led.webs.com/pushbutton_for_blinking_Led.JPG&quot; style=&quot;cursor: move; padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px;&quot; width=&quot;156&quot; /&gt;&lt;/div&gt;&lt;/td&gt;&lt;td align=&quot;center&quot; class=&quot;bg-wtitle&quot; height=&quot;368&quot; valign=&quot;bottom&quot; width=&quot;67%&quot;&gt;&lt;img height=&quot;268&quot; src=&quot;http://pushbutton-led.webs.com/pushbutton_for_blinking_Led_ckt.JPG&quot; style=&quot;cursor: move; padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px;&quot; width=&quot;276&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;img height=&quot;143&quot; src=&quot;http://pushbutton-led.webs.com/pushbutton_truthtable.JPG&quot; style=&quot;cursor: move; padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px;&quot; width=&quot;355&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;Circuit Description:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: xx-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif;&quot;&gt;PIC 16F84A microcontroller device is programmed for Blinking Led with Push Button when the button is pressed. This device uses 4MHz crystal/Resonator oscillator to drive the oscillator1 and oscillator2. The Push Button is connected to the PortA RA0 and +5V and pull down Resistor R2(10k) is connected to the PortA RA0 and Gnd.&lt;br /&gt;
&lt;br /&gt;
In this circuit Active High Input is used. Resistor R2(10k) is used to pull down the PIC input to Logic &#39;0&#39; or Low or Pull down the Voltage down to zero. when you press the switch it pulls the voltage from 0 to 5V and makes the input to Logic &#39;1&#39; or High.Resistor R1 is connected to the PIC pin and Led. the other negative terminal of the Led is connected to the ground.Resistor R1 is a Current Limiting Resistor R1(1K) is used to prevent the damage to both the PIC and the Led. Resistor R1 reduces the current to the sufficient level.&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif;&quot;&gt;Embedded C Program&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;color: #ff8040;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #408080; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: black; font-family: Verdana, Arial, Helvetica, sans-serif;&quot;&gt;Push Button for Blinking Led&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Verdana, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;span&gt;&lt;b&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Compiler:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: black; font-family: Verdana, Arial, Helvetica, sans-serif;&quot;&gt;&lt;span&gt;PIC CCS C compiler&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;Embedded C program for Push Button for Blinking Led. its very easy to learn and you can able to understand the concept and logic of the program from the flowchart and comment lines of the program.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;table bgcolor=&quot;#F2EFED&quot; border=&quot;0&quot; height=&quot;364&quot; style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td height=&quot;428&quot;&gt;&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif;&quot;&gt;/* Project Name: Push Button for Blinking Led */&lt;br /&gt;
&lt;br /&gt;
#include&amp;lt;16F84A.h&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/*defines type of device to include device files*/&lt;br /&gt;
&lt;br /&gt;
#use delay(clock=4mhz) &amp;nbsp;&amp;nbsp;&amp;nbsp;/* defines crystal frequency 4MHz */&lt;br /&gt;
&lt;br /&gt;
#fuses xt, nowdt, noprotect, noput&lt;br /&gt;
/* xt oscilator used and no watch dog timer, no code protection, no power up &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;timer is used */&lt;br /&gt;
&lt;br /&gt;
#byte portb=5&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/* defines memory location of register */&lt;br /&gt;
#byte portb=6 &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/* defines memory location of register */&lt;br /&gt;
&lt;br /&gt;
void main()&lt;br /&gt;
&amp;nbsp;&amp;nbsp;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;set_tris_a(0x01); &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; /* it sets the portA RA0 as input port */&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;set_tris_b(0x00); &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; /* it sets the portB RB0 as output port */&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;while(true)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(porta == 0x01)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* if switch pressed Led starts Blinking*/&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; while(true)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&amp;nbsp; &amp;nbsp;portb = 0x01; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;/*assigns portB RB0 to 0x01 for turn-on Led*/&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;delay_ms(250);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;portb = 0x00;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; /*assigns portB RB0 to 0x00 for turn-off Led*/&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;delay_ms(250);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;if(porta == 0x01)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/* if switch pressed again Led stops Blinking*/&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;break; /* comes out of the loop*/&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://microcontrollersdesign.blogspot.com/feeds/9000615372649241125/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://microcontrollersdesign.blogspot.com/2011/07/pic16f84a-push-button-for-blinking-led.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1617923873776016015/posts/default/9000615372649241125'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1617923873776016015/posts/default/9000615372649241125'/><link rel='alternate' type='text/html' href='http://microcontrollersdesign.blogspot.com/2011/07/pic16f84a-push-button-for-blinking-led.html' title='PIC16f84a Push Button for Blinking Led project'/><author><name>T.sreedhar Reddy</name><uri>http://www.blogger.com/profile/11833688005891158344</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-1617923873776016015.post-2159499470856781562</id><published>2011-07-15T09:57:00.000-07:00</published><updated>2011-07-15T09:57:59.172-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="First PICMicro Project"/><title type='text'>First PICMicro Project</title><content type='html'>&lt;div class=&quot;post hentry uncustomized-post-template&quot; id=&quot;post-2466475468996846293&quot; style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; line-height: 17px;&quot;&gt;&lt;h2 class=&quot;title&quot; style=&quot;margin-top: 20px;&quot;&gt;&lt;br /&gt;
&lt;/h2&gt;&lt;div class=&quot;post-body entry-content&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;strong&gt;First PICMicro Project&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;div align=&quot;center&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;b&gt;&lt;img alt=&quot;first.jpg (23199 bytes)&quot; height=&quot;245&quot; src=&quot;http://www.rentron.com/Files/first.jpg&quot; style=&quot;padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px;&quot; width=&quot;338&quot; /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;small&gt;In the past two weeks, I discussed the prerequisits for starting your first application and the issues surrounding PICMicro programmers and what to look for. With this background, I am now ready to present what I think is a good first application for somebody learning about the PICMicro. This circuit is not as simple as what I started with in &quot;Programming and Customizing the PIC Microcontroller&quot;, but can be used in the same way to experiment with different ideas and trying out new concepts.&amp;nbsp;&lt;/small&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;small&gt;The application itself consists of the 16F84 PICMicro (with power, reset and clocking &quot;core&quot;) with two LEDs and a button. One of the LEDs is lit by the PICMicro while the other is lit when the button is pressed.&amp;nbsp;&lt;/small&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;center&quot;&gt;&lt;big&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/big&gt;&lt;img alt=&quot;Circuit&quot; height=&quot;306&quot; src=&quot;http://www.rentron.com/Files/firstfix.jpg&quot; style=&quot;padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px;&quot; width=&quot;400&quot; /&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;div align=&quot;left&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;table border=&quot;0&quot; style=&quot;width: 435px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td bgcolor=&quot;#8A8AFF&quot; colspan=&quot;2&quot; width=&quot;431&quot;&gt;&lt;div align=&quot;center&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;strong&gt;&lt;span style=&quot;color: white;&quot;&gt;&lt;small&gt;Bill of Materials&lt;/small&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td bgcolor=&quot;#F0F0F0&quot; width=&quot;108&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;b&gt;&lt;small&gt;Part Number&lt;/small&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;small&gt;R1&lt;br /&gt;
R2-R3&lt;br /&gt;
C1&lt;br /&gt;
C2&lt;br /&gt;
U1&lt;br /&gt;
U2&lt;br /&gt;
CR1-CR2&lt;br /&gt;
SW1&lt;br /&gt;
--&lt;br /&gt;
--&lt;br /&gt;
--&lt;/small&gt;&lt;br /&gt;
&lt;small&gt;Y1&lt;/small&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td bgcolor=&quot;#F0F0F0&quot; valign=&quot;top&quot; width=&quot;319&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;b&gt;&lt;small&gt;Value/Comments&lt;/small&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;small&gt;4.7K 0.25 Watt Resistor&lt;/small&gt;&lt;big&gt;&lt;br /&gt;
&lt;/big&gt;&lt;small&gt;220 Ohm 0.25 Watt Resistor&lt;/small&gt;&lt;big&gt;&lt;br /&gt;
&lt;/big&gt;&lt;small&gt;10 uF 25 Volt Electrolytic Capacitor&lt;/small&gt;&lt;big&gt;&lt;br /&gt;
&lt;/big&gt;&lt;small&gt;0.1 uF 16 Volt Tantalum Capacitor&lt;/small&gt;&lt;big&gt;&lt;br /&gt;
&lt;/big&gt;&lt;small&gt;78L05 Voltage Regulator&lt;/small&gt;&lt;big&gt;&lt;br /&gt;
&lt;/big&gt;&lt;small&gt;PIC16F84 Microcontroller&lt;/small&gt;&lt;big&gt;&lt;br /&gt;
&lt;/big&gt;&lt;small&gt;5 mm Red LEDs&lt;/small&gt;&lt;big&gt;&lt;br /&gt;
&lt;/big&gt;&lt;small&gt;&quot;Momentary On&quot; SPST Pushbutton&lt;/small&gt;&lt;big&gt;&lt;br /&gt;
&lt;/big&gt;&lt;small&gt;Prototype Card&lt;/small&gt;&lt;big&gt;&lt;br /&gt;
&lt;/big&gt;&lt;small&gt;Wiring&lt;/small&gt;&lt;big&gt;&lt;br /&gt;
&lt;/big&gt;&lt;small&gt;Power Supply (&amp;gt; 6 Volts if Voltage Regulator used)&lt;/small&gt;&lt;br /&gt;
&lt;small&gt;4MHz Ceramic Resonator (With Internal Capacitors)&lt;/small&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div align=&quot;left&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;small&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;b&gt;When I built the circuit, I put it on a spring loaded &quot;Breadboard&quot; as is shown at the top of the article. I was able to put on the Voltage regulator at one end of the breadboard with the &quot;red&quot; commoning bar as positive voltage and the blue bar as ground. I used a +12 Volt &quot;Wall Wart&quot; for powering my prototype, but this circuit could be powered by a 9 Volt Alkaline radio battery. As I pointed out in the earlier articles, three &quot;AA&quot; 1.5 Volt Alkaline batteries could be wired in series to provide power as well.&lt;/b&gt;&lt;/span&gt;&lt;/small&gt;&lt;/span&gt;&lt;/div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;small&gt;&lt;/small&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;div align=&quot;left&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;small&gt;&lt;b&gt;For my prototype, I used a 4 MHz &quot;Ceramic Resonator&quot; for clocking. For this circuit, the operating frequency is not important. If you haven&#39;t used a Ceramic Resonator before, I highly recommend that you look into them because they are a) easier to wire than a crystal and a couple of capacitors and b) are much more robust than a crystal, which means that you will be able to abuse them more and not loose your investment.&lt;/b&gt;&lt;/small&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;small&gt;&lt;b&gt;The LEDs are lit when the Microcontroller pins that they are connected to are pulled to ground. This is traditional in Microcontroller applications because in most devices, the &quot;0&quot; can &quot;sink&quot; more current than the &quot;1&quot; can &quot;source&quot;. The PICmicro is capable of sourcing enough current to drive an LED, but I prefer using the sink feature because this is the only way that the 8051 can light LEDs directly and this eliminates the need for me to convert mentally how applications work for different devices.&lt;/b&gt;&lt;/small&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;small&gt;&lt;b&gt;The button connection probably seems unreasonably simple because I have not provided a &quot;pull up&quot; for the switch to pull down. In the interests of keeping the circuit simple, I rely on the internal pull ups in &quot;PORTB&quot; of the PICMicro to provide this function for me. A 4.7K Resistor connected between Vdd and the PICMicro&#39;s I/O pin could also be used if the internal pull ups are not used.&lt;/b&gt;&lt;/small&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;small&gt;&lt;b&gt;There is one point to make about the layout that you should always keep in mind when developing a circuit with a microcontroller or other programmable device; you should always design the circuit in such a way that the chip can be pulled easily. This means that there should be space at either end for prying the chip up out of its socket or, as I like to do, slide a small screwdriver underneath the PICMicro and &quot;pop&quot; it up simply by twisting it. I know a lot of people that end up cursing themselves because they&#39;ve forgotten to remember this basic operation. In keeping with this theme, when using a &quot;breadboard&quot;, I like to put in a connection between the row of holes&amp;nbsp;&lt;em&gt;above&lt;/em&gt;&amp;nbsp;the Microcontroller. This allows me to pull the part without having to figure out where it goes back each time.&lt;/b&gt;&lt;/small&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;small&gt;&lt;b&gt;The application code is quite simple and can be blocked out as:&lt;/b&gt;&lt;/small&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;pre&gt;&lt;span style=&quot;font-family: &#39;Andale Mono&#39;;&quot;&gt;main()              // First Application, Light 1st LED and 
{                   // Light 2nd LED when Button Pressed

 LED_1 = on;        // Turn on the 1st LED

 while ( 1 == 1 )   // Loop forever
 if ( Button == Pushed )
 LED_2 = on;
 else
 LED_2 = off;

}                   // End First Application

        &lt;big&gt;                 &lt;/big&gt;&lt;/span&gt;                              &lt;/pre&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;small&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;To provide this function, I created the PICMicro Assembly code:&amp;nbsp;&lt;/span&gt;&lt;/small&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;pre&gt;&lt;small&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;

 &lt;/span&gt;&lt;/small&gt;&lt;span style=&quot;font-family: &#39;Andale Mono&#39;;&quot;&gt;title  &quot;First Application - Light an LED and Poll a Button.&quot;
;
;  This Code Simply Lights an LED and polls a button and turns
;  on another LED when it is pressed.
;
;
;  Hardware Notes:
;   Reset is tied directly to Vcc and PWRT is Enabled.
;   The PIC is a 16F84 Running at any speed.
;   PortB.0 is Connected to a Button that pulls down to Ground when Pressed
;   PortB.1 is Connected to an LED which is Pulled to Ground (&quot;On&quot; LED)
;   PortB.2 is Connected to an LED which is Pulled to Ground (&quot;Button&quot; LED)
;
;   Myke Predko
;   99.05.18
;&lt;/span&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;
 &lt;big&gt; &lt;/big&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Andale Mono&#39;;&quot;&gt;LIST P=16F84, R=DEC
  errorlevel 0,-305
  INCLUDE &quot;p16f84.inc&quot;

;  Register Usage
 CBLOCK 0x00C                   ;  Start Registers at End of the Values
 ENDC


 PAGE
 __CONFIG _CP_OFF &amp;amp; _XT_OSC &amp;amp; _PWRTE_ON  &amp;amp; _WDT_OFF
                                ;  Note that the WatchDog Timer is OFF
;  First Application - Turn on LED and poll the Button.

  org    0

  movlw  0x0FD                  ;  Turn on LED on RB1 When Output Enabled
  movwf  PORTB

  bsf    STATUS, RP0
  bcf    TRISB ^ 0x080, 1       ;  Enable RB1 for Output
  bcf    TRISB ^ 0x080, 2       ;  Enable RB2 for Output
  movlw  0x07F                  ;  Enable Internal Pull-Ups
  movwf  OPTION_REG ^ 0x080
  bcf    STATUS, RP0

Loop

  btfsc  PORTB, 0               ;  Is the Button Pressed?
  goto  ButtonUp                ;   No, Light Off

  bcf    PORTB, 2               ;  Turn Light On

  goto   Loop

ButtonUp                        ;  Button Up, Turn Light Off

  bsf    PORTB, 2

  goto   Loop


  end

                         &lt;/span&gt;                              &lt;/pre&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;small&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666;&quot;&gt;This code can be downloaded by clicking&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: yellow;&quot;&gt;&lt;a href=&quot;http://www.rentron.com/Files/first.asm&quot; style=&quot;color: #861b8f; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;&quot;&gt;HERE&lt;/a&gt;.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666;&quot;&gt;The body of the assembler code should match the &quot;C&quot; pseudo code given above, but the initial code,&lt;/span&gt;&lt;/small&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: &#39;Andale Mono&#39;;&quot;&gt;&lt;small&gt;&lt;small&gt;&amp;nbsp;&amp;nbsp;&lt;/small&gt;&lt;/small&gt;&lt;br /&gt;
&lt;small&gt;&amp;nbsp; movlw&amp;nbsp; 0x0FD &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : &amp;nbsp; Turn on LED on RB1 When Output Enabled&lt;br /&gt;
&amp;nbsp; movwf&amp;nbsp; PORTB&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; bsf&amp;nbsp;&amp;nbsp;&amp;nbsp; STATUS, RP0&lt;br /&gt;
&amp;nbsp; bcf&amp;nbsp;&amp;nbsp;&amp;nbsp; TRISB ^ 0x080, 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; &amp;nbsp; Enable RB1 for Output&lt;br /&gt;
&amp;nbsp; bcf&amp;nbsp;&amp;nbsp;&amp;nbsp; TRISB ^ 0x080, 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; &amp;nbsp; Enable RB2 for Output&lt;br /&gt;
&amp;nbsp; movlw&amp;nbsp; 0x07F &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; &amp;nbsp; Enable Internal Pull-Ups&lt;br /&gt;
&amp;nbsp; movwf&amp;nbsp; OPTION_REG ^ 0x080&lt;br /&gt;
&amp;nbsp; bcf&amp;nbsp;&amp;nbsp;&amp;nbsp; STATUS, RP0&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;/small&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Arial;&quot;&gt;&lt;small&gt;is probably a bit confusing. To help explain what I have done, I wanted to explain a few things. The first is, in the PICMicro, upon power up, the &quot;TRIS&quot; (&quot;TRI-State Enable&quot; registers, which control the Input/Output operation of the PICmicro&#39;s I/O registers) have all their bits &quot;set&quot; (equal to &quot;1&quot;) which puts the I/O pins into &quot;input&quot; mode. To put the pins into &quot;output&quot; mode, I simply &quot;reset&quot; (make equal to &quot;0&quot;) the appropriate pins of the TRIS registers.&amp;nbsp;&lt;/small&gt;&lt;/span&gt;&lt;br /&gt;
&lt;small style=&quot;color: #666666;&quot;&gt;The TRIS (and &quot;Option&quot;) Registers are located in &quot;Bank 1&quot; of the PICMicro 16F84&#39;s register space. Instead of resetting individual bits, I could have written full bytes to the registers like:&lt;/small&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;pre&gt;&lt;span style=&quot;font-family: &#39;Andale Mono&#39;;&quot;&gt;  bsf    STATUS  RP0         ;  Point to &quot;Bank 1&quot;

  movlw  0x0F9               ;  Make RB1 and RB2 output
  movwf  TRISB ^ 0x080

  movlw  0x07F               ;  Enable the Internal Pull Ups
  movwf  OPTION_REG ^ 0x080 

  bcf    STATUS, RP0         ;  Return to &quot;Bank 0&quot;&lt;big&gt;

                         &lt;/big&gt;&lt;/span&gt;                              &lt;/pre&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;small&gt;This works just as well. When the PICMicro first boots up, the &quot;OPTION&quot; register has all its bits set (like the TRIS registers) which means that to just enable the internal pull ups the instruction:&lt;/small&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;pre&gt;&lt;span style=&quot;font-family: &#39;Andale Mono&#39;;&quot;&gt;&lt;big&gt;  &lt;/big&gt;bcf    OPTION_REG ^ 0x080, 7
                         &lt;/span&gt;                              &lt;/pre&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;small&gt;could be used.&amp;nbsp;&lt;/small&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;small&gt;A common question from people just learning about the PICMicro and see other people&#39;s code is the use of &quot;^ 0x080&quot; when writing to &quot;Bank 1&quot; registers. In the mid-range PICMicros, up to 128 addresses can be accessed, which requires seven addressing bits. A byte is eight bits which leaves an additional bit for selecting between &quot;Bank 0&quot; and &quot;Bank 1&quot;. Because the TRIS and OPTION registers are in Bank 1, this bit is normally set in the register addresses in the Microchip provided register definition files.&amp;nbsp;&lt;/small&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;small&gt;If bit seven of the address is set with an instruction, then the MPLAB assembler returns a &quot;warning&quot; to the user. This warning can be masked out using the &quot;error&quot; directive (like I use in the code above), but the accepted way of eliminating this problem is to set &quot;RP0&quot; of the STATUS register (making accesses access Bank 1 registers) and then XOR (&quot;^&quot;) bit seven.&lt;/small&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;small&gt;The reason for this convention is to add the &quot;^ 0x080&quot; characters to all addressed instructions between the &quot;bsf STATUS, RP0&quot; and &quot;bcf STATUS, RP0&quot; instructions and if any registers which are&amp;nbsp;&lt;em&gt;not&lt;/em&gt;&amp;nbsp;in Bank 1 are accessed, the assembler will come back with a warning indicating that there is a register which is incorrectly accessed.&amp;nbsp;&lt;/small&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;small&gt;Another option is to use the &quot;TRIS&quot; and &quot;OPTION&quot; instructions which move the data bytes in the &quot;w&quot; (accumulator) register directly in to the TRIS and OPTION registers. Using these instructions would eliminate the need for the &quot;bsf/bcf STATUS, RP0&quot; instructions that I use above. The equivalent code would become:&lt;/small&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;pre&gt;&lt;span style=&quot;font-family: &#39;Andale Mono&#39;;&quot;&gt;  movlw  0x0F9   ;  Make RB1 and RB2 output
  TRIS   PORTB

  movlw  0x07F   ;  Enable the Internal Pull Ups
  OPTION 

                         &lt;/span&gt;                              &lt;/pre&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;small&gt;These instructions are carry overs into the &quot;mid-range&quot; architecture from the &quot;low-end&quot; PICMicro architecture and Microchip indicates that these instructions may disappear in future products. The only real disadvantage to using these instructions is that the contents of the TRIS and OPTION registers cannot be read back. There is some debate over whether or not the instructions will ever disappear, so whether or not you use them, is up to you.&amp;nbsp;&lt;/small&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;small&gt;To develop the application, I used &quot;MPLAB&quot;. If you haven&#39;t downloaded this excellent tool yet, then I highly recommend that you do so. Along with providing a simple &quot;Windows-style&quot; editor and and assembler, the tool also provides a source-code compatible simulator that is very easy to work with.&amp;nbsp;&lt;/small&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;div align=&quot;center&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;b&gt;&lt;img height=&quot;474&quot; src=&quot;http://www.rentron.com/Files/project.jpg&quot; style=&quot;padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px;&quot; width=&quot;685&quot; /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;small&gt;&lt;b&gt;Even though this application is quite simple, I did set up a &quot;watch&quot; window&quot; along with the &quot;asynchronous inputs&quot; to test out the application before I burned it into a 16F84.&lt;/b&gt;&lt;/small&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;small&gt;&lt;b&gt;Simulating an application before burning a part is probably the most effective way of ensuring the application will work when you first apply power to it. By simulating the application and testing out its function, you are eliminating one variable in the list of possible problems why an application won&#39;t work.&lt;/b&gt;&lt;/small&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;small&gt;&lt;b&gt;MPLAB is pretty easy to figure out how it works and includes a simple tutorial. If you are interested in learning more about it and how I work with it, please send me an email and I can answer the questions in a future article.&lt;/b&gt;&lt;/small&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;small&gt;&lt;b&gt;I wanted to end up this discussion on a developer&#39;s first application by discussing different ways the code could be written. I think I&#39;ve beaten the different ways of setting the TRIS and OPTION registers appropriately, but there is also a number of different ways in which the mainline code could be written.&lt;/b&gt;&lt;/small&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;small&gt;&lt;b&gt;For example, instead of:&lt;/b&gt;&lt;/small&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;pre&gt;&lt;span style=&quot;font-family: &#39;Andale Mono&#39;;&quot;&gt;Loop

  btfsc  PORTB, 0          ;  Is the Button Pressed?
  goto   ButtonUp          ;   No, Light Off

  bcf    PORTB, 2          ;  Turn Light On

  goto   Loop

ButtonUp                   ;  Button Up, Turn Light Off

  bsf    PORTB, 2

  goto   Loop

                         &lt;/span&gt;                              &lt;/pre&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;small&gt;which sets or resets the button state LED according to the button&#39;s state, I could have coded this section as:&lt;/small&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;pre&gt;&lt;span style=&quot;font-family: &#39;Andale Mono&#39;;&quot;&gt;Loop

  movf   PORTB, w          ;  Set/Reset RB2 According to Button
  iorlw  0x004

  btfss  PORTB, 0
  andlw  0x0FB             ;  Turn on the LED if the Button is Low

  movwf  PORTB

  goto   Loop

                         &lt;/span&gt;                              &lt;/pre&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;small&gt;Which executes in the same number of cycles for each loop (the original doesn&#39;t).&amp;nbsp;&lt;/small&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;small&gt;You might be tempted to simplify this to:&lt;/small&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;pre&gt;&lt;span style=&quot;font-family: &#39;Andale Mono&#39;;&quot;&gt;Loop

  bsf    PORTB, 2          ;  Set the Bit Assuming Button is up

  btfss  PORTB, 0
  bcf    PORTB, 2          ;  Reset the Bit if Button Pressed
  
  goto   Loop

                         &lt;/span&gt;                              &lt;/pre&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;small&gt;which will give you some interesting and probably unexpected results. Why don&#39;t you try it and figure out what is actually happening here?&amp;nbsp;&lt;/small&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;small&gt;In the PICMicro, like all programming situations, there are a lot of different ways to do something. My way of doing something is really my way, based on previous experiences and my way of thinking. Your way of thinking and previous experiences may be different and lead you to different or better ways of doing things. I highly recommend that when you start out in any new programming situation, that you try different ways of attacking a problem and writing your application code.&amp;nbsp;&lt;/small&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;small&gt;Not only will you learn much faster what is the best way to do things in a given situation but you will become an expert in finding problems much faster.&amp;nbsp;&lt;/small&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;small&gt;Just to follow up on last week&#39;s article about programmers and to show how an in-circuit programmer, such as my &quot;YAP&quot; can be of advantage. Using the YAP, Just the two LEDs and button have to be wired into the circuit because the YAP provides the &quot;core&quot; (power, clocking and reset) functions. This simplifies the circuit assembly by quite a bit as the following picture shows:&lt;/small&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;div align=&quot;center&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;b&gt;&lt;img alt=&quot;yap_ex.jpg (35591 bytes)&quot; height=&quot;357&quot; src=&quot;http://www.rentron.com/Files/yap_ex.jpg&quot; style=&quot;padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px;&quot; width=&quot;411&quot; /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;small&gt;&lt;b&gt;For this circuit, I was able to wire up the two LEDs, button and Vcc/Ground connections in literally two minutes. While this isn&#39;t a huge savings in effort (it probably took me ten minutes to wire the circuit into the bread board as shown at the top of this article), it does have the advantage of not requiring the developer to pull the device (and create a circuit which has access to be able to pull the device) every time they want to try something new (like I presented above). Unless you have a &quot;ZIF&quot; (&quot;Zero Insertion Force&quot;) socket, this operation can be tedious and potentially damaging to the chip. Because the &quot;YAP&quot; leaves the PICMicro in place, there is less opportunity for the PICMicro to be damaged.&lt;/b&gt;&lt;/small&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;small&gt;&lt;b&gt;The simple circuit and code that I&#39;ve shown here should really be the culmination of a lot of work. To get to this point, you should have become familiar with the following topics:&lt;/b&gt;&lt;/small&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;small&gt;&lt;b&gt;1. PICMicro device execution with power, clocking and reset&lt;br /&gt;
2. The PICMicro processor architecture and instruction operation&lt;br /&gt;
3. Code development tools and application simulating&lt;br /&gt;
4. device programming&lt;br /&gt;
5. PICMicro application debug&lt;/b&gt;&lt;/small&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;small&gt;&lt;b&gt;This is not a trivial amount of learning to do before you can develop your own application successfully. As well, depending on the complexity of the application, the amount of information to be worked through can be considerably more.&lt;/b&gt;&lt;/small&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;small&gt;&lt;b&gt;The circuit provided in this article can be used as a basis for other applications. For example, the execution &quot;core&quot; used, tested and wired in this circuit could be used for the LCD applications (the 2-wire interface and walking man) I presented in the first two articles.&lt;/b&gt;&lt;/small&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;h5 align=&quot;left&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;color: #330099; font-family: Arial, Arial, Helvetica;&quot;&gt;&lt;big&gt;&lt;span style=&quot;color: black; font-family: Arial;&quot;&gt;email Questions and Comments&lt;/span&gt;&lt;/big&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h5&gt;&lt;div align=&quot;left&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;small&gt;&lt;b&gt;I received a couple of questions and comments this week about my LCD articles that I wanted to discuss. The first is a pointer from the PICList about the operation of Hitachi 44780 based LCDs. In my article (and on my LCD web page), I indicated that the 44780 was level triggered and the &quot;E&quot; Strobe line (used to latch in data/start an LCD operation) had to be &quot;high&quot; (logic &quot;1&quot;) for at least 450 nsecs.&lt;/b&gt;&lt;/small&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;small&gt;&lt;b&gt;This seems to be not quite true. The comments both on the PICList and from Tom McGahee indicate that the Strobe is actually negative level (from &quot;high&quot; to &quot;low&quot;) active. This makes sense with the 2-wire LCD interface I presented a few weeks ago because when the least significant bit is set, then the &quot;E&quot; Strobe will be high without ever going low before the data is strobed in.&lt;/b&gt;&lt;/small&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;small&gt;&lt;b&gt;This information doesn&#39;t change the code presented for the 2-wire LCD interface, but helps explain why there isn&#39;t a problem. To be on the safe side, always make sure that there is a 450 nsec or more delay between a line changing state and the &quot;E&quot; Strobe going low.&lt;/b&gt;&lt;/small&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;small&gt;&lt;b&gt;The other question, from Marcelo Cesar Asti was based on the 2-wire LCD code and how to use the &quot;#DEFINE&quot; information to reset the TRIS register bits for the output bits. If you look at &quot;2wirelcd.asm&quot;, I &quot;hardcoded&quot; the TRIS bit writes with:&lt;/b&gt;&lt;/small&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;pre&gt;&lt;span style=&quot;font-family: &#39;Andale Mono&#39;;&quot;&gt;   movlw  0x01C                ;  Enable PA0 &amp;amp; PA1 for Output
   bsf    STATUS, RP0
   movwf  TRISA ^ 0x080
   bcf    STATUS, RP0
  
                         &lt;/span&gt;                              &lt;/pre&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;small&gt;This code will not allow the &quot;#DEFINES&quot; to be changed for arbitrary I/O bits to be used for the 2-wire LCD interface.&amp;nbsp;&lt;/small&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;small&gt;Instead, the code:&lt;/small&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;pre&gt;&lt;span style=&quot;font-family: &#39;Andale Mono&#39;;&quot;&gt;   bsf    STATUS, RP0
   bcf    Data                  ;  Clear the &quot;Data&quot; &amp;amp; &quot;Clock&quot; bits 
   bcf    Clock                 ;   in the TRIS Registers
   bcf    STATUS, RP0
&lt;/span&gt;&lt;/pre&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://microcontrollersdesign.blogspot.com/feeds/2159499470856781562/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://microcontrollersdesign.blogspot.com/2011/07/first-picmicro-project.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1617923873776016015/posts/default/2159499470856781562'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1617923873776016015/posts/default/2159499470856781562'/><link rel='alternate' type='text/html' href='http://microcontrollersdesign.blogspot.com/2011/07/first-picmicro-project.html' title='First PICMicro Project'/><author><name>T.sreedhar Reddy</name><uri>http://www.blogger.com/profile/11833688005891158344</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-1617923873776016015.post-1113288730101455452</id><published>2011-07-15T09:55:00.001-07:00</published><updated>2011-07-15T09:55:32.755-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="program for Dual DAC"/><category scheme="http://www.blogger.com/atom/ns#" term="RAMP wave in 8051"/><title type='text'>program for Dual DAC, RAMP wave in 8051</title><content type='html'>&lt;h3 class=&quot;post-title entry-title&quot; style=&quot;color: black; font-family: Arial, serif; font-size: 23px; font-weight: normal; line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0.25em; padding-bottom: 4px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/h3&gt;&lt;div class=&quot;post-header-line-1&quot; style=&quot;color: #333333; font-family: Arial, serif; font-size: 14px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;post-body entry-content&quot; style=&quot;color: #333333; font-family: Arial, serif; font-size: 14px; line-height: 1.6em; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: x-small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: tahoma, verdana, arial, helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;div class=&quot;para&quot; id=&quot;id7889851&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;#include &amp;lt;REG51xD2.H&amp;gt;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365017191&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;main()&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170369531944&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;{&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365044066&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;unsigned char i=0;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365119771&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;P0 = 0x00; /* P0 as Output port */&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7605562&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;while(1)&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365122149&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;{&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7398220&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;for(i=0;i&amp;lt;0xff;i++)&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7638347&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;{&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id8438365&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;P1 = i;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170366989798&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;P0 = i;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170369152190&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;}&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365064896&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;P0 = 0;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170365092613&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;P1 =0;&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id7323138&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;}&lt;/div&gt;&lt;div class=&quot;para&quot; id=&quot;id1170364873396&quot; style=&quot;display: block; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em;&quot;&gt;}&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://microcontrollersdesign.blogspot.com/feeds/1113288730101455452/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://microcontrollersdesign.blogspot.com/2011/07/program-for-dual-dac-ramp-wave-in-8051.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1617923873776016015/posts/default/1113288730101455452'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1617923873776016015/posts/default/1113288730101455452'/><link rel='alternate' type='text/html' href='http://microcontrollersdesign.blogspot.com/2011/07/program-for-dual-dac-ramp-wave-in-8051.html' title='program for Dual DAC, RAMP wave in 8051'/><author><name>T.sreedhar Reddy</name><uri>http://www.blogger.com/profile/11833688005891158344</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-1617923873776016015.post-4608139718372970840</id><published>2011-07-15T09:54:00.001-07:00</published><updated>2011-07-15T09:54:46.128-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PIC Microcontroller Programming"/><title type='text'>Demonstrate how to multiplex 64 LED&#39;s,</title><content type='html'>&lt;h2 class=&quot;title&quot; style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; line-height: 17px; margin-top: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-weight: normal; line-height: 18px;&quot;&gt;These tutorials demonstrate how to multiplex 64 LED&#39;s, arranged as a matrix of 8x8, we use one port to &#39;source&#39; the columns, and another port to &#39;sink&#39; the rows. So the Multiplex LED board requires two port connections, one for rows and one for columns - notice that NEITHER of these have the 0V or 5V pins connected, they aren&#39;t used at all. The technique of multiplexing allows you to individually access any one LED, or any combination of LED&#39;s, with just sixteen output pins.&lt;/span&gt;&lt;/h2&gt;&lt;div class=&quot;post-body entry-content&quot;&gt;&lt;div class=&quot;post-body entry-content&quot; id=&quot;post-body-5962821892988266735&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 1.4; width: 530px;&quot;&gt;&lt;br /&gt;
It&#39;s also worth noting that we&#39;re driving the LED&#39;s entirely from the PIC, which is why I chose 150 ohm current limiting resistors, this keeps the current down to within the PIC&#39;s individual pin limits, and also within the overall chip limits - but both are pushed pretty close!, this is done to get as much brightness as possible from the LED&#39;s, whilst minimising the component count on the board. Because of the current requirements the processor board MUST have a 7805 regulator, a 78L05 won&#39;t provide enough current.&lt;br /&gt;
&lt;br /&gt;
The technique used for the display is to show each section in turn, so we display row 1, then row 2, then row 3, and continue through the other five rows - as long as we do this fast enough you can&#39;t see any flickering - this obviously restricts what else the program can be doing, as we must refresh the display regularly enough to prevent visible flicker. As with the previous 7 segment multiplexing tutorial, I&#39;m again using timer driven interrupts in order to transparently refresh the LED matrix - and the code is basically very similar (and simply modified from it).&lt;br /&gt;
&lt;br /&gt;
The interrupts are generated by Timer2, which is set to give an interrupt roughly every 16mS. Interrupts in a PIC cause the program to stop what it&#39;s doing, save it&#39;s current location, and jump to the &#39;Interrupt Vector&#39; - which on a PIC is address 0x0004. The interrupt routine then does what it needs to do and exits using the &#39;REFIE&#39; (REturn From IntErrupt) command - this works rather like a normal &#39;RETURN&#39; in that it returns the program to where it was when the interrupt was called. An important point to bear in mind when using interrupts is that you mustn&#39;t change anything the main program is using - for that reason the first thing we must do is save various resisters - the W register, the PCLATH register, and the STATUS register - these are saved in data registers allocated for their use, and are restored before the routine exits via &#39;RETFIE&#39;.&lt;br /&gt;
&lt;br /&gt;
The interrupt routine is shown below, the first 5 lines save the registers mentioned above, the &#39;swapf&#39; command is used as it doesn&#39;t affect the STATUS register, there&#39;s not much point saving the register if we&#39;ve already changed it!. Next we check is the interrupt was generated by the timer or not, in this case we&#39;re only using one interrupt source (TIMER2) - but often you may be using multiple interrupt sources, if it&#39;s not TIMER2 we simply jump to the EXIT routine, which restores the registers saved and exits via RETFIE.&lt;br /&gt;
&lt;br /&gt;
Now we start the actual interrupt routine itself, the first thing we have to do is reset TIMER2 - once it&#39;s triggered an interrupt it turns itself off, so we turn it back on here (bcf PIR1,TMR2IF). Next we start our display routine, first we need to find out which display we&#39;re updating - in this case we&#39;re selecting one of eight display ROWS in turn, we do this by simply checking which was the previous display (using seven &#39;btfss&#39; instructions, with each one jumping to a different routine to set the new ROW to be displayed) - I originally tried to do this directly using the PORT register, but it didn&#39;t really work, so I added a GPR (row_pos) which I use to store the position. We only need seven tests, because if those seven fail it MUST be the eighth one that was the previous row. The actual values for the eight columns are stored in the variables &#39;zero&#39;, &#39;one&#39;, &#39;two&#39; etc. Each of the eight row display routines (Do_Zero etc.) first turns OFF the previous row, which will blank the complete display, then preload the column data from the respective register. Lastly it turns that row ON, to display the data for that row. There&#39;s probably no need to blank the display before displaying the new row?, but it ensures that only one row at a time is ever displayed - and it only costs 400nS extra time with a 20MHz clock.&lt;br /&gt;
&lt;br /&gt;
; Interrupt vector&lt;br /&gt;
&lt;br /&gt;
ORG 0x0004&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
INT&lt;br /&gt;
movwf w_temp ; Save W register&lt;br /&gt;
swapf STATUS,W ; Swap status to be saved into W&lt;br /&gt;
movwf s_temp ; Save STATUS register&lt;br /&gt;
movfw PCLATH&lt;br /&gt;
movwf p_temp ; Save PCLATH&lt;br /&gt;
&lt;br /&gt;
btfss PIR1,TMR2IF ; Flag set if TMR2 interrupt&lt;br /&gt;
goto INTX ; Jump if not timed out&lt;br /&gt;
&lt;br /&gt;
; Timer (TMR2) timeout every 16 milliseconds&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
bcf PIR1,TMR2IF ; Clear the calling flag&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
btfss row_pos, 0 ;check which ROW was last&lt;br /&gt;
goto Do_One&lt;br /&gt;
btfss row_pos, 1 ;check which ROW was last&lt;br /&gt;
goto Do_Two&lt;br /&gt;
btfss row_pos, 2 ;check which ROW was last&lt;br /&gt;
goto Do_Three&lt;br /&gt;
btfss row_pos, 3 ;check which ROW was last&lt;br /&gt;
goto Do_Four&lt;br /&gt;
btfss row_pos, 4 ;check which ROW was last&lt;br /&gt;
goto Do_Five&lt;br /&gt;
btfss row_pos, 5 ;check which ROW was last&lt;br /&gt;
goto Do_Six&lt;br /&gt;
btfss row_pos, 6 ;check which ROW was last&lt;br /&gt;
goto Do_Seven&lt;br /&gt;
&lt;br /&gt;
Do_Zero movlw 0xFF&lt;br /&gt;
movwf ROW_PORT ;turn off all rows&lt;br /&gt;
movwf row_pos&lt;br /&gt;
movf zero, w&lt;br /&gt;
movwf COL_PORT ;load columns&lt;br /&gt;
bcf row_pos, 0&lt;br /&gt;
bcf ROW_PORT, 0 ;turn ON row zero&lt;br /&gt;
goto INTX&lt;br /&gt;
&lt;br /&gt;
Do_One movlw 0xFF&lt;br /&gt;
movwf ROW_PORT ;turn off all rows&lt;br /&gt;
movwf row_pos&lt;br /&gt;
movf one, w&lt;br /&gt;
movwf COL_PORT ;load columns&lt;br /&gt;
bcf row_pos, 1&lt;br /&gt;
bcf ROW_PORT, 1 ;turn ON row one&lt;br /&gt;
goto INTX&lt;br /&gt;
&lt;br /&gt;
Do_Two movlw 0xFF&lt;br /&gt;
movwf ROW_PORT ;turn off all rows&lt;br /&gt;
movwf row_pos&lt;br /&gt;
movf two, w&lt;br /&gt;
movwf COL_PORT ;load columns&lt;br /&gt;
bcf row_pos, 2&lt;br /&gt;
bcf ROW_PORT, 2 ;turn ON row two&lt;br /&gt;
goto INTX&lt;br /&gt;
&lt;br /&gt;
Do_Three movlw 0xFF&lt;br /&gt;
movwf ROW_PORT ;turn off all rows&lt;br /&gt;
movwf row_pos&lt;br /&gt;
movf three, w&lt;br /&gt;
movwf COL_PORT ;load columns&lt;br /&gt;
bcf row_pos, 3&lt;br /&gt;
bcf ROW_PORT, 3 ;turn ON row three&lt;br /&gt;
goto INTX&lt;br /&gt;
&lt;br /&gt;
Do_Four movlw 0xFF&lt;br /&gt;
movwf ROW_PORT ;turn off all rows&lt;br /&gt;
movwf row_pos&lt;br /&gt;
movf four, w&lt;br /&gt;
movwf COL_PORT ;load columns&lt;br /&gt;
bcf row_pos, 4&lt;br /&gt;
bcf ROW_PORT, 4 ;turn ON row four&lt;br /&gt;
goto INTX&lt;br /&gt;
&lt;br /&gt;
Do_Five movlw 0xFF&lt;br /&gt;
movwf ROW_PORT ;turn off all rows&lt;br /&gt;
movwf row_pos&lt;br /&gt;
movf five, w&lt;br /&gt;
movwf COL_PORT ;load columns&lt;br /&gt;
bcf row_pos, 5&lt;br /&gt;
bcf ROW_PORT, 5 ;turn ON row five&lt;br /&gt;
goto INTX&lt;br /&gt;
&lt;br /&gt;
Do_Six movlw 0xFF&lt;br /&gt;
movwf ROW_PORT ;turn off all rows&lt;br /&gt;
movwf row_pos&lt;br /&gt;
movf six, w&lt;br /&gt;
movwf COL_PORT ;load columns&lt;br /&gt;
bcf row_pos, 6&lt;br /&gt;
bcf ROW_PORT, 6 ;turn ON row six&lt;br /&gt;
goto INTX&lt;br /&gt;
&lt;br /&gt;
Do_Seven movlw 0xFF&lt;br /&gt;
movwf ROW_PORT ;turn off all rows&lt;br /&gt;
movwf row_pos&lt;br /&gt;
movf seven, w&lt;br /&gt;
movwf COL_PORT ;load columns&lt;br /&gt;
bcf row_pos, 7&lt;br /&gt;
bcf ROW_PORT, 7 ;turn ON row seven&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
INTX&lt;br /&gt;
movfw p_temp&lt;br /&gt;
movwf PCLATH ; Restore PCLATH&lt;br /&gt;
swapf s_temp,W&lt;br /&gt;
movwf STATUS ; Restore STATUS register - restores bank&lt;br /&gt;
swapf w_temp,F&lt;br /&gt;
swapf w_temp,W ; Restore W register&lt;br /&gt;
retfie&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The interrupt routine above is complete and working, but it requires TIMER2 setting up before it can work, this is done in the &#39;Initialise&#39; section of the program, which is the first section called when the program runs. This first turns the analogue inputs off, then sets the direction registers for the Ports to all outputs, then sets TIMER2 to the correct time, you will notice there&#39;s two lines (with one commented out) for setting the value of T2CON - if you comment out the second one, and use the first one, it makes the interrupt routine timing too slow - you can actually see the digits flickering, first one then the other - worth doing so you can see what&#39;s going on. After that we set up PR2, this sets the value that the timer counts to before it times out - then we enable TIMER2 interrupts by setting the TMR2IE flag in register PIE1. This still isn&#39;t enough, so finally we write to the INTCON register to enable &#39;Peripheral Interrupts&#39; and &#39;Global Interrupts&#39;.&lt;br /&gt;
&lt;br /&gt;
Initialise BANKSEL ADCON1 ;disable analogue inputs&lt;br /&gt;
movlw 0x06&lt;br /&gt;
movwf ADCON1&lt;br /&gt;
BANKSEL PORTA&lt;br /&gt;
bsf STATUS, RP0 ;select bank 1&lt;br /&gt;
movlw b&#39;00000000&#39; ;Set port data directions, data output&lt;br /&gt;
movwf ROW_TRIS&lt;br /&gt;
movwf COL_TRIS&lt;br /&gt;
bcf STATUS, RP0 ;select bank 0&lt;br /&gt;
&lt;br /&gt;
clrf COL_PORT ;turn OFF all LED&#39;s&lt;br /&gt;
movlw 0xFF&lt;br /&gt;
movwf ROW_PORT&lt;br /&gt;
&lt;br /&gt;
call Clear ;clear display registers&lt;br /&gt;
&lt;br /&gt;
; Set up Timer 2.&lt;br /&gt;
&lt;br /&gt;
;movlw b&#39;01111110&#39; ; Post scale /16, pre scale /16, TMR2 ON&lt;br /&gt;
movlw b&#39;00010110&#39; ; Post scale /4, pre scale /16, TMR2 ON&lt;br /&gt;
movwf T2CON&lt;br /&gt;
&lt;br /&gt;
bsf STATUS, RP0 ;select bank 1&lt;br /&gt;
&lt;br /&gt;
movlw .249 ; Set up comparator&lt;br /&gt;
movwf PR2&lt;br /&gt;
&lt;br /&gt;
bsf PIE1,TMR2IE ; Enable TMR2 interrupt&lt;br /&gt;
&lt;br /&gt;
bcf STATUS, RP0 ;select bank 0&lt;br /&gt;
&lt;br /&gt;
; Global interrupt enable&lt;br /&gt;
&lt;br /&gt;
bsf INTCON,PEIE ; Enable all peripheral interrupts&lt;br /&gt;
bsf INTCON,GIE ; Global interrupt enable&lt;br /&gt;
&lt;br /&gt;
bcf STATUS, RP0 ;select bank 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is the main section of the first program, as you can see there&#39;s not a great deal to it, all it does it display a &#39;square&#39; using the outer layer of LED&#39;s, delay 1 second, then &#39;invert&#39; the display (make lit ones dark, and dark ones lit), and delay a further second, then loop back, this give a simple flashing square pattern on the display. As with the previous interrupt multiplexing tutorial, the display function is handled totally transparently by the interrupt routine - all we need to do is place the values required in the eight display data registers.&lt;br /&gt;
&lt;br /&gt;
Main call Square ;display a square&lt;br /&gt;
call Delay1Sec&lt;br /&gt;
call Invert ;and clear it&lt;br /&gt;
call Delay1Sec&lt;br /&gt;
goto Main ;endless loop&lt;br /&gt;
&lt;br /&gt;
Tutorial 13.1&lt;br /&gt;
&lt;br /&gt;
This tutorial flashes an inverting &#39;square&#39; at 1 second intervals. To display a pattern, we simply write it to the eight data registers, zero is the bottom line, and seven is the top. To invert the display we simple XOR the display registers with 0xFF.&lt;br /&gt;
&lt;br /&gt;
Tutorial 13.2&lt;br /&gt;
&lt;br /&gt;
Where the previous tutorial used just eight display registers, this second one uses two sets of eight - one is the same as before (the actual registers which get displayed), the second is a duplicate set - labelled zero1 to seven 1. This allows a range of simple effects by changing from one to the other, and this tutorial gives routines for scrolling in all four directions, and displaying numeric digits. The code presented scrolls the digits 0 to 9 from left to right, right to left, bottom to top, and top to bottom, on the display. It&#39;s pretty obvious how the other routines can be used, just load the second set of registers, and call them as you wish. Here&#39;s a 20 second video clip of the scrolling in action LED1.WMV&lt;br /&gt;
&lt;br /&gt;
Tutorial 13.3&lt;br /&gt;
&lt;br /&gt;
Following on from the previous tutorial, this one adds the rest of the ASCII character set, including upper and lower case letters. The fonts used is based on the Hitachi text LCD character set - but as I&#39;ve an extra line I&#39;ve added true descenders on those characters which have them. Rather then the previous simple method of storing the character maps, this tutorial stores them in a large table - as the table exceeds the normal 256 byte table limit, we use an extended 16 bit table to provide sufficient room for all the data, this also overcomes the 256 byte boundary problem. The tutorial itself simply scrolls the entire character set (starting with a space) from left to right.&lt;br /&gt;
&lt;br /&gt;
Tutorial 13.4&lt;br /&gt;
&lt;br /&gt;
This is tutorial 13.3 with an extra table added, which is used to store a string to be displayed - the string scrolls across the display from right to left, the string can easily be changed, and as before is stored as a large table - you just need to add a 0x00 at the end to signify the end of the string.&lt;div style=&quot;clear: both;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;post-body entry-content&quot; id=&quot;post-body-5962821892988266735&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 1.4; width: 530px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;post-body entry-content&quot; id=&quot;post-body-5962821892988266735&quot; style=&quot;width: 530px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 11px; line-height: 17px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;post-footer&quot; style=&quot;border-bottom-color: rgb(183, 183, 183); border-bottom-style: dotted; border-bottom-width: 1px; color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; letter-spacing: 0em; line-height: 1.6; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 1.5em;&quot;&gt;&lt;div class=&quot;post-footer-line post-footer-line-1&quot;&gt;&lt;span class=&quot;post-icons&quot;&gt;&lt;/span&gt;&lt;div class=&quot;post-share-buttons goog-inline-block&quot; style=&quot;display: inline-block; margin-bottom: 0px !important; margin-left: 0.5em !important; margin-right: 0.5em !important; margin-top: 0px !important; position: relative; vertical-align: middle;&quot;&gt;&lt;span class=&quot;share-button-link-text&quot; style=&quot;display: block; text-indent: -9999px;&quot;&gt;Email This&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://microcontrollersdesign.blogspot.com/feeds/4608139718372970840/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://microcontrollersdesign.blogspot.com/2011/07/demonstrate-how-to-multiplex-64-leds_15.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1617923873776016015/posts/default/4608139718372970840'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1617923873776016015/posts/default/4608139718372970840'/><link rel='alternate' type='text/html' href='http://microcontrollersdesign.blogspot.com/2011/07/demonstrate-how-to-multiplex-64-leds_15.html' title='Demonstrate how to multiplex 64 LED&#39;s,'/><author><name>T.sreedhar Reddy</name><uri>http://www.blogger.com/profile/11833688005891158344</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>