tag:blogger.com,1999:blog-4510148070990310442024-03-06T08:31:18.093+05:30EMBEDDED-HUBanjaneyulu rajulapatihttp://www.blogger.com/profile/06736742435547008896noreply@blogger.comBlogger12125tag:blogger.com,1999:blog-451014807099031044.post-65371513215467332632016-11-07T12:18:00.001+05:302016-11-07T13:00:28.095+05:30NUMBER SYSTEMS <div dir="ltr" style="text-align: left;" trbidi="on">
<h2 style="text-align: left;">
<span style="color: red;"> NUMBER SYSTEM :-</span></h2>
<h3 style="text-align: left;">
<ul style="text-align: left;">
<li> Number system is defined as the magnitude of any quantity.</li>
<li> We have four Number system techniques.</li>
</ul>
<div>
<ol style="text-align: left;">
<li>Binary Number system</li>
<li>Octal Number system</li>
<li>Decimal Number system </li>
<li>Hexa decimal Number system</li>
</ol>
<div>
<ul style="text-align: left;">
<li>Base / Radix is Nothing but the value. Generally it's represents the number of digits / Symbols are used in the number system.</li>
<li>Any number system starts { 0} and ends with { r-1} .</li>
<li>"r " represents base / radix of a number system.</li>
</ul>
<div>
<span style="color: red;"><br /></span></div>
</div>
</div>
<div>
<span style="color: red;">BINARY NUMBER SYSTEM :-</span></div>
<div>
<ul style="text-align: left;">
<li>Generally the <span style="font-size: 18.72px;"> base of </span>Binary number system is 2.</li>
</ul>
<div>
i.e r=2</div>
</div>
<div>
<ul style="text-align: left;">
<li>So In Binary number system we are used only two digits. </li>
</ul>
<div>
i.e { 0, 1 }</div>
</div>
<div>
<br /></div>
<div>
<span style="color: red;">OCTAL NUMBER SYSTEM :-</span></div>
<div>
<br /></div>
<div>
</div>
</h3>
<h3>
<div>
<ul>
<li>Generally the <span style="font-size: 18.72px;"> base of </span>Octal number system is 8.</li>
</ul>
<div>
i.e r=8</div>
</div>
<div>
<ul>
<li>So In Binary number system we are used only eight digits. </li>
</ul>
<div>
i.e { 0, 1, 2, 3, 4, 5, 6, 7 }</div>
</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<span style="color: red;">DECIMAL NUMBER SYSTEM :-</span></div>
<div>
<br /></div>
<div>
</div>
</h3>
<h3>
<div>
<ul>
<li>Generally the <span style="font-size: 18.72px;"> base of </span>Decimal number system is 10.</li>
</ul>
<div>
i.e r=10</div>
</div>
<div>
<ul>
<li>So In Binary number system we are used only ten digits. </li>
</ul>
<div>
i.e { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }</div>
</div>
<div>
<br /></div>
<div>
<span style="color: red;">HEXA DECIMAL NUMBER SYSTEM :-</span></div>
<div>
<br /></div>
<div>
</div>
</h3>
<h3>
<div>
<ul>
<li>Generally the <span style="font-size: 18.72px;"> base of Hexa </span>Decimal number system is 16.</li>
</ul>
<div>
i.e r=16</div>
</div>
<div>
<ul>
<li>So In Binary number system we are used only sixteen digits. After 9 we are used Alphabets {A, B, C, D, E, F / a, b, c, d, e, f } </li>
</ul>
<div>
i.e { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, <span style="font-size: 18.72px;">A, B, C, D, E, F</span> }<br />
<br />
<br />
<h2 style="text-align: left;">
<span style="color: red;"> NUMBER SYSTEM CONVERSIONS</span></h2>
<h3 style="text-align: left;">
<span style="color: magenta;">DECIMAL TO ANY OTHER NUMBER SYSTEM</span></h3>
</div>
</div>
<div>
<div>
It having the algorithm for this one we can follow below steps</div>
</div>
<div>
<ol style="text-align: left;">
<li>Divide the decimal number to be converted by the value of base / radix</li>
<li>Get the remainder from step-1 and kept right side and quotient kept down of the decimal value</li>
<li>Divide the quotient of the previous divided by new base </li>
<li>Repeat the step- 3 when the quotient is less than the new base number</li>
<li>finally all the remainder come together form a number. It is a required number system of a number.</li>
</ol>
<div>
<span style="color: red;"><br /></span></div>
</div>
<div>
<span style="color: red;">DECIMAL TO BINARY NUMBER SYSTEM : -</span></div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxHzKMkoLcYV0CUng8HlgkkdOe5c1s9VxBuK4SLQwWkvh3pyhfHP-WkUwPq5bxyuD95olbBwFwVU3SE2q_DJLQK91FCU6xWmFf3wCYB2eUX9pMbJyzzfba2uWi8WNdGh7tqp6ob3am_ORX/s1600/dtob.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxHzKMkoLcYV0CUng8HlgkkdOe5c1s9VxBuK4SLQwWkvh3pyhfHP-WkUwPq5bxyuD95olbBwFwVU3SE2q_DJLQK91FCU6xWmFf3wCYB2eUX9pMbJyzzfba2uWi8WNdGh7tqp6ob3am_ORX/s640/dtob.jpg" width="640" /></a></div>
<div>
<br /></div>
<div>
<br />
<span style="color: red;">DECIMAL TO OCTAL NUMBER SYSTEM :-</span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj257Pvkw1EP7kA_17btxpIYZMaYIJhIjaocC3dHAhw6c09ijAHaW-9j6Ig1XtmUjvTYnuzpJIeyGnurwb24PJZzK5SFPuv7wCaL2MoUnNuAmrQfjIAu9L8B6yo5OFe2OmeLU01Umvhe7KG/s1600/dtoo.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj257Pvkw1EP7kA_17btxpIYZMaYIJhIjaocC3dHAhw6c09ijAHaW-9j6Ig1XtmUjvTYnuzpJIeyGnurwb24PJZzK5SFPuv7wCaL2MoUnNuAmrQfjIAu9L8B6yo5OFe2OmeLU01Umvhe7KG/s640/dtoo.jpg" width="640" /></a></div>
<br /></div>
</h3>
<h3>
<div>
</div>
<div>
<span style="color: red;"><br /></span>
<span style="color: red;">DECIMAL TO HEXA DECIMAL NUMBER SYSTEM : -</span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVChwmfM6U3mVKI5cO7eiptqGKwLVCyjsp7UJnGipXHWFuQn9z5EozugKlOHzVk3q4HlfRbNjNA2T6RfVNcsBLn9qVT8tYkIygfp7MyQVMuQ23bQg-4Q0KaECU-pbQxvQRgS8u4ZLVmh7L/s1600/dtoh.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVChwmfM6U3mVKI5cO7eiptqGKwLVCyjsp7UJnGipXHWFuQn9z5EozugKlOHzVk3q4HlfRbNjNA2T6RfVNcsBLn9qVT8tYkIygfp7MyQVMuQ23bQg-4Q0KaECU-pbQxvQRgS8u4ZLVmh7L/s640/dtoh.jpg" width="640" /></a></div>
<br />
<br /></div>
</h3>
</div>
anjaneyulu rajulapatihttp://www.blogger.com/profile/06736742435547008896noreply@blogger.com0tag:blogger.com,1999:blog-451014807099031044.post-65866164700695874472016-11-05T17:20:00.002+05:302016-11-05T17:21:59.874+05:30EMBEDDED SYSTEMS <div dir="ltr" style="text-align: left;" trbidi="on">
<h2 style="text-align: left;">
<span style="color: #cc0000;">Embedded Systems : -</span></h2>
<h3 style="text-align: left;">
Embedded Systems is Nothing but the Hardware</h3>
<h3 style="text-align: left;">
components works by using Software and it is used to a specific task only, not</h3>
<h3 style="text-align: left;">
for multiple tasks. </h3>
<div>
<br /></div>
<h2 style="text-align: left;">
<span style="color: red;">Applications : -</span></h2>
<div>
<br /></div>
<h3 style="text-align: left;">
<ul style="text-align: left;">
<li>Automatic Home Applications</li>
<li>Industrial Applications</li>
<li>Medical Applications</li>
<li>Agriculture Applications</li>
<li>Rockets etc</li>
</ul>
<div>
<br /></div>
<div>
<span style="color: red;">Languages used to write the software on Hardware:- </span></div>
<div>
<br /></div>
<div>
<ul style="text-align: left;">
<li>Mostly Embedded C</li>
<li>Embedded C++</li>
<li>Embedded Java</li>
<li>Embedded .Net</li>
<li>Python</li>
<li>Perl</li>
<li>Mat Lab </li>
</ul>
<div>
</div>
</div>
<div>
<span style="color: red;">Hardware Required :-</span></div>
<div>
<br /></div>
<div>
<ul style="text-align: left;">
<li>Micro Controller Or Micro Processor </li>
<li>ICs (Integrated Circuits )</li>
<li>Encoders / Decoders </li>
<li>Resisters , Capacitors </li>
<li>Logic gates , Diodes </li>
<li>ADC /DAC</li>
<li>Sensors </li>
<li>Drivers</li>
</ul>
<div>
<br /></div>
</div>
<div>
<br /></div>
<div>
<span style="color: red;">Characteristics Of An Embedded Systems:-</span></div>
<div>
<br /></div>
<div>
<ul style="text-align: left;">
<li><span style="color: blue;">Single Function Task</span></li>
</ul>
<div>
An Embedded System is designed for a specific Task Only. For a example Washing Machine always wash the cloths only.</div>
<ul style="text-align: left;">
<li><span style="color: blue;">Micro Processor Based </span></li>
</ul>
<div>
Embedded System is must be Micro processor Or Micro Controller Based only. Because Software Born into Micro processor or Micro Controller only.</div>
</div>
<div>
<br /></div>
<div>
<ul style="text-align: left;">
<li>Memory is Required for storing the software in the hardware . Mostly ROM Is store the Software.</li>
</ul>
<div>
<br /></div>
</div>
</h3>
<h3 style="text-align: left;">
<span style="color: red;">Advantages:-</span></h3>
<div>
<br /></div>
<div>
<h3 style="text-align: left;">
</h3>
<h4 style="text-align: left;">
</h4>
<h4 style="text-align: left;">
<ul style="text-align: left;">
<li>Low Power is Required </li>
</ul>
<ul style="text-align: left;">
<li>Low Cost</li>
</ul>
<ul style="text-align: left;">
<li>Performance is High</li>
</ul>
</h4>
<div>
<br /></div>
</div>
<h3 style="text-align: left;">
<span style="color: red;">Dis Advantages :-</span></h3>
<div>
<br /></div>
<div>
<h4 style="text-align: left;">
<ul style="text-align: left;">
<li>Time is more required to market</li>
</ul>
<ul style="text-align: left;">
<li>High effort (Man Power )</li>
</ul>
</h4>
</div>
<div>
<br /></div>
<div>
<br /></div>
<h3 style="text-align: left;">
</h3>
</div>
anjaneyulu rajulapatihttp://www.blogger.com/profile/06736742435547008896noreply@blogger.com0tag:blogger.com,1999:blog-451014807099031044.post-18738305949341140042016-10-25T19:02:00.002+05:302016-10-25T19:02:22.323+05:30POINTERS IN C<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="color: red;">USES OF POINTERS:-</span><br />
<br />
<ul style="text-align: left;">
<li>Dynamic Memory Allocation ( D M A)</li>
<li> A Function can return more than one value</li>
<li>Implementing data structures</li>
<li>call by reference is possible by pointer</li>
</ul>
<div>
<br /></div>
<div>
<span style="color: red;">ADDRESS OPERATOR:- ( &)</span></div>
<div>
<span style="color: red;"><br /></span></div>
<div>
In C '&' is an address operator. Which returns address of a variables.</div>
<div>
<br /></div>
<div>
Ex: -</div>
<div>
<br /></div>
<div>
int a ;</div>
<div>
<br /></div>
<div>
a is integer type of variable. </div>
<div style="text-align: left;">
<br /></div>
<div>
&a means address of a variable a.</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<span style="color: red;"><b>/* Program for printing address of a variable */</b></span></div>
<div>
<span style="color: red;"><b><br /></b></span></div>
<div>
<br /></div>
<div>
<b>#include<stdio.h></b></div>
<div>
<b> void main( )</b></div>
<div>
<b> {</b></div>
<div>
<b><br /></b></div>
<div>
<b> int a;</b></div>
<div>
<b> printf("enter a value\n ");</b></div>
<div>
<b> scanf("%d",&a);</b></div>
<div>
<b> printf("the variable a have =%d", a);</b></div>
<div>
<b> printf("the address of a is =%p",&a);</b></div>
<div>
<b> </b></div>
<div>
<b> }</b></div>
<div>
<b><br /></b></div>
<div>
<span style="color: red;"><b>POINTER VARIABLE:-</b></span></div>
<div>
<span style="color: red;"><b><br /></b></span></div>
<div>
<b> Pointer variables is also same as a normal variables. But the only difference is <span style="background-color: #0c343d;"><span style="color: red;">normal variables holds the values or data.</span><span style="color: white;"> But</span> <span style="color: red;">the pointer variables holds the </span></span></b></div>
<div>
<b><span style="background-color: #0c343d;"><span style="color: red;">address of another same type of variable.</span></span></b></div>
<div>
<span style="color: red;"><b><br /></b></span></div>
<div>
<b>Syntax:-</b></div>
<div>
<b><br /></b></div>
<div>
<b style="background-color: white;"> Datatype * pointer_variable_name;</b></div>
<div>
<b style="background-color: white;"><br /></b></div>
<div>
<b style="background-color: white;">Ex:-</b></div>
<div>
<b style="background-color: white;"><br /></b></div>
<div>
<b style="background-color: white;"> int *ptr;</b></div>
<div>
<b style="background-color: white;"> char *ch;</b></div>
<div>
<b>float *f;</b></div>
<div>
<b><br /></b></div>
<blockquote class="tr_bq" style="text-align: left;">
<ul style="text-align: left;">
<li><b>Asterisk " * " is an indirection operation, which can read as " values at the address ". Its nothing but a dereferencing a value.</b></li>
</ul>
</blockquote>
<span style="color: red;"><b>/* Program for dereferencing a value*/</b></span><br />
<br />
<b>#include<stdio.h></b><br />
<b>void main( )</b><br />
{<br />
<b>int a; </b><br />
<b> printf("enter a value\n");</b><br />
<b> scanf("%d",&a);ekrnfkj</b><br />
<b> printf("the value of a=%d",a);</b><br />
<b> </b><b>printf("the value of a=%p",&a);</b><br />
<b> </b><b>printf("the value of a=%d",*(&a));</b><br />
<b> }</b><br />
<br />
<div style="text-align: left;">
<span style="color: red;"><b>Assigning a variable address to a pointer variable:-</b></span></div>
<div style="text-align: left;">
<span style="color: red;"><b><br /></b></span></div>
<div style="text-align: left;">
<b> Address of a variable is assigned to a pointer variable by using assignment operator.</b></div>
<div style="text-align: left;">
<b><br /></b></div>
<div style="text-align: left;">
<b>Ex:-</b></div>
<div style="text-align: left;">
<b><br /></b></div>
<div style="text-align: left;">
<b> int a;</b></div>
<div style="text-align: left;">
<b> int *ptr; </b></div>
<div style="text-align: left;">
<b><br /></b></div>
<div style="text-align: left;">
<b> ptr=&a;</b></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<b>here, the address of a variable a is assigned to a pointer variable ptr. </b></div>
<div style="text-align: left;">
<b><br /></b></div>
<div style="text-align: left;">
<b>i.e ptr holds the address of a;</b></div>
<div style="text-align: left;">
<b><br /></b></div>
<div style="text-align: left;">
<b><br /></b></div>
<div>
<br /></div>
<div>
<span style="color: red;"><b>// Program for how to hold the address of a variable</b></span></div>
<div>
<span style="color: red;"><b><br /></b></span></div>
<div>
<b>#include<stdio.h> </b></div>
<div>
<b>void main ( ) </b></div>
<div>
<b> {</b></div>
<div>
<b>int a,*ptr;</b></div>
<div>
<b>ptr=&a;</b></div>
<div>
<b>printf("enter a variable\n");</b></div>
<div>
<b>scanf("%d",&a);</b></div>
<div>
<b>printf("value of a =%d\n",a);</b></div>
<div>
<b>printf("value of ptr =%p\n",p);</b></div>
<div>
<b>printf("address of a =%p\n",&a);</b></div>
<div>
<b>printf("ptr pointing tthe value =%d\n",*ptr);</b></div>
<div>
<b>}</b></div>
</div>
anjaneyulu rajulapatihttp://www.blogger.com/profile/06736742435547008896noreply@blogger.com0tag:blogger.com,1999:blog-451014807099031044.post-1059485265086646302016-09-15T20:55:00.000+05:302016-09-15T20:55:16.749+05:30ENGINEERS DAY<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBTRQ41yGq6LkntxYsHtx6xeiRe9zQVNPk_K42V8yK_VGXcxZd0QglBa1mWbPH_eq1TNMfFsoYT5qeA6c6GtnXvs44Nb-BY7ukQLVMhT6UpFcfn_OyDoueU8PMmUMJ8bJv3dwYJ84_2G7f/s1600/Vishveshvarayya_in_his_30%2527s.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBTRQ41yGq6LkntxYsHtx6xeiRe9zQVNPk_K42V8yK_VGXcxZd0QglBa1mWbPH_eq1TNMfFsoYT5qeA6c6GtnXvs44Nb-BY7ukQLVMhT6UpFcfn_OyDoueU8PMmUMJ8bJv3dwYJ84_2G7f/s320/Vishveshvarayya_in_his_30%2527s.jpg" width="256" /></a></div>
<br />
<br />
<br />
MOKSHAGUNDAM VISVESVARAYA He was born on 15th september 1861. His birthday is<br />
<br />
celebrated as a ENGINEERS DAY as his memory . He was an INDIAN CIVIL Engineer. He was<br />
<br />
the chief engineer responsible for the construction of the krishna raja sagara dam in mysore. He<br />
<br />
was the president of the 1923 session of the INDIAN CONGRESS SCIENCE. So finally what i am<br />
<br />
saying that proud to be an INDIAN.<br />
<br />
<br /></div>
anjaneyulu rajulapatihttp://www.blogger.com/profile/06736742435547008896noreply@blogger.com0tag:blogger.com,1999:blog-451014807099031044.post-26644670312821098552015-09-10T21:31:00.000+05:302015-11-18T20:13:59.105+05:30INTERFACING LCD TO 8051<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 style="text-align: left;">
LCD (LIQUID CRYSTAL DISPLAY)</h2>
<div>
<br /></div>
<div>
<ul style="text-align: left;">
<li>This LCD Display the characters so we called as also CHARACTER LCD</li>
<li>If we give liquid. It is "1" for BLACKNESS, "0" for WHITENESS </li>
</ul>
<div>
BLACK=1</div>
</div>
<div>
WHITE=0</div>
<div>
<ul style="text-align: left;">
<li>We are using 16*2 LCD</li>
<li>By using this 16*2 LCD, we can display 16 characters in 2 lines</li>
<li>For a single character we have to use 5*7 pixels</li>
</ul>
<div>
<br /></div>
<h3 style="text-align: left;">
LCD pins:</h3>
<div>
<br /></div>
<div>
<ul style="text-align: left;">
<li>LCD having 16 PINS, Each having specific function.</li>
</ul>
<div>
<ol style="text-align: left;">
<li> Vss -- GROUND</li>
<li> Vcc -- POWER SUPPLY</li>
<li> Vee -- CONTRAST (Intensity of blackness of pixel)</li>
<li> RS -- Register Select</li>
<li> R/W - Read or write</li>
<li> E -- Enable</li>
</ol>
<div>
7-14 D0-D7 -- Data bus</div>
</div>
</div>
<div>
15 +Vref -- black light +ve</div>
<div>
16 -Vref -- black light -ve</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
D7 Bit we call as BUSY FLAG<br />
<br />
<br />
* lcd having 2 memory's<br />
<br />
1. Data memory (Display data RAM)<br />
<br />
2. Command memory ( Character Generator RAM )</div>
<div>
<br />
* If RS=0 , we selected as a command memory<br />
<br />
* If RS=1, We selected as a data memory.<br />
<br />
* E = 1, Then the character will fetch from lcd memory to 8051 port.<br />
<br />
* E =0, Then the fetching will stop.<br />
<br />
* Internally LCD having 30 positions for each line but it display only 16 positions.<br />
<br />
* When the 1st line of 30 position is completed then the next character display at 2nd line of 1st<br />
position.<br />
<br />
* When 2nd line of 30 position completed , Then the next character can display at 1st line of 1st position<br />
<br />
* Internally in LCD lines are circular.<br />
<br />
<br />
<br />
<br />
<h3 style="text-align: left;">
LCD COMMANDS:</h3>
<div>
<br /></div>
<div>
0X01 : CLEAR DISPLAY</div>
<div>
<br /></div>
<div>
0X02 : RETURN HOME</div>
<div>
<br /></div>
<div>
0X04 : DECREMENTED CURSOR ( SHIFT CURSOR TO LEFT) </div>
<div>
<br /></div>
<div>
0X06 : INCREMENTED CURSOR ( SHIFT CURSOR TO RIGHT )</div>
<div>
<br /></div>
<div>
0X05 : SHIFT DISPLAY RIGHT</div>
<div>
<br /></div>
<div>
0X07 : SHIFT DISPLAY TO LEFT</div>
<div>
<br /></div>
<div>
0X08 : DISPLAY OFF CURSOR OFF</div>
<div>
</div>
</div>
</div>
<div>
0X0A : DISPLAY OFF CURSOR ON</div>
<div>
<br /></div>
<div>
0X0E : DISPLAY ON CURSOR OFF</div>
<div>
<br /></div>
<div>
0X0F : DISPLAY ON CURSOR ON</div>
<div>
<br /></div>
<div>
0X28 : 4 BIT LCD</div>
<div>
<br /></div>
<div>
0X38 : 8 BIT LCD</div>
<div>
<br /></div>
<div>
<br /></div>
</div>
anjaneyulu rajulapatihttp://www.blogger.com/profile/06736742435547008896noreply@blogger.com1tag:blogger.com,1999:blog-451014807099031044.post-50815257199856877432015-09-07T16:51:00.000+05:302015-11-18T19:02:44.016+05:30DELAY PROGRAM <div dir="ltr" style="text-align: left;" trbidi="on">
<h2 style="text-align: left;">
DELAY GENERATION:</h2>
<div>
<ul style="text-align: left;">
<li>Delay can generate i two ways</li>
</ul>
<div>
<ol style="text-align: left;">
<li>Software delay</li>
<li>Hardware delay</li>
</ol>
<h3 style="text-align: left;">
software delay:</h3>
</div>
</div>
<div>
The delay can generate by using software. The following program is example for software delay.</div>
<div>
<br /></div>
<div>
<br /></div>
<h3 style="text-align: left;">
void delay()</h3>
<h3 style="text-align: left;">
{</h3>
<div>
</div>
<h3 style="text-align: left;">
int x,y; </h3>
<h3 style="text-align: left;">
for(x=0;x<200;x++) </h3>
<h3 style="text-align: left;">
for(y=0;y<600;y++);</h3>
<h3 style="text-align: left;">
}</h3>
<div>
<br /></div>
<h3 style="text-align: left;">
hardware delay:</h3>
<h3 style="text-align: left;">
steps for hardware delay:</h3>
<div>
<br /></div>
<div style="text-align: left;">
<ul style="text-align: left;">
<li>Select TIMER 0 or TIMER 1 In Any one of Timer Mode i.e user choice { timer mode 0, timer mode 1 , timer mode 2, timer mode 3} </li>
<li>SET TMOD Register</li>
<li>Load Timers { TH0 and TLO or TH1 and TL1 }</li>
<li>Start Timer i.e TR0 OR TR1 is SET</li>
<li>Wait for timer flag over flow i.e while(TF0 or TF1==0);</li>
<li>Clear TF and TR BITS</li>
<li>Delay completed.</li>
</ul>
<div>
<br /></div>
<h3 style="text-align: left;">
program for hardware delay:-</h3>
<h3 style="text-align: left;">
void delay() </h3>
<h3 style="text-align: left;">
{</h3>
<h3 style="text-align: left;">
TMOD=0X01;</h3>
<h3 style="text-align: left;">
TH0=0X4B; </h3>
<h3 style="text-align: left;">
TL0=0XFD; </h3>
<h3 style="text-align: left;">
TR0=1;</h3>
<h3 style="text-align: left;">
while(TF0==0); </h3>
<h3 style="text-align: left;">
TR0=0;</h3>
<h3 style="text-align: left;">
TF0=0; </h3>
<h3 style="text-align: left;">
}</h3>
<div>
*******************************************************************</div>
<div>
<br /></div>
<div>
<b>For Example LED program:</b></div>
<div>
<b><br /></b></div>
<div>
<b><br /></b></div>
<div>
<b><br /></b></div>
<div>
<h3 style="height: 0px;">
LED'S ARE ON AND OFF WITH 1 SECOND DELAY.</h3>
<div>
<br /></div>
<div>
<br /></div>
<h3 style="text-align: left;">
<span style="font-weight: normal;">#include<at89x51.h> // It is header file for 8051</span></h3>
<h3 style="text-align: left;">
<span style="font-weight: normal;">void delay() // delay function called by main</span></h3>
<div>
<span style="font-weight: normal;">{</span><br />
<h3 style="text-align: left;">
<span style="font-weight: normal;">TMOD=0X01;</span></h3>
<h3 style="text-align: left;">
<span style="font-weight: normal;">TH0=0X4B; </span></h3>
<h3 style="text-align: left;">
<span style="font-weight: normal;">TL0=0XFD; </span></h3>
<h3 style="text-align: left;">
<span style="font-weight: normal;">TR0=1;</span></h3>
<h3 style="text-align: left;">
<span style="font-weight: normal;"> while(TF0==0); </span></h3>
<h3 style="text-align: left;">
<span style="font-weight: normal;">TR0=0;</span></h3>
<span style="font-weight: normal;"></span><br />
<h3 style="text-align: left;">
<span style="font-weight: normal;"> TF0=0; </span></h3>
<span style="font-weight: normal;"><br /></span>
<span style="font-weight: normal;">}</span></div>
<h3 style="text-align: left;">
<span style="font-weight: normal;">void main()</span></h3>
<div>
<span style="font-weight: normal;">{</span></div>
<h3 style="text-align: left;">
<span style="font-weight: normal;">while(1)</span></h3>
<div>
<span style="font-weight: normal;">{</span></div>
<h3 style="text-align: left;">
<span style="font-weight: normal;">P0=0XFF; // led's are connected to P0 so LED'S ON</span></h3>
<h3 style="text-align: left;">
<span style="font-weight: normal;"> delay(); // delay for 1 sec</span></h3>
<h3 style="text-align: left;">
<span style="font-weight: normal;"> P0=0X00; // LED'S are OFF</span></h3>
<h3 style="text-align: left;">
<span style="font-weight: normal;">delay(); // Delay for 1 sec</span></h3>
<div>
<span style="font-weight: normal;">}</span></div>
<div>
<br /></div>
<div>
<span style="font-weight: normal;">}</span></div>
<div>
<span style="font-weight: normal;"><br /></span></div>
<div>
<span style="font-weight: normal;"><br /></span>
<span style="font-weight: normal;"><br /></span></div>
<div>
</div>
</div>
<div>
<b><br /></b></div>
</div>
</div>
anjaneyulu rajulapatihttp://www.blogger.com/profile/06736742435547008896noreply@blogger.com0tag:blogger.com,1999:blog-451014807099031044.post-30400446597547899392015-09-05T22:30:00.000+05:302015-11-18T08:56:34.604+05:30IBM MAIN FRAMES<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div>
<h2 style="text-align: left;">
MAINFRAMES</h2>
<br />
<br />
INTRODUCTION:-</div>
<div>
<ul style="text-align: left;">
<li>Mainframe was designed by IBM in early 1950's.</li>
<li>Mainframe is a server/ a large computer</li>
<li>It was designed mainly to meet the business requirements. Almost 70% of the business applications are currently running on mainframe platform.</li>
</ul>
FEATURES:-</div>
<div>
<br /></div>
<div>
<ul style="text-align: left;">
<li>Speed is high for processing nearly 80 MIBS</li>
<li>Low maintenance</li>
<li>It can store large amount of data</li>
</ul>
<div>
APPLICATIONS:-</div>
<div>
<ul style="text-align: left;">
<li>Airlines</li>
<li>banking</li>
<li>railways</li>
<li>telecom</li>
<li>stock market</li>
</ul>
<div>
SKILLS REQUIRED TO LEARN MAIN FRAMES:</div>
</div>
<div>
<br /></div>
<div>
<ul style="text-align: left;">
<li>COBOL</li>
<li>JCL</li>
<li>VSAM</li>
<li>DB2</li>
<li>CICS</li>
</ul>
</div>
<br />
<h3>
<b>COBOL:-</b></h3>
<h3>
<span style="font-weight: normal;">HISTORY:-</span></h3>
<div>
<ul>
<li> COBOL (Common Business Oriented Language) was developed in the year 1959.But at the time there was no compiler available.</li>
<li>COBOL was developed by the team CONFERENCE ON DATA SYSTEM LANGUAGE (CODASYL)</li>
<li>So the CODASYL team has met ANSI to develop COBOL compiler. Then COBOL has a compiler in the year 1968.</li>
<li>ANSI was released 1st version VS-COBOL-I in the year 1974</li>
<li>the second version was released in 1985</li>
</ul>
<div>
<br /></div>
</div>
<div>
FEATURES:-</div>
<div>
<br /></div>
<div>
<ul>
<li>It lools like a english language/HLL</li>
<li>Store the large amount of data</li>
<li>It is an independent (it can in any other OS)</li>
<li>It is a case insensitive</li>
<li>It is a structured language</li>
</ul>
</div>
<div>
</div>
</div>
</div>
anjaneyulu rajulapatihttp://www.blogger.com/profile/06736742435547008896noreply@blogger.com0tag:blogger.com,1999:blog-451014807099031044.post-38301275402913408102015-09-05T19:56:00.002+05:302015-11-18T19:07:17.962+05:30TIMERS AND COUNTERS<div dir="ltr" style="text-align: left;" trbidi="on">
<div>
<span style="background-color: magenta;">INTRODUCTION:-</span></div>
<div>
<br /></div>
<ul style="text-align: left;">
<li>In 8051, 2 timers are there i.e T0, T1. These timer are 16 bit registers</li>
<li>The timer puls run at 1/12th clock cycle.</li>
<li>The clock frequency for serial communication is 11.0592 M Hz </li>
<li> So a single machine cycle run "1" instruction the timing is =1.0892 us i.e {12/11.0592 M Hz} </li>
</ul>
<div>
<br /></div>
<div>
<span style="background-color: magenta;">APPLICATION</span>:-</div>
<div>
<br /></div>
<div style="text-align: left;">
<ul style="text-align: left;">
<li>Generate a delay </li>
<li>Event Counter</li>
<li>Baud rate for serial communication</li>
<li>Timers can be used as a timer as well as counter but not at a time</li>
<li>each timer is a 16 bit wide</li>
<li>Each timer can split two equal parts i.e TL{0/1} and TH{0/1}</li>
</ul>
<span style="background-color: magenta;">FOR T0:</span></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<div class="MsoNormal">
<br /></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext; mso-padding-alt: 0in 5.4pt 0in 5.4pt; width: 644px;">
<tbody>
<tr style="height: 31.5pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;">
<td style="border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 31.95pt;" valign="top" width="43"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;">15<o:p></o:p></span></b></div>
</td>
<td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 33.55pt;" valign="top" width="45"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;">14<o:p></o:p></span></b></div>
</td>
<td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 26.35pt;" valign="top" width="35"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;">13<o:p></o:p></span></b></div>
</td>
<td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 31.15pt;" valign="top" width="42"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;">12<o:p></o:p></span></b></div>
</td>
<td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 28.75pt;" valign="top" width="38"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;">11<o:p></o:p></span></b></div>
</td>
<td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 29.55pt;" valign="top" width="39"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;">10<o:p></o:p></span></b></div>
</td>
<td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 35.95pt;" valign="top" width="48"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;">9<o:p></o:p></span></b></div>
</td>
<td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 29.55pt;" valign="top" width="39"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;">8<o:p></o:p></span></b></div>
</td>
<td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 31.15pt;" valign="top" width="42"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;">7<o:p></o:p></span></b></div>
</td>
<td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 27.15pt;" valign="top" width="36"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;">6<o:p></o:p></span></b></div>
</td>
<td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 27.95pt;" valign="top" width="37"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;">5<o:p></o:p></span></b></div>
</td>
<td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 28.75pt;" valign="top" width="38"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;">4<o:p></o:p></span></b></div>
</td>
<td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 33.55pt;" valign="top" width="45"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;">3<o:p></o:p></span></b></div>
</td>
<td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 32.75pt;" valign="top" width="44"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;">2<o:p></o:p></span></b></div>
</td>
<td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 30.0pt;" valign="top" width="40"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;">1<o:p></o:p></span></b></div>
</td>
<td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 24.75pt;" valign="top" width="33"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;">0<o:p></o:p></span></b></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;"><----------------TH0------------------------------------> <-------------------------TL0------------------------></span></b></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
</div>
<div style="text-align: left;">
<span style="background-color: magenta;">FOR T1:</span></div>
<div style="text-align: left;">
<span style="background-color: magenta;"><br /></span></div>
<div style="text-align: left;">
<div class="MsoNormal">
<br /></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext; mso-padding-alt: 0in 5.4pt 0in 5.4pt; width: 644px;">
<tbody>
<tr style="height: 31.5pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;">
<td style="border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 31.95pt;" valign="top" width="43"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;">15<o:p></o:p></span></b></div>
</td>
<td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 33.55pt;" valign="top" width="45"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;">14<o:p></o:p></span></b></div>
</td>
<td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 26.35pt;" valign="top" width="35"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;">13<o:p></o:p></span></b></div>
</td>
<td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 31.15pt;" valign="top" width="42"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;">12<o:p></o:p></span></b></div>
</td>
<td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 28.75pt;" valign="top" width="38"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;">11<o:p></o:p></span></b></div>
</td>
<td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 29.55pt;" valign="top" width="39"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;">10<o:p></o:p></span></b></div>
</td>
<td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 35.95pt;" valign="top" width="48"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;">9<o:p></o:p></span></b></div>
</td>
<td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 29.55pt;" valign="top" width="39"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;">8<o:p></o:p></span></b></div>
</td>
<td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 31.15pt;" valign="top" width="42"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;">7<o:p></o:p></span></b></div>
</td>
<td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 27.15pt;" valign="top" width="36"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;">6<o:p></o:p></span></b></div>
</td>
<td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 27.95pt;" valign="top" width="37"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;">5<o:p></o:p></span></b></div>
</td>
<td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 28.75pt;" valign="top" width="38"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;">4<o:p></o:p></span></b></div>
</td>
<td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 33.55pt;" valign="top" width="45"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;">3<o:p></o:p></span></b></div>
</td>
<td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 32.75pt;" valign="top" width="44"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;">2<o:p></o:p></span></b></div>
</td>
<td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 30.0pt;" valign="top" width="40"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;">1<o:p></o:p></span></b></div>
</td>
<td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 24.75pt;" valign="top" width="33"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;">0<o:p></o:p></span></b></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-IN" style="font-family: "times new roman" , serif; font-size: 12pt; line-height: 115%;"> </span><b><span lang="EN-IN" style="font-family: "times new roman" , serif; font-size: 12pt; line-height: 18.3999996185303px;"><----------------TH0------------------------------------> <-------------------------TL0------------------------></span></b></div>
<div class="MsoNormal">
<span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;"> <o:p></o:p></span></div>
</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<br />
<h2 style="text-align: left;">
<span style="background-color: magenta; font-weight: normal;">Timer registers:-</span></h2>
<div>
<span style="background-color: magenta; font-weight: normal;"><br /></span></div>
<div>
<ul style="text-align: left;">
<li>In 8051, six timer registers are there </li>
</ul>
<ol style="text-align: left;">
<li>TMOD Register</li>
<li>TCON Register</li>
<li>TH0</li>
<li>TL0</li>
<li>TH1</li>
<li>TL1</li>
</ol>
<div>
<br /></div>
</div>
<h3 style="text-align: left;">
<span style="background-color: magenta; font-weight: normal;">TMOD REGISTER:-</span></h3>
<div>
<ul style="text-align: left;">
<li>TMOD Register is a 8 bit register. </li>
<li>Which is a Byte addressable register.</li>
<li>This register is used for timer mode section , timer start by what and finally timer or counter selection either timer 0 or timer 1</li>
</ul>
<div>
i.e We should n't set bit by bit in this register<br />
<br />
<div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="border-collapse: collapse; border: none; margin-left: 47.4pt;"><tbody>
<tr style="height: 45pt;"><td style="border: 1pt solid windowtext; height: 45pt; padding: 0in 5.4pt; width: 42.75pt;" valign="top" width="57"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , serif; font-size: 12pt; line-height: 18.3999996185303px;">7<o:p></o:p></span></b></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , serif; font-size: 12pt; line-height: 18.3999996185303px;">G<o:p></o:p></span></b></div>
</td><td style="border-bottom-color: windowtext; border-bottom-width: 1pt; border-right-color: windowtext; border-right-width: 1pt; border-style: solid solid solid none; border-top-color: windowtext; border-top-width: 1pt; height: 45pt; padding: 0in 5.4pt; width: 40.5pt;" valign="top" width="54"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , serif; font-size: 12pt; line-height: 18.3999996185303px;">6<o:p></o:p></span></b></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , serif; font-size: 12pt; line-height: 18.3999996185303px;">C/T<o:p></o:p></span></b></div>
</td><td style="border-bottom-color: windowtext; border-bottom-width: 1pt; border-right-color: windowtext; border-right-width: 1pt; border-style: solid solid solid none; border-top-color: windowtext; border-top-width: 1pt; height: 45pt; padding: 0in 5.4pt; width: 48pt;" valign="top" width="64"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , serif; font-size: 12pt; line-height: 18.3999996185303px;">5<o:p></o:p></span></b></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , serif; font-size: 12pt; line-height: 18.3999996185303px;">M1<o:p></o:p></span></b></div>
</td><td style="border-bottom-color: windowtext; border-bottom-width: 1pt; border-right-color: windowtext; border-right-width: 1pt; border-style: solid solid solid none; border-top-color: windowtext; border-top-width: 1pt; height: 45pt; padding: 0in 5.4pt; width: 50.25pt;" valign="top" width="67"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , serif; font-size: 12pt; line-height: 18.3999996185303px;">4<o:p></o:p></span></b></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , serif; font-size: 12pt; line-height: 18.3999996185303px;">M0<o:p></o:p></span></b></div>
</td><td style="border-bottom-color: windowtext; border-bottom-width: 1pt; border-right-color: windowtext; border-right-width: 1pt; border-style: solid solid solid none; border-top-color: windowtext; border-top-width: 1pt; height: 45pt; padding: 0in 5.4pt; width: 54.75pt;" valign="top" width="73"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , serif; font-size: 12pt; line-height: 18.3999996185303px;">3<o:p></o:p></span></b></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , serif; font-size: 12pt; line-height: 18.3999996185303px;">G<o:p></o:p></span></b></div>
</td><td style="border-bottom-color: windowtext; border-bottom-width: 1pt; border-right-color: windowtext; border-right-width: 1pt; border-style: solid solid solid none; border-top-color: windowtext; border-top-width: 1pt; height: 45pt; padding: 0in 5.4pt; width: 47.25pt;" valign="top" width="63"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , serif; font-size: 12pt; line-height: 18.3999996185303px;">2<o:p></o:p></span></b></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , serif; font-size: 12pt; line-height: 18.3999996185303px;">C/T<o:p></o:p></span></b></div>
</td><td style="border-bottom-color: windowtext; border-bottom-width: 1pt; border-right-color: windowtext; border-right-width: 1pt; border-style: solid solid solid none; border-top-color: windowtext; border-top-width: 1pt; height: 45pt; padding: 0in 5.4pt; width: 47.25pt;" valign="top" width="63"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , serif; font-size: 12pt; line-height: 18.3999996185303px;">1<o:p></o:p></span></b></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , serif; font-size: 12pt; line-height: 18.3999996185303px;">M1<o:p></o:p></span></b></div>
</td><td style="border-bottom-color: windowtext; border-bottom-width: 1pt; border-right-color: windowtext; border-right-width: 1pt; border-style: solid solid solid none; border-top-color: windowtext; border-top-width: 1pt; height: 45pt; padding: 0in 5.4pt; width: 34.45pt;" valign="top" width="46"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , serif; font-size: 12pt; line-height: 18.3999996185303px;">0<o:p></o:p></span></b></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , serif; font-size: 12pt; line-height: 18.3999996185303px;">M0<o:p></o:p></span></b></div>
</td></tr>
</tbody></table>
<div class="MsoNormal">
<br /></div>
</div>
<br />
<div>
</div>
<br />
<div style="-webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px;">
<div style="margin: 0px;">
<--------------TIMER1---------------------------> <------------TIMER0----------------------------></div>
</div>
</div>
</div>
<div>
<br /></div>
<div>
</div>
<div>
</div>
<div>
<br /></div>
<div>
<span style="background-color: magenta;">GATE (G);-</span></div>
<div>
<br /></div>
<div>
<ul style="text-align: left;">
<li> If G=0, Then Timer start by software / Program</li>
<li> If G=1, Then Timer start by Hardware / External </li>
</ul>
<div>
<span style="background-color: magenta;">COUNTER / TIMER (C/T);-</span></div>
</div>
<div>
<br /></div>
<div>
<ul style="text-align: left;">
<li>If (C/T)=0 , i.e Timer will be selected</li>
<li>If (C/T)=1, i.e Counter will be selected</li>
</ul>
</div>
<div>
<br /></div>
<div>
<span style="background-color: magenta;">MODE SELECTION BITS (M1,M0):-</span></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<table align="left" border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="border-collapse: collapse; border: none; margin-left: 6.75pt; margin-right: 6.75pt; mso-border-alt: solid windowtext .5pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-table-anchor-horizontal: margin; mso-table-anchor-vertical: margin; mso-table-left: left; mso-table-lspace: 9.0pt; mso-table-rspace: 9.0pt; mso-table-top: 49.5pt; width: 579px;"><tbody>
<tr style="height: 39.4pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0;"><td style="border: solid windowtext 1.0pt; height: 39.4pt; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 65.25pt;" valign="top" width="87"><div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;">M1<o:p></o:p></span></b></div>
</td><td style="border-left: none; border: solid windowtext 1.0pt; height: 39.4pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 78.8pt;" valign="top" width="105"><div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;">M0<o:p></o:p></span></b></div>
</td><td style="border-left: none; border: solid windowtext 1.0pt; height: 39.4pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 66.6pt;" valign="top" width="89"><div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;">MODE<o:p></o:p></span></b></div>
</td><td style="border-left: none; border: solid windowtext 1.0pt; height: 39.4pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 223.55pt;" valign="top" width="298"><div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;">SELECTION<o:p></o:p></span></b></div>
</td></tr>
<tr style="height: 45.85pt; mso-yfti-irow: 1;"><td style="border-top: none; border: solid windowtext 1.0pt; height: 45.85pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 65.25pt;" valign="top" width="87"><div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;">0<o:p></o:p></span></b></div>
<div class="MsoNormal">
<br /></div>
</td><td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; height: 45.85pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 78.8pt;" valign="top" width="105"><div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;">0<o:p></o:p></span></b></div>
</td><td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; height: 45.85pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 66.6pt;" valign="top" width="89"><div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;">0<o:p></o:p></span></b></div>
</td><td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; height: 45.85pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 223.55pt;" valign="top" width="298"><div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;">13 BIT TIMER<o:p></o:p></span></b></div>
</td></tr>
<tr style="height: 84.05pt; mso-yfti-irow: 2;"><td style="border-top: none; border: solid windowtext 1.0pt; height: 84.05pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 65.25pt;" valign="top" width="87"><div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;">0<o:p></o:p></span></b></div>
</td><td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; height: 84.05pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 78.8pt;" valign="top" width="105"><div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;">1<o:p></o:p></span></b></div>
</td><td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; height: 84.05pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 66.6pt;" valign="top" width="89"><div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;">1<o:p></o:p></span></b></div>
</td><td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; height: 84.05pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 223.55pt;" valign="top" width="298"><div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;">FULL 16 BIT TIMER<o:p></o:p></span></b></div>
</td></tr>
<tr style="height: 46.1pt; mso-yfti-irow: 3;"><td style="border-top: none; border: solid windowtext 1.0pt; height: 46.1pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 65.25pt;" valign="top" width="87"><div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;">1<o:p></o:p></span></b></div>
</td><td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; height: 46.1pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 78.8pt;" valign="top" width="105"><div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;">0<o:p></o:p></span></b></div>
</td><td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; height: 46.1pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 66.6pt;" valign="top" width="89"><div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;">2<o:p></o:p></span></b></div>
</td><td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; height: 46.1pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 223.55pt;" valign="top" width="298"><div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;">8 BIT AUTO RELOAD TIMER<o:p></o:p></span></b></div>
</td></tr>
<tr style="height: 37.75pt; mso-yfti-irow: 4; mso-yfti-lastrow: yes;"><td style="border-top: none; border: solid windowtext 1.0pt; height: 37.75pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 65.25pt;" valign="top" width="87"><div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;">1<o:p></o:p></span></b></div>
</td><td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; height: 37.75pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 78.8pt;" valign="top" width="105"><div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;">1<o:p></o:p></span></b></div>
</td><td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; height: 37.75pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 66.6pt;" valign="top" width="89"><div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;">3<o:p></o:p></span></b></div>
</td><td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; height: 37.75pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 223.55pt;" valign="top" width="298"><div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12.0pt; line-height: 115%;">SPLIT TIMER<o:p></o:p></span></b></div>
</td></tr>
</tbody></table>
<div class="MsoNormal">
<br /></div>
</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<br />
<div>
</div>
<br />
<div style="-webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px;">
<div style="margin: 0px;">
<br /></div>
</div>
</div>
<div style="text-align: left;">
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<h2 style="text-align: left;">
TCON:-</h2>
<div>
<ul style="text-align: left;">
<li>Timer Control register is 8 bit register.</li>
<li>It is bit addressable register. i.e we can change bit by bit</li>
<li>Timer control register is used to control the timer i.e we can start and stop by using this register</li>
</ul>
</div>
<div>
<ul style="text-align: left;">
<li>TIMER OVER FLOW FLAG [TF]:-</li>
</ul>
<div>
This TIMER OVER FLOW SET by hardware i.e TF=1 When the timer gets overflow.</div>
</div>
<div>
</div>
<div>
FOR TIMER0:-</div>
<div>
</div>
<div>
TF0=1</div>
<div>
</div>
<div>
FOR TIMER1:-</div>
<div>
</div>
<div>
TF1=1</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
This TIMER OVERFLOW FLAG is CLEAR by software, when the timer is overflow.</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
FOR TIMER0:-</div>
<div>
</div>
<div>
TF0=0</div>
<div>
</div>
<div>
FOR TIMER1:-</div>
<div>
</div>
<div>
TF1=0</div>
<div>
<ul style="text-align: left;">
<li>TIMER CONTROL BIT [ TR ]:-</li>
</ul>
<div>
If TR bit is SET then the timer will start.</div>
</div>
<div>
<br /></div>
<div>
</div>
<div>
FOR TIMER0:-</div>
<div>
</div>
<div>
TR0=1</div>
<div>
</div>
<div>
FOR TIMER1:-</div>
<div>
</div>
<div>
TR1=1</div>
<div>
<br /></div>
<div>
</div>
<div>
If TR bit is CLEAR then the timer will stop.</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
</div>
<div>
FOR TIMER0:-</div>
<div>
</div>
<div>
TR0=0</div>
<div>
</div>
<div>
FOR TIMER1:-</div>
<div>
</div>
<div>
TR1=0</div>
<div>
<br /></div>
<div>
<ul style="text-align: left;">
<li>EXTERNAL INTERRUPT [ IE ]:-</li>
</ul>
<div>
External interrupt edge flag is set / clear by hardware when interrupt is processed.</div>
</div>
<div>
<br /></div>
<div>
<ul style="text-align: left;">
<li>TIMER INTERRUPT [ IT ]:-</li>
</ul>
<div>
These are timer interrupt flags. These bare SET for negative edge trigger/ CLEAR for level trigger</div>
</div>
<br />
<div>
</div>
<br />
<div style="-webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px;">
<div style="margin: 0px;">
<br /></div>
</div>
</div>
</div>
anjaneyulu rajulapatihttp://www.blogger.com/profile/06736742435547008896noreply@blogger.com0tag:blogger.com,1999:blog-451014807099031044.post-1730649858162083122015-08-28T20:22:00.001+05:302015-11-18T20:33:27.172+05:30Interview question on c<div dir="ltr" style="text-align: left;" trbidi="on">
<b>1.what is c language?</b><br />
<b><br /></b> C is programming language and also it is helpful to build an operating systems like unix and linux etc.. C is a middle level language.<br />
<br />
<br />
<br />
<b>2. Why 'C' So called as a middle level programming language?</b><br />
<b><br /></b>
<b> </b>C programming language is a middle level language because, it having the both the features of low level language and high level language. i.e C is a power of low level and less power of high level language. So C is middle level language.<b> </b><br />
<br />
<br />
<b>3.what is high level language?</b><br />
<span style="background-color: white; color: #666666; font-family: "trebuchet ms" , "trebuchet" , "verdana" , sans-serif; font-size: 13.1999998092651px; line-height: 18.4799995422363px;"></span><br />
<b><br /></b> By using english word we can developing the software easily so we called high level language.<br />
<br />
<br />
<b>4.what is low level language?</b><br />
<span style="background-color: white; color: #666666; font-family: "trebuchet ms" , "trebuchet" , "verdana" , sans-serif; font-size: 13.1999998092651px; line-height: 18.4799995422363px;"></span><br />
<b><br /></b>low level language is suitable for developing software that interact with hardware.<br />
<br />
<br />
<div style="color: #666666; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 13.1999998092651px; line-height: 1.4;">
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal;">
<b>6.What are the steps we required for execution of a C program?</b></div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal;">
<b><br /></b><b>step1: </b>compiler can convert the our C source code (.c) into machine code i.e object code (.obj)</div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal;">
<br /></div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal;">
<b>step2: </b>Linker can convert the our object code into executable code (.exe). In linker stage we needed extra machine code that can be linking in this stage from C library.</div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal;">
<br /></div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal;">
<b>step3: </b>finally executable file should be run by the C compiler to get output.</div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal;">
<br /></div>
</div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal;">
<b style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal;"><br /></b><b style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal;">7.What is a datatype ?</b><br />
<b style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal;"><br /></b>
A datatype is a ":KEYWORD" that represent the type of data being stored into a memory or variable.</div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal;">
<br /></div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal;">
<b>8.How many datatypes are in C?</b></div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal;">
<br /></div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal;">
Basically C having 2 types of datatypes.</div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal;">
<br /></div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal;">
They are</div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal;">
<br /></div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal;">
1. Primary datatypes</div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal;">
<br /></div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal;">
2.secondary datatypes<br />
<br />
<b>9.What is the primary datatype ?</b><br />
<b><br /></b>The primary datatypes are can store only one value. there are 5 primary datatypes<br />
<br />
1. char<br />
2. int<br />
3. float<br />
4. double<br />
5. void<br />
<br />
<b>10. </b><b>What are the secondary datatypes ?</b><br />
<b><br /></b>Secondary datatypes also have 5 there are<br />
<br />
1. Array<br />
2. Pointer<br />
3. Structure<br />
4. Union<br />
5. Enumeration</div>
<div style="color: #666666; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 13.1999998092651px; line-height: 1.4;">
<br /></div>
<div style="color: #666666; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 13.1999998092651px; line-height: 1.4;">
<br /></div>
<div style="color: #666666; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 13.1999998092651px; line-height: 1.4;">
<br /></div>
<br />
<div style="color: #666666; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 13.1999998092651px; line-height: 1.4;">
</div>
<br />
<div style="color: #666666; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 13.1999998092651px; line-height: 1.4;">
<div style="margin: 0px;">
<br /></div>
</div>
<br />
<br />
<b>5.can you tell what is input and out put functions?</b><br />
<b><br /></b> The basic input and out put functions are available in <b>"stdio" (</b>standard input and out put ) header file.<br />
<br />
<b>Input function</b>:---<br />
<br />
The data given to a program is called a input function (or) input statement<br />
<br />
EX: getchar();<br />
gets()<br />
scanf()<br />
<br />
<b>Out put function:----</b><br />
<b><br /></b><b> </b>The data given by a program is called a output function (or) out put statement<br />
<br />
EX: <br />
putchar()<br />
puts()<br />
printf()</div>
anjaneyulu rajulapatihttp://www.blogger.com/profile/06736742435547008896noreply@blogger.com0tag:blogger.com,1999:blog-451014807099031044.post-28939444498316147842015-08-27T19:30:00.002+05:302015-11-18T20:13:16.552+05:30microcontroller<div dir="ltr" style="text-align: left;" trbidi="on">
<h4 style="text-align: left;">
<span style="font-size: large;">WHAT IS MICRO CONTROLLER:-</span></h4>
<br />
<br />
Micro controller may be called """"""computer on chip""""""" since it has basic features<br />
of micro controller with internal ROM, RAM, PARALLEL and SERIAL PORTS with in single chip.<br />
<br />
<br />
OR<br />
Micro processor with memory and ports is called as micro controller<br />
<br />
APPLICATION:<br />
<br />
<br />
**Washing machines, <br />
**AC'S<br />
**ROBOTICS<br />
**INDUSTRIES<br />
<br />
<br />
<br />
<h4 style="text-align: left;">
<span style="font-size: large;">TYPES OF MICRO CONTROLLER:</span></h4>
<br />
We have so many micro controllers.<br />
<br />
<br />
The 8051 Micro controller is first micro controller of MCS-51 family introduced by INTEL corporation at end of 1970's.<br />
<br />
It 8 bit micro controller, means it can read, write and process 8 bit data. this is mostly used in robotics and industries etc.....<br />
<br />
<h3 style="text-align: left;">
FEATURE:</h3>
<br />
<br />
** It is a 40 pin IC/dip<br />
** It has 4 i/o ports<br />
** 1 serial port<br />
** 128 byte RAM<br />
** 4KB ROM<br />
** 2 TIMERS<br />
** 5 INTERRUPTS<br />
<br />
WE WILL DISCUSS SLOWLY one by one<br />
<br />
<br />
<b><u> RAM: ( 00 h - 7f h)</u></b><br />
<br />
Micro controller 8051 has 128 byte Random Access Memory for data storage. RAM is a volatile memory. RAM is used to storing the when execution time.<br />
RAM consists following blocks.<br />
1.register banks ( Bank 0, Bank 1, Bank 2, Bank 3 )<br />
2.stack ( Bank 1, Bank 2, Bank 3)<br />
3.bit addressable RAM ( 20 h - 2f h)<br />
4.Scratch pad RAM ( 30 h - 7f h)<br />
<br />
<br />
<br />
<br />
<br />
* RAM is a volatile memory. Generally RAM can be used for storage of data at the time execution.<br />
<br />
* In 8051, RAM has 256 byte of memory. In which 128 byte is for user purpose.<br />
<br />
i.e<br />
1. BANK REGISTERS {0,1,2,3}<br />
<br />
2.BIT ADDRESSABLE RAM<br />
<br />
3.GENERAL PURPOSE RAM<br />
<br />
* Remaining 128 byte used for SPECIAL FUNCTION REGISTERS {SFR}<br />
<br />
*In SFR consists 21 SFR registers<br />
<br />
1. PORT REGISTERS {0,1,2,3}<br />
<br />
2. INTERNAL TIMER REGISTER {TCON, TMOD,TL0,TL1,TH0,TH1}<br />
<br />
3.POWER CONTROL REGISTER {PCON}<br />
<br />
4.SERIAL PORT REGISTER {SCON,SBUF}<br />
<br />
<br />
5.INTERRUPT REGISTER {IE,IP}<br />
<br />
6. STACK P[OINTER {SP}<br />
<br />
7.DATA POINTER {DPH,DPL}<br />
<br />
8.ACCUMULATOR { A }<br />
<br />
9. B REGISTER<br />
<br />
10. PROGRAM STATUS WORD {PSW}<br />
<br />
<br />
* Up to 64k bytes of external RAM memory is supported. This is read-write memory and it is available for storage of data.<br />
<br />
<br />
<b><u>ROM:</u></b><br />
<b><u><br /></u></b> In 8051, 4 KB read only memory(ROM). It is useful for storing program. It is a Non volatile memory. We can interface up to 64 KB ROM memory externally.<br />
<div>
<br /></div>
<div>
<br /></div>
</div>
anjaneyulu rajulapatihttp://www.blogger.com/profile/06736742435547008896noreply@blogger.com0tag:blogger.com,1999:blog-451014807099031044.post-20570481527348925142015-08-07T19:15:00.001+05:302015-11-18T20:28:57.014+05:30BASICS OF MICRO CONTROLLER<div dir="ltr" style="text-align: left;" trbidi="on">
<b><u>BASICS OF MICRO CONTROLLER:</u></b><br />
<br />
<br />
<br />
Processor are two types:<br />
<br />
1.System on chip, integrated processors all are placed combine.<br />
<br />
2.stand-alone processor.<br />
<br />
<br />
<br />
<u><b>WHAT IS MICRO CONTROLLER:-</b></u><br />
<br />
<br />
Micro controller may be called """"""computer on chip""""""" since it has basic features<br />
of micro controller with internal ROM, RAM, PARALLEL and SERIAL PORTS with in single chip.<br />
<br />
<br />
OR<br />
Micro processor with memory and ports is called as micro controller<br />
<br />
<b><u>APPLICATION</u></b>:<br />
<br />
<br />
**Washing machines,<br />
**AC'S<br />
**ROBOTICS<br />
**INDUSRIES<br />
<br />
<br />
<br />
<u><b>HISTORY:</b></u><br />
<br />
<br />
<br />
<br />
The 8051 Micro controller is first micro controller of MCS-51 family introduced by INTEL corporation at end of 1970's.<br />
<br />
<br />
It 8 bit micro controller, means it can read, write and process 8 bit data. this is mostly used in robotics and industries etc.....<br />
<br />
<u><b> FEATURE:</b></u><br />
<br />
<br />
** It is a 40 pin IC/dip<br />
** It has 4 i/o ports<br />
** 1 serial port<br />
** 128 byte RAM<br />
** 4KB ROM<br />
** 2 TIMERS<br />
** 5 INTERRUPTS<br />
<br />
<br />
<b><u>ROM:</u></b><br />
<b><u><br /></u></b> In 8051, 4 KB read only memory(ROM). It is useful for storing program. It is a Non volatile memory. We can interface up to 64 KB ROM memory externally.<br />
<br />
<br />
WE WILL DISCUSS SLOWLY one by one<br />
<div>
<br /></div>
<br />
*****************************************************************************<br />
<br />
<br />
<br />
DATA BUS:<br />
<br />
It is transfer the data with in """""microprocessor and Input and out put devices"""".<br />
<br />
if 8 bit micro controller has 8 bit data bus.<br />
if 16 bit micro controller has 8 bit, 16 bit data bus.<br />
<br />
<br />
ADDRESS BUS:<br />
<br />
<br />
It is to specify the address.<br />
<br />
<br />
<br />
CONTROL BUS:<br />
<br />
<br />
Micro processors uses control bus to process data, that is what do with selected memory allocation. some control signals are read,write, op code fetch etc.<br />
various operations are performed by micro processor with help of control bus,<br />
<br />
<br />
<span style="color: magenta;"> <b>TIMERS/COUNTERS</b></span><br />
<br />
<br />
<div>
<span style="background-color: magenta;">INTRODUCTION:-</span></div>
<div>
<br /></div>
<br />
<div>
</div>
<br />
<ul style="-webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px;">
<li>In 8051, 2 timers are there i.e T0, T1. These timer are 16 bit registers</li>
<li>The timer puls run at 1/12th clock cycle.</li>
<li>The clock frequency for serial communication is 11.0592 M Hz </li>
<li> So a single machine cycle run "1" instruction the timing is =1.0892 us i.e {12/11.0592 M Hz} </li>
</ul>
<div>
<span style="background-color: magenta;">APPLICATIONS:-</span></div>
<div>
<ul>
<li>Generate a delay </li>
<li>Event Counter</li>
<li>Baud rate for serial communication</li>
<li>Timers can be used as a timer as well as counter but not at a time</li>
<li>each timer is a 16 bit wide</li>
<li>Each timer can split two equal parts i.e TL{0/1} and TH{0/1}</li>
</ul>
<span style="background-color: magenta;">FOR T0:</span></div>
<div>
<br /></div>
<div>
<div class="MsoNormal">
<br /></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext; mso-padding-alt: 0in 5.4pt 0in 5.4pt; width: 644px;"><tbody>
<tr style="height: 31.5pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;"><td style="border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 31.95pt;" valign="top" width="43"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;">15<o:p></o:p></span></b></div>
</td><td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 33.55pt;" valign="top" width="45"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;">14<o:p></o:p></span></b></div>
</td><td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 26.35pt;" valign="top" width="35"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;">13<o:p></o:p></span></b></div>
</td><td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 31.15pt;" valign="top" width="42"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;">12<o:p></o:p></span></b></div>
</td><td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 28.75pt;" valign="top" width="38"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;">11<o:p></o:p></span></b></div>
</td><td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 29.55pt;" valign="top" width="39"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;">10<o:p></o:p></span></b></div>
</td><td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 35.95pt;" valign="top" width="48"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;">9<o:p></o:p></span></b></div>
</td><td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 29.55pt;" valign="top" width="39"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;">8<o:p></o:p></span></b></div>
</td><td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 31.15pt;" valign="top" width="42"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;">7<o:p></o:p></span></b></div>
</td><td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 27.15pt;" valign="top" width="36"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;">6<o:p></o:p></span></b></div>
</td><td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 27.95pt;" valign="top" width="37"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;">5<o:p></o:p></span></b></div>
</td><td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 28.75pt;" valign="top" width="38"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;">4<o:p></o:p></span></b></div>
</td><td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 33.55pt;" valign="top" width="45"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;">3<o:p></o:p></span></b></div>
</td><td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 32.75pt;" valign="top" width="44"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;">2<o:p></o:p></span></b></div>
</td><td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 30.0pt;" valign="top" width="40"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;">1<o:p></o:p></span></b></div>
</td><td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 24.75pt;" valign="top" width="33"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;">0<o:p></o:p></span></b></div>
</td></tr>
</tbody></table>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;"><----------------TH0------------------------------------> <-------------------------TL0------------------------></span></b></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
</div>
<div>
<span style="background-color: magenta;">FOR T1:</span></div>
<div>
<span style="background-color: magenta;"><br /></span></div>
<div>
<div class="MsoNormal">
<br /></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext; mso-padding-alt: 0in 5.4pt 0in 5.4pt; width: 644px;"><tbody>
<tr style="height: 31.5pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;"><td style="border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 31.95pt;" valign="top" width="43"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;">15<o:p></o:p></span></b></div>
</td><td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 33.55pt;" valign="top" width="45"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;">14<o:p></o:p></span></b></div>
</td><td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 26.35pt;" valign="top" width="35"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;">13<o:p></o:p></span></b></div>
</td><td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 31.15pt;" valign="top" width="42"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;">12<o:p></o:p></span></b></div>
</td><td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 28.75pt;" valign="top" width="38"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;">11<o:p></o:p></span></b></div>
</td><td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 29.55pt;" valign="top" width="39"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;">10<o:p></o:p></span></b></div>
</td><td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 35.95pt;" valign="top" width="48"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;">9<o:p></o:p></span></b></div>
</td><td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 29.55pt;" valign="top" width="39"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;">8<o:p></o:p></span></b></div>
</td><td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 31.15pt;" valign="top" width="42"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;">7<o:p></o:p></span></b></div>
</td><td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 27.15pt;" valign="top" width="36"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;">6<o:p></o:p></span></b></div>
</td><td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 27.95pt;" valign="top" width="37"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;">5<o:p></o:p></span></b></div>
</td><td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 28.75pt;" valign="top" width="38"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;">4<o:p></o:p></span></b></div>
</td><td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 33.55pt;" valign="top" width="45"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;">3<o:p></o:p></span></b></div>
</td><td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 32.75pt;" valign="top" width="44"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;">2<o:p></o:p></span></b></div>
</td><td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 30.0pt;" valign="top" width="40"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;">1<o:p></o:p></span></b></div>
</td><td style="border-left: none; border: solid windowtext 1.0pt; height: 31.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 24.75pt;" valign="top" width="33"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;">0<o:p></o:p></span></b></div>
</td></tr>
</tbody></table>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-IN" style="font-family: "times new roman" , serif; font-size: 12pt; line-height: 18.3999996185303px;"> </span><b><span lang="EN-IN" style="font-family: "times new roman" , serif; font-size: 12pt; line-height: 18.3999996185303px;"><----------------TH0------------------------------------> <-------------------------TL0------------------------></span></b></div>
<div class="MsoNormal">
<span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;"> <o:p></o:p></span></div>
</div>
<div>
<br />
<h2>
<span style="background-color: magenta; font-weight: normal;">Timer registers:-</span></h2>
<div>
<span style="background-color: magenta;"><br /></span></div>
<div>
<ul>
<li>In 8051, six timer registers are there </li>
</ul>
<ol>
<li>TMOD Register</li>
<li>TCON Register</li>
<li>TH0</li>
<li>TL0</li>
<li>TH1</li>
<li>TL1</li>
</ol>
<div>
<br /></div>
</div>
<h3>
<span style="background-color: magenta; font-weight: normal;">TMOD REGISTER:-</span></h3>
<div>
<ul>
<li>TMOD Register is a 8 bit register. </li>
<li>Which is a Byte addressable register.</li>
<li>This register is used for timer mode section , timer start by what and finally timer or counter selection either timer 0 or timer 1</li>
</ul>
<div>
i.e We should n't set bit by bit in this register</div>
</div>
<div>
<br /></div>
<div>
</div>
<div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="border-collapse: collapse; border: none; margin-left: 47.4pt;"><tbody>
<tr style="height: 45pt;"><td style="border: 1pt solid windowtext; height: 45pt; padding: 0in 5.4pt; width: 42.75pt;" valign="top" width="57"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , serif; font-size: 12pt; line-height: 18.3999996185303px;">7<o:p></o:p></span></b></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , serif; font-size: 12pt; line-height: 18.3999996185303px;">G<o:p></o:p></span></b></div>
</td><td style="border-bottom-color: windowtext; border-bottom-width: 1pt; border-right-color: windowtext; border-right-width: 1pt; border-style: solid solid solid none; border-top-color: windowtext; border-top-width: 1pt; height: 45pt; padding: 0in 5.4pt; width: 40.5pt;" valign="top" width="54"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , serif; font-size: 12pt; line-height: 18.3999996185303px;">6<o:p></o:p></span></b></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , serif; font-size: 12pt; line-height: 18.3999996185303px;">C/T<o:p></o:p></span></b></div>
</td><td style="border-bottom-color: windowtext; border-bottom-width: 1pt; border-right-color: windowtext; border-right-width: 1pt; border-style: solid solid solid none; border-top-color: windowtext; border-top-width: 1pt; height: 45pt; padding: 0in 5.4pt; width: 48pt;" valign="top" width="64"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , serif; font-size: 12pt; line-height: 18.3999996185303px;">5<o:p></o:p></span></b></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , serif; font-size: 12pt; line-height: 18.3999996185303px;">M1<o:p></o:p></span></b></div>
</td><td style="border-bottom-color: windowtext; border-bottom-width: 1pt; border-right-color: windowtext; border-right-width: 1pt; border-style: solid solid solid none; border-top-color: windowtext; border-top-width: 1pt; height: 45pt; padding: 0in 5.4pt; width: 50.25pt;" valign="top" width="67"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , serif; font-size: 12pt; line-height: 18.3999996185303px;">4<o:p></o:p></span></b></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , serif; font-size: 12pt; line-height: 18.3999996185303px;">M0<o:p></o:p></span></b></div>
</td><td style="border-bottom-color: windowtext; border-bottom-width: 1pt; border-right-color: windowtext; border-right-width: 1pt; border-style: solid solid solid none; border-top-color: windowtext; border-top-width: 1pt; height: 45pt; padding: 0in 5.4pt; width: 54.75pt;" valign="top" width="73"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , serif; font-size: 12pt; line-height: 18.3999996185303px;">3<o:p></o:p></span></b></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , serif; font-size: 12pt; line-height: 18.3999996185303px;">G<o:p></o:p></span></b></div>
</td><td style="border-bottom-color: windowtext; border-bottom-width: 1pt; border-right-color: windowtext; border-right-width: 1pt; border-style: solid solid solid none; border-top-color: windowtext; border-top-width: 1pt; height: 45pt; padding: 0in 5.4pt; width: 47.25pt;" valign="top" width="63"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , serif; font-size: 12pt; line-height: 18.3999996185303px;">2<o:p></o:p></span></b></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , serif; font-size: 12pt; line-height: 18.3999996185303px;">C/T<o:p></o:p></span></b></div>
</td><td style="border-bottom-color: windowtext; border-bottom-width: 1pt; border-right-color: windowtext; border-right-width: 1pt; border-style: solid solid solid none; border-top-color: windowtext; border-top-width: 1pt; height: 45pt; padding: 0in 5.4pt; width: 47.25pt;" valign="top" width="63"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , serif; font-size: 12pt; line-height: 18.3999996185303px;">1<o:p></o:p></span></b></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , serif; font-size: 12pt; line-height: 18.3999996185303px;">M1<o:p></o:p></span></b></div>
</td><td style="border-bottom-color: windowtext; border-bottom-width: 1pt; border-right-color: windowtext; border-right-width: 1pt; border-style: solid solid solid none; border-top-color: windowtext; border-top-width: 1pt; height: 45pt; padding: 0in 5.4pt; width: 34.45pt;" valign="top" width="46"><div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , serif; font-size: 12pt; line-height: 18.3999996185303px;">0<o:p></o:p></span></b></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , serif; font-size: 12pt; line-height: 18.3999996185303px;">M0<o:p></o:p></span></b></div>
</td></tr>
</tbody></table>
<div class="MsoNormal">
<br /></div>
</div>
<div>
<--------------TIMER1---------------------------> <------------TIMER0----------------------------></div>
<div>
<br /></div>
<div>
<span style="background-color: magenta;">GATE (G);-</span></div>
<div>
<br /></div>
<div>
<ul>
<li> If G=0, Then Timer start by software / Program</li>
<li> If G=1, Then Timer start by Hardware / External </li>
</ul>
<div>
<span style="background-color: magenta;">COUNTER / TIMER (C/T);-</span></div>
</div>
<div>
<br /></div>
<div>
<ul>
<li>If (C/T)=0 , i.e Timer will be selected</li>
<li>If (C/T)=1, i.e Counter will be selected</li>
</ul>
</div>
<div>
<br /></div>
<div>
<span style="background-color: magenta;">MODE SELECTION BITS (M1,M0):-</span></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<table align="left" border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="border-collapse: collapse; border: none; margin-left: 6.75pt; margin-right: 6.75pt; mso-border-alt: solid windowtext .5pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-table-anchor-horizontal: margin; mso-table-anchor-vertical: margin; mso-table-left: left; mso-table-lspace: 9.0pt; mso-table-rspace: 9.0pt; mso-table-top: 49.5pt; width: 579px;"><tbody>
<tr style="height: 39.4pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0;"><td style="border: solid windowtext 1.0pt; height: 39.4pt; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 65.25pt;" valign="top" width="87"><div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;">M1<o:p></o:p></span></b></div>
</td><td style="border-left: none; border: solid windowtext 1.0pt; height: 39.4pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 78.8pt;" valign="top" width="105"><div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;">M0<o:p></o:p></span></b></div>
</td><td style="border-left: none; border: solid windowtext 1.0pt; height: 39.4pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 66.6pt;" valign="top" width="89"><div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;">MODE<o:p></o:p></span></b></div>
</td><td style="border-left: none; border: solid windowtext 1.0pt; height: 39.4pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 223.55pt;" valign="top" width="298"><div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;">SELECTION<o:p></o:p></span></b></div>
</td></tr>
<tr style="height: 45.85pt; mso-yfti-irow: 1;"><td style="border-top: none; border: solid windowtext 1.0pt; height: 45.85pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 65.25pt;" valign="top" width="87"><div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;">0<o:p></o:p></span></b></div>
<div class="MsoNormal">
<br /></div>
</td><td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; height: 45.85pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 78.8pt;" valign="top" width="105"><div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;">0<o:p></o:p></span></b></div>
</td><td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; height: 45.85pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 66.6pt;" valign="top" width="89"><div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;">0<o:p></o:p></span></b></div>
</td><td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; height: 45.85pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 223.55pt;" valign="top" width="298"><div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;">13 BIT TIMER<o:p></o:p></span></b></div>
</td></tr>
<tr style="height: 84.05pt; mso-yfti-irow: 2;"><td style="border-top: none; border: solid windowtext 1.0pt; height: 84.05pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 65.25pt;" valign="top" width="87"><div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;">0<o:p></o:p></span></b></div>
</td><td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; height: 84.05pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 78.8pt;" valign="top" width="105"><div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;">1<o:p></o:p></span></b></div>
</td><td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; height: 84.05pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 66.6pt;" valign="top" width="89"><div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;">1<o:p></o:p></span></b></div>
</td><td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; height: 84.05pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 223.55pt;" valign="top" width="298"><div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;">FULL 16 BIT TIMER<o:p></o:p></span></b></div>
</td></tr>
<tr style="height: 46.1pt; mso-yfti-irow: 3;"><td style="border-top: none; border: solid windowtext 1.0pt; height: 46.1pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 65.25pt;" valign="top" width="87"><div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;">1<o:p></o:p></span></b></div>
</td><td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; height: 46.1pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 78.8pt;" valign="top" width="105"><div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;">0<o:p></o:p></span></b></div>
</td><td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; height: 46.1pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 66.6pt;" valign="top" width="89"><div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;">2<o:p></o:p></span></b></div>
</td><td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; height: 46.1pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 223.55pt;" valign="top" width="298"><div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;">8 BIT AUTO RELOAD TIMER<o:p></o:p></span></b></div>
</td></tr>
<tr style="height: 37.75pt; mso-yfti-irow: 4; mso-yfti-lastrow: yes;"><td style="border-top: none; border: solid windowtext 1.0pt; height: 37.75pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 65.25pt;" valign="top" width="87"><div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;">1<o:p></o:p></span></b></div>
</td><td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; height: 37.75pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 78.8pt;" valign="top" width="105"><div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;">1<o:p></o:p></span></b></div>
</td><td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; height: 37.75pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 66.6pt;" valign="top" width="89"><div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;">3<o:p></o:p></span></b></div>
</td><td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; height: 37.75pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 223.55pt;" valign="top" width="298"><div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><span lang="EN-IN" style="font-family: "times new roman" , "serif"; font-size: 12pt; line-height: 18.3999996185303px;">SPLIT TIMER<o:p></o:p></span></b></div>
</td></tr>
</tbody></table>
<div class="MsoNormal">
<br /></div>
</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<br />
<div>
</div>
<br />
<div style="-webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px;">
<div style="margin: 0px;">
<br /></div>
</div>
</div>
<div>
<br /></div>
<br />
<div>
</div>
<br />
<div style="-webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px;">
<div style="margin: 0px;">
<br /></div>
</div>
<br />
<br />
<br />
<h2>
<span style="background-color: magenta;"><br /></span></h2>
<h2>
<span style="background-color: magenta;"><br /></span></h2>
<h2>
<span style="background-color: magenta;">TCON</span>:-</h2>
<div>
<ul>
<li>Timer Control register is 8 bit register.</li>
<li>It is bit addressable register. i.e we can change bit by bit</li>
<li>Timer control register is used to control the timer i.e we can start and stop by using this register</li>
</ul>
</div>
<div>
<br /></div>
<div>
<ul>
<li><span style="color: magenta;">TIMER OVER FLOW FLAG [TF]:-</span></li>
</ul>
<div>
This TIMER OVER FLOW SET by hardware i.e TF=1 When the timer gets overflow.</div>
</div>
<div>
</div>
<div>
FOR TIMER0:-</div>
<div>
</div>
<div>
TF0=1</div>
<div>
</div>
<div>
FOR TIMER1:-</div>
<div>
</div>
<div>
TF1=1</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
This TIMER OVERFLOW FLAG is CLEAR by software, when the timer is overflow.</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
FOR TIMER0:-</div>
<div>
</div>
<div>
TF0=0</div>
<div>
</div>
<div>
FOR TIMER1:-</div>
<div>
</div>
<div>
TF1=0</div>
<div>
<ul>
<li><span style="color: magenta;">TIMER CONTROL BIT [ TR ]:-</span></li>
</ul>
<div>
If TR bit is SET then the timer will start.</div>
</div>
<div>
<br /></div>
<div>
</div>
<div>
FOR TIMER0:-</div>
<div>
</div>
<div>
TR0=1</div>
<div>
</div>
<div>
FOR TIMER1:-</div>
<div>
</div>
<div>
TR1=1</div>
<div>
<br /></div>
<div>
</div>
<div>
If TR bit is CLEAR then the timer will stop.</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
</div>
<div>
FOR TIMER0:-</div>
<div>
</div>
<div>
TR0=0</div>
<div>
</div>
<div>
FOR TIMER1:-</div>
<div>
</div>
<div>
TR1=0</div>
<div>
<br /></div>
<div>
<ul>
<li><span style="color: magenta;">EXTERNAL INTERRUPT [ IE ]:-</span></li>
</ul>
<div>
External interrupt edge flag is set / clear by hardware when interrupt is processed.</div>
</div>
<div>
<br /></div>
<div>
<ul>
<li><span style="color: magenta;">TIMER INTERRUPT [ IT ]:-</span></li>
</ul>
<div>
These are timer interrupt flags. These bare SET for negative edge trigger/ CLEAR for level trigger</div>
</div>
<br />
<div>
</div>
<br />
<div style="-webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px;">
<div style="margin: 0px;">
<h2 style="font-weight: normal;">
DELAY GENERATION:</h2>
<div style="font-weight: normal;">
<ul>
<li>Delay can generate i two ways</li>
</ul>
<div>
<ol>
<li>Software delay</li>
<li>Hardware delay</li>
</ol>
<h3>
software delay:</h3>
</div>
</div>
<div style="font-weight: normal;">
The delay can generate by using software. The following program is example for software delay.</div>
<div style="font-weight: normal;">
<br /></div>
<div style="font-weight: normal;">
<br /></div>
<h3 style="font-weight: normal;">
void delay()</h3>
<h3 style="font-weight: normal;">
{</h3>
<div style="font-weight: normal;">
</div>
<h3 style="font-weight: normal;">
int x,y; </h3>
<h3 style="font-weight: normal;">
for(x=0;x<200;x++) </h3>
<h3 style="font-weight: normal;">
for(y=0;y<600;y++);</h3>
<h3 style="font-weight: normal;">
}</h3>
<div style="font-weight: normal;">
<br /></div>
<h3 style="font-weight: normal;">
hardware delay:</h3>
<h3 style="font-weight: normal;">
steps for hardware delay:</h3>
<div style="font-weight: normal;">
<br /></div>
<div style="font-weight: normal;">
<ul>
<li>Select TIMER 0 or TIMER 1 In Any one of Timer Mode i.e user choice { timer mode 0, timer mode 1 , timer mode 2, timer mode 3} </li>
<li>SET TMOD Register</li>
<li>Load Timers { TH0 and TLO or TH1 and TL1 }</li>
<li>Start Timer i.e TR0 OR TR1 is SET</li>
<li>Wait for timer flag over flow i.e while(TF0 or TF1==0);</li>
<li>Clear TF and TR BITS</li>
<li>Delay completed.</li>
</ul>
<div>
<br /></div>
<h3>
program for hardware delay:-</h3>
<h3>
void delay() </h3>
<h3>
{</h3>
<h3>
TMOD=0X01;</h3>
<h3>
TH0=0X4B; </h3>
<h3>
TL0=0XFD; </h3>
<h3>
TR0=1;</h3>
<h3>
while(TF0==0); </h3>
<h3>
TR0=0;</h3>
<h3>
TF0=0; </h3>
<h3>
}</h3>
</div>
<div style="font-weight: normal;">
<br /></div>
<div>
<h3 style="height: 0px;">
LED'S ARE ON AND OFF WITH 1 SECOND DELAY.</h3>
<div style="font-weight: normal;">
<br /></div>
<div style="font-weight: normal;">
<br /></div>
<h3 style="font-weight: normal;">
<span style="font-weight: normal;">#include<at89x51.h> // It is header file for 8051</span></h3>
<h3 style="font-weight: normal;">
<span style="font-weight: normal;">void delay() // delay function called by main</span></h3>
<div style="font-weight: normal;">
{</div>
<h3>
<span style="font-weight: normal;"> TMOD=0X01;</span></h3>
<h3>
<span style="font-weight: normal;">TH0=0X4B; </span></h3>
<h3>
<span style="font-weight: normal;">TL0=0XFD; </span></h3>
<h3>
<span style="font-weight: normal;">TR0=1;</span></h3>
<h3>
<span style="font-weight: normal;"> while(TF0==0); </span></h3>
<h3>
<span style="font-weight: normal;">TR0=0;</span></h3>
<h3>
<span style="font-weight: normal;"> TF0=0; </span></h3>
<h3 style="font-weight: normal;">
}</h3>
<div style="font-weight: normal;">
<br /></div>
<div style="font-weight: normal;">
}</div>
<div style="font-weight: normal;">
<br /></div>
<h3 style="font-weight: normal;">
<span style="font-weight: normal;">void main()</span></h3>
<div style="font-weight: normal;">
{</div>
<h3 style="font-weight: normal;">
<span style="font-weight: normal;">while(1)</span></h3>
<div style="font-weight: normal;">
{</div>
<h3 style="font-weight: normal;">
<span style="font-weight: normal;">P0=0XFF; // led's are connected to P0 so LED'S ON</span></h3>
<h3 style="font-weight: normal;">
<span style="font-weight: normal;"> delay(); // delay for 1 sec</span></h3>
<h3 style="font-weight: normal;">
<span style="font-weight: normal;"> P0=0X00; // LED'S are OFF</span></h3>
<h3 style="font-weight: normal;">
<span style="font-weight: normal;">delay(); // Delay for 1 sec</span></h3>
<div style="font-weight: normal;">
}</div>
<div style="font-weight: normal;">
</div>
</div>
</div>
</div>
<br />
<br />
<br />
<br />
<br />
<h2 style="text-align: left;">
LCD (LIQUID CRYSTAL DISPLAY)</h2>
<div>
<br /></div>
<div>
<ul style="text-align: left;">
<li>This LCD Display the characters so we called as also CHARACTER LCD</li>
<li>If we give liquid. It is "1" for BLACKNESS, "0" for WHITENESS </li>
</ul>
<div>
BLACK=1</div>
</div>
<div>
WHITE=0</div>
<div>
<ul style="text-align: left;">
<li>We are using 16*2 LCD</li>
<li>By using this 16*2 LCD, we can display 16 characters in 2 lines</li>
<li>For a single character we have to use 5*7 pixels</li>
</ul>
<div>
<br /></div>
<h3 style="text-align: left;">
LCD pins:</h3>
<div>
<br /></div>
<div>
<ul style="text-align: left;">
<li>LCD having 16 PINS, Each having specific function.</li>
</ul>
<div>
<ol style="text-align: left;">
<li> Vss -- GROUND</li>
<li> Vcc -- POWER SUPPLY</li>
<li> Vee -- CONTRAST (Intensity of blackness of pixel)</li>
<li> RS -- Register Select</li>
<li> R/W - Read or write</li>
<li> E -- Enable</li>
</ol>
<div>
7-14 D0-D7 -- Data bus</div>
</div>
</div>
<div>
15 +Vref -- black light +ve</div>
<div>
16 -Vref -- black light -ve</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
D7 Bit we call as BUSY FLAG<br />
<br />
<br />
* lcd having 2 memory's<br />
<br />
1. Data memory (Display data RAM)<br />
<br />
2. Command memory ( Character Generator RAM )</div>
<div>
<br />
* If RS=0 , we selected as a command memory<br />
<br />
* If RS=1, We selected as a data memory.<br />
<br />
* E = 1, Then the character will fetch from lcd memory to 8051 port.<br />
<br />
* E =0, Then the fetching will stop.<br />
<br />
* Internally LCD having 30 positions for each line but it display only 16 positions.<br />
<br />
* When the 1st line of 30 position is completed then the next character display at 2nd line of 1st<br />
position.<br />
<br />
* When 2nd line of 30 position completed , Then the next character can display at 1st line of 1st position<br />
<br />
* Internally in LCD lines are circular.<br />
<br />
<br />
<br />
<br />
<h3 style="text-align: left;">
LCD COMMANDS:</h3>
<div>
<br /></div>
<div>
0X01 : CLEAR DISPLAY</div>
<div>
<br /></div>
<div>
0X02 : RETURN HOME</div>
<div>
<br /></div>
<div>
0X04 : DECREMENTED CURSOR ( SHIFT CURSOR TO LEFT) </div>
<div>
<br /></div>
<div>
0X06 : INCREMENTED CURSOR ( SHIFT CURSOR TO RIGHT )</div>
<div>
<br /></div>
<div>
0X05 : SHIFT DISPLAY RIGHT</div>
<div>
<br /></div>
<div>
0X07 : SHIFT DISPLAY TO LEFT</div>
<div>
<br /></div>
<div>
0X08 : DISPLAY OFF CURSOR OFF</div>
<div>
</div>
</div>
</div>
<div>
0X0A : DISPLAY OFF CURSOR ON</div>
<div>
<br /></div>
<div>
0X0E : DISPLAY ON CURSOR OFF</div>
<div>
<br /></div>
<div>
0X0F : DISPLAY ON CURSOR ON</div>
<div>
<br /></div>
<div>
0X28 : 4 BIT LCD</div>
<div>
<br /></div>
<div>
0X38 : 8 BIT LCD</div>
<br />
<br />
<br />
<b>ANALOG TO DIGITAL CONVERTER:</b><br />
<h3>
<ul style="font-size: 18.7199993133545px;">
<li>Transducer:-</li>
</ul>
<div style="font-size: 18.7199993133545px;">
<span style="font-weight: normal;">Which converts one form of energy to another form of energy. i.e </span></div>
<span style="font-size: 18.7199993133545px; font-weight: normal;"> A physical quantity is converted into electrical signal is called " Transducer "</span><div style="font-size: 18.7199993133545px;">
<ul>
<li>Sensor:-</li>
</ul>
<div>
<span style="font-weight: normal;">Which converts any form of energy to voltage level.</span></div>
</div>
<div style="font-size: 18.7199993133545px;">
<br /></div>
<div style="font-size: 18.7199993133545px;">
<ul>
<li>Resolution:- </li>
</ul>
<div>
<span style="font-weight: normal;">A smallest change that can be detected by "ADC". When resolution is more then accuracy may be in minutes.</span></div>
</div>
<div style="font-size: 18.7199993133545px;">
<span style="font-weight: normal;"><br /></span></div>
<div style="font-size: 18.7199993133545px;">
<ul>
<li><span style="font-weight: normal;">In 8051, we don't have ADC internally so we are connecting the 0804 ADC externally.</span></li>
</ul>
<div>
<span style="font-weight: normal;"><br /></span></div>
</div>
<div style="font-size: 18.7199993133545px;">
<ul>
<li>Converts time:-</li>
</ul>
<div>
<span style="font-weight: normal;">The time taken by to change ( or ) converts analog signal to digital signal. It may varies depending on clk signal applied to the clkR and clkI pins.</span></div>
</div>
<div style="font-size: 18.7199993133545px;">
<span style="font-weight: normal;"> </span></div>
<div style="font-size: 18.7199993133545px;">
<span style="font-weight: normal;"><br /></span></div>
</h3>
<h3>
FEATURES OF ADC 0804:-</h3>
<h3>
<div style="font-size: 18.7199993133545px;">
<div>
<br /></div>
<span style="font-weight: normal;"></span><br />
<div>
<ul style="font-size: medium; font-weight: normal;">
<li> Manufactured by NATIONAL SEMICONDUCTORS</li>
<li>It belongs to 800 series</li>
<li>Working on +5V</li>
<li>8 bit resoltution.</li>
</ul>
</div>
</div>
</h3>
<br /></div>
anjaneyulu rajulapatihttp://www.blogger.com/profile/06736742435547008896noreply@blogger.com1tag:blogger.com,1999:blog-451014807099031044.post-71665319335894525712015-07-30T14:51:00.002+05:302015-11-18T20:31:24.224+05:30C LANGUAGE<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
I n C we have 3 words<br />
<div>
There are </div>
<div>
1.Constant </div>
<div>
2. Variables</div>
<div>
3.key words or reserved words</div>
<div>
...................................................................................................................................................................</div>
<div>
<br /></div>
<div>
CONSTANTS:</div>
<div>
</div>
<div>
Constants means fixed values. i.e their value is not change in our program. Not only integer values but also char data type,float data type, strings also.</div>
<div>
for examples in strings are enclosed in double quotes.</div>
<div>
for char type is enclosed in single quotes. </div>
<div>
...................................................................................................................................................................VARIABLES:</div>
<div>
</div>
<div>
Variables are represented in english words are user defined words except key word.this variables are store varying values or changing values. </div>
<div>
SYN: datatype variable1,variable2.............;</div>
<div>
datatypes are int, char, float, double ect,</div>
<div>
we can use in place of datatype.</div>
<div>
...................................................................................................................................................................KEYWORDS:</div>
<div>
</div>
<div>
In C we have some words which we can not use variables. they have some special meaning only. these are called reserved words or key words.</div>
<div>
In C we have 32 key words.</div>
<div>
there are</div>
<div>
<br /></div>
<div>
auto break case char const continue default do double else enum extern float for goto if int long register return sizeof short signed static stuct switch typedef union unsigned void volatile while.<br />
<br />
<br />
<br />
*********************************************************************************<br />
<br />
DYNAMIC MEMORY ALLOCATION:<br />
<br />
In our PC's or general purpose computers are having large memory,but in that memory only some of memory used while executing a programs. An Operating system is stored in main memory but in lower part of the memory.On the top of this memory we have four memory segments.<br />
<br />
1.code segment<br />
2.data segment<br />
3.heap segment<br />
4.stack segment<br />
<br />
<br />
<br />
******************************************************************************<br />
<br />
<br />
<h2>
<b>STRUCTURES</b></h2>
<br />
<div>
We know that an array represents a group of elements which are similar datatype, arrays are useful to store and retrieve groups of elements. But there is an inconvenience while using arrays, i.e all the elements should belongs to same datatype.But we can not store mixed datatypes like an integer number, a float number and a string into a same array.<br />
<br />
So we have comes structures topic, it is useful in daily life applications. we can declare structure by following syntax.<br />
<br />
<br />
SYN:- struct details<br />
{<br />
<br />
int marks;<br />
char name[20];<br />
float per;<br />
<br />
};<br />
<br />
structure can declared "struct" key word, then we should write structure name i.e details<br />
with in the braces we should declare elements.<br />
after completion declare we should write object then only memory is allocated to structure.<br />
<br />
<br />
SYN: struct details de;</div>
<div>
<br /></div>
<br />
<br />
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
</div>
anjaneyulu rajulapatihttp://www.blogger.com/profile/06736742435547008896noreply@blogger.com0