You are on page 1of 50

Abstract

c
c
Ý cc 
c cc  c c 
c  c c c
 c c c 
c
c  
c c 
 

 c
 c
c 
 c
c c
    cc 
cc c
  c c 
 c  c c  c c  c  c  c 
c  
c
 
c  c c 
c 

c 
c  c  c   c 
 c

 c  c c  c  c c 
c c
c c
c c
c 
c
  c
c
c   c c
c c  c  c c 
c 
c  
c

c  c
 c  c c  c c c 
 c
c
cc  c c
c
cc 
c 


c
c c   c c c

ccc
 c
  c  c 
c 

c 

 
c Ý c   c c  
c  c c
ÝÝc  c  c c  c  c c 

c c  c 
 c
  c
c c    cc
 c c c

c  c  c c   c c !"#$Ýc %c  c c c   c 
c
   c c  c  c
c  
c c  c  c c c

  cc
c
c
c c c c c  c  cccc
 c c c  c 
c  c  c 
  
c  c c c
 c
c c 

c c c 
c   c  c
c c

c c 
c  c  c 


 c
c  c  &c  c
  cc ccc c
 c  cc c c c
c
 c c
c c

c
aandidate's Declaration
c
c  c  c  c  c  &c  c  c 'HOME
AUTOMATION USING Remote Controlled Electronic Switching
System£c  c    c  c  
c c (
c  &c
c ) c
  cc*Ý c+$,"-c
c.
c/  c0 cc$
c,cÝ
c
c
c 
 c  cc c  c cc
 c c 
cc
Mrs. Sandhya Sharma.c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
12c1 c34c5636c
2c7  c!&  
c
c c

c
aoncept
c
$ c 
cc cc 
%
c cc c

c
c  c 
c 

  c  c   c c c  c  c  c
 c cc
c Ý  c ccc   c
c 
  c
c c
c  c c c  c 
c  

  
c  c  c   c +c
 -c c 
c 
 c   c c  c   c
c
  c c  c 
c
  c c 
 

c c   c
 
 c  c  

c 
c c  
c c 
c 
&c
 c  
c
c   c
c c c
$ c  c c c  c 
 c c 
c c 
c c
c

  8c c 
c  
c 
c   c 
c   c c c c  c 
c
c c  c  c c c c c 
c c  c
  c 
c  
c c  c

   c
 
c  c c c c
c   
c  c c c


c 
c  c
c 
 
 c /  c   
c 
 c
cc cc c cÝ c 
 c c c c  c c
 
c c  c
c cc
c c c   c
c c

c
utate of the Art

c !c "
 c c   c  c  c  c c c c
c c 
  c !c "
  c  c  c  c  c  c
 
 c
c! cc!c"
  c  c  c c  c
 
 c
  c 
c

c 
c  cc  c
  c
c  c  c  
  c 
c   c c  c  c c 
c c
 c  cÝ  c c 
cc c
 c c  c
c c 
 c c  c c c c   c  c c  c

c   c

c   c   c 
c   c  c c

 c  c
c 
c c c c c  c Ý c #Ý$!#$Ýc c
 c 
c& cc  c c c
( c  
 c  c  c  c c  c 
  
c !c 
 c
 c
c

c
c c 
 c  ccc   c 
 c
c  c  c Ý  c c 
c  c c c  c

 
c    c   c  c c  c  c  c
   c   c  cÝ c
c cc c
 c c
 c
  
c
c c

c
u stem Architecture

Ý c  Ýccc c cc


c c
 c  c c 
c   
c  c  c 
c
  
c  c  c c 
c   c c  c  c
 c c  c  c c  c c  c  c  c
c  c
c

c
c
9  2c   cc c c0 c
c c

c
c
Architecture Details

Euu

Ý c$
c  c0  c0 c cc 
3c  
c c 
c
c c
   c"c c 
  
c  c c c  c
c  c
c

 cÝ"" 

cccc c"00cc  cc


   
c c
 c

c  cc c
 c    c cc c
"cc c c&cc c$00cc
 
c
 c c c"00c

c 
c c c c 
c
c
c
c
c
c
c

c
auu

Ý c"
 c0  c0 c c c  cc c cc  c c  cc
c 
c    c  c  c 

 c  c  c   c
 
c
 
   c
.
 c "

c  c .
 c "00c "

c c  c  c c
 c 
 
 c   c c c  c &c c  c 

c c  c


 
c c  c$00c" c
c

c  c 
  
c
 cÝ c

ccc
  
ccc  c$00c
   c   c  c 

c  c 
c c  c  c

   
cc  c  c cc   c  c c c  c c

c

c  c
cc c c&cc c

c
c c    c c c 
c

cc c$00c  c

c 
c c 
ccc  c c  c
!
c "

c Ý c 

c c c c  c #$Ýc !
c
 c   c c  
c c 
c &c  c  c  c 
 
c

c  c !
c  
 c c c 
 
c c  c .
 c
"

c $ 

 
c c  c 

c

  c c
 c
&c  c

c c cc c 
c(  c
c c&c
  cc c c c.
 c"

c
c 
c c cc
c  
c
c 0  c c   c  c ÝÝc  c  c  c  
 c  c


 c   c c  c 
c c c   c c 
c

 c  c .
 c "

c  c  c !
c
"

cÝ &cc c

c cc

c 
  
c
 c  c  c c c  c  c !
c "

c c
  c c   
cc    c cc c 
c c c
   
c c 
c  c 

 c  c 
c  
c  c  c
c  c  c

 c cc c"00c0 c  c

c       c  c 
c   c c   c c  c 

c 
c
 c
c c   
c  c 
cc c
 c c
c
c

c
umart Device alient

Ý c  
c c  c c  c c c  c c !c "
 c c  c
  c Ý
  c  c  c "00c 
c 
 c  c $00c c  
c
 c cc   ccc c 
c9  c  c c
 c
c   c  
 c Ý c  c   c 
c  c  c c  c 
c 
 c
 c c
0 c1  c!


c*   cÝ c c
 c  c c
  c
c
c
 
 cÝ c  c
c c 
 c
  1 c c Ý c c
c c  c   c c 


c  c
   
c c  c
c 
c  c c   cc
c
 
c
 
 c
c c  c
cc c c  c
  c
c    c
 c  c c  c   c Ý c
c c
 c  c  c
0  c

cc c"00c
c  cc  c   c
0 c1  c!


c"00c" 
c0c  c c c  c
 

c  c  c
c c   c 
c c
cc" c
 c 
 
c   c  c (   c 
 c "$c c
    c c 


 c    c c  c c "00c  
c

cc

c  c  c c  cc  :c  c
  c
Ý  c   
c  c  c c 0  c 

c 
c  c

 c  c  c "00
c #$Ýc !
c " c ; c 
c
" c c   c 
c
cc" c
c c
cc
c
 c c
c

c
Architecture Notes

Ý c !"#$Ýc  c   c c " 


%0  c    c c
  c 
cc c
c c c  ccc
c   c c
  c   
 c c  c  c  :c $00c 
c  c   c c
c c
c  c $00
c  c   c c c 
c c 
c
 
c 
c  c  c  c    
 c
c 
c   c

c$00c
cc
 c
c
c  
 cc  c 
 c
 cc  c 
 c

cc 
 c  c  c$00c c
 
cc  c
c

cc  
c
c
Ý c$00c c

cc c   c c


cc c+;Ý3-c c
Ý  c  c cc  c c c c c
c  c  c4c  c

    c  
c  :c   c  c  c  c  c
 c 
c  c 
c c c c  c  c Ý c 
c  c
c c  
c
c
Ý c
 
c 
c"00c
c$00c   c
cc!  %!c
  c c 
 c  c  c    c c  c
   c  c c 
c
c  c  c  c   c c
 c Ý c .
 c "

c 
c !
c "

c c  c
"00c  c  c c  c  c  c 
c
c c
c

c c  c
c  
c  "
 
c 
c  c cc c

cc&c  
 c
c
Ý c c 0  c "

c  c 
 
c    c   c #$Ýc
!
cc c c
 
   cc c.
 c"

c c

 
c  c c0 c1 c c cc cÝÝc 

c
< c c ÝÝ0c  00;c   c  c  c  c  c  c
c
 ccc
c 
 cÝ 
 cc  cc c   c

c c
c c
 c
c c+c  
-c   c
c c

c
Microcontroller AT8051

Ý c
cÝ46=3c c  c   c
c c  c
  c
 c  ccc
c
c3>46c c c
cc   c

 c  
c  
c  c  c
c  c 3>46 c 
c  c 3>>6 c
c  c c ?@c  c 
c  c c c  c 
c c
  c 
 c 
 
c 

c Ý46=3 c   c

 c c  c  
c 56c


c 
  c


cc


cÝ
  c

Ý c Ý46=3c c 
c c  c  c  c   c 
  c
c  c
c(
c  c  c
  c c
c
cc
 c c c
c
c c  c cÝ46=3cÝ  c c  c
c  c
cÝ46=3c c
c  
c  c c

c c
cc
c  c c cc
cc  c
  cc

c
{mportant Features And Applications

Úc c   c
c
 
c+"<c!(c!A(cAc
 c
 c  c-c
cc
ccc
c
Úc 4% c;<c c
c4% c!  8c 
c c c
c4% c
  
  c
c
Úc c4% cc c%cc
c c4c  ccc
c
c  
c
c
Úc 3B% c  c c%cc
c c53Bc c 
c%cBCD*c
+B==EBc 
-c cc!(c
c!A(cc
c
Úc A
% c!(c%c354c c+c -cc
c
Úc A
% c!A(c%cCc*c+  c -cc
c
Úc 9 cc %  
c
c cc
c
Úc <!Ýc+  c -cc
c
Úc Ý c3B% c"
   cc
c
Úc Ý %c
 c  cc
c
Úc   c 
ccc
c c

c
G ry Arc i c ur 
c 46=3c cc
 c   cc  c%c

 cc   c

 
c  c c  c
c 
 c c   c

c 46=3c  c c c 


 c  c c   c c   c
 c c 46=3c c c
 c ccc c
 

cc
 c  c  c c

c  c  cc   c


c c 
c  c c c

%  c c 
 cc c
c 
 ccc

0 ipG ry c c


c  cccc c  c
  c  c 
c c 
 c  c 
% c  c 
c
cc  c  c c c c
c  c  cc

  r l d  G ry c c c  c  c  c   c


% c  c c 
c
c c cc
c 
 cc

  r lAG cc  c  c  c% c  c c 


c
c
c cc 
c  ccc  cc
c c

c
aode Memor 
"c c c c c c  c ccÝ46=3c  c
 c ccc 
cÝ c c c  ccBCDc
c c
c
c
 c
c : 2c"c ccc
c
¦ c   c
c

c c  
  c c!A(c c$!A(c"cc cc  c
c ¦ c
c 
c 
c !A(c  c  c 
c 
c

c $!A(c 9 c !(c c  c 
  c  c  c c

cc  c/  c
 
cc  c c cc
 cc %% c cc c c c cc cCDccc c

¦ c
cBCccc c¦ c
c
c$!A(cc

 
c  c   c c  c 
% c  c BCDc  c c 
c
ccCc4c c3BcÝ c  c

c
c c 
cc c
 c  c c 
c  c $ c  
c  c   c     c 
c

c c  c  

c  c  c  c c  c c  c  c
!A($!A(c c c c  cc

  cc c c c


c 
c c% c
$!A(cÝ c c  c c
c % c
c   c
c

c   ccc 
 cc

c c

c
External RAM
 c 
c   c  c c {    c  c Ý46=3c  c   c
c cc
  cc

 c  c
c   c $
c !(c c 
c 
c  c  c
 c c 
c ¦c 0
c  c  c c % c c c
c  c
 c
c   c c 
c 
c c  c   c 9 c c c

 
c
c

c!(c 
c c3c    c
c3c
  
c

c 3c
  
c c Ýc
 
c c 3%c c  c
c
$
c!(c    cCc
  
c
c)c
  
c c
c c
 c
c c c)c  c   Fcc

 c$
c!(c  c
c c
c   c c
c
c 
 c
 c

c!(c c  cc354c c+5=Bc c  c
c46=5-c
 cÝ46=3c   c$
c!(cccBCDcc

0nahip Memor 
 c
 
cc c


cc c  c cÝ46=3c
 cc
 
c
cc
% c cA
% c c c c
cc
 c  2c 

c !(c 
c 0 c 9
 
c !  c +09!-c
 cÝ ccc cÝ46=3 c

c c c  
c
c
 c
c c2cc

c c

c
c

 c c   c
c  c c c 46=3c cc
c c 354c  c c
{  c  c

 cc c
c ¦  c
c c 46=3c c c
c c  cc  c
c c c c c  c   c
c  c
c 
c 
c 
c  
c c 

c 

 c c c
  c c
c c 46=3c c  c  c  c c cc

c354c  cc

 c c c   c c 
c
c c  c
c c   c 4c   c 66c %c 6)c c  c 
c 6c *c

 
c  
c 09 c c  c c  c c  c  c

 c 3c 5c c Ec  c  
 c  c 
 c c  c
c


 c c
c   c 64c c 39c  c   c  c

 c c
cc  c c9c
c c c   
c c
c  c
c c
cc cc

 ccc

c
* c ( c  c   c 
c c  c c

c !(c c c  c
c c c c  cc c
 c& cc
c
c c c
 c c   c
c

c !(c  c    c 56 c
  c59 cc

Ý c46c c 

cc

c!(c c   cE6 c  c
)9 c c c  c c   c   c  c
c c c  c
  
c  c c  % c Ý c  c c  c   :c c  c
  
  c  c c  c  c  c  c  
c c Ý c c
 c   c cÝ46=3 c c
c c   c
c c c
c c c   c c c c c
c46c %%
c c c c
 c
c c46c c  ccc  c 
c c c
c  c
  cc

Ñit Memor c


Ý c Ý46=3c 
c c 
 
% 
c   
  c
  c  c  c c  cc cc
 ccÊÊ cÝ  c
  ccc   c3c c6cc

Ý  c  c 354c  c   c  c c  c   c


 c 66 c
  c )9 c Ý c   c c c  c c   c   c  c

 c  c c0$Ý*c
c";!c9 ccc c c
 c5Cc
+ -cc3cc cc c
  
2cc

uETÑ 24h
c
c c  
c c
c  c * c ( c c c c  c c 

c
!(c 
c c  c 354c  c   c c  c 3Bc  c c 

c
!(c  c 56 c   c 59 c Ý  c c c c  c c 99 c c


c !(c   c 56 c c  c c   c 66 c   c
6) cÝ c cc c 2cc
c
c
c
c

c
c
c
c
upecial Function Register (uFR) Memor 

0 c 9
 
c !  c +09! -c  c   c c  c  c 
 c
  c 
 
 c c  c Ý46=3c    c 9 c c  c
09! c   c  c c  c Ý46=3 c E5c
c 
 c 
  c
09!c  c c   c c c  c c c  c Ý46=3 c  c  c
A  c 09! c  c  c   c c c  c  c c c 
 c 
c
 c  c
c
  c cÝ46=3 c
 c  cc

Ý c Ý46=3c c c  c   


  c  c c  c  c

 c c  c c   


c G c   c c
c 
 c
 
c  c  
c c c  c Ý46=3c c 

c  c
 cc cÝ46=3 c0 c9
 
c!  c+09! -cc

09! c  c  c  c c  c  c


 c 

c !(c Ý c 
c
  
c c  c 

c !(c c  c   c 66 c   c )9 c
  c09!c   c c
c c  c 
cc46 c  c99 cc

$ c 09!c  c 
c   c +46 c   c 99 -c 
c c
c Ý c

c   c    c c   c   
 
c c  c Ý46=3 c
09! c  c
 c
c  c  cc

c
c

 cc
c c c c c
cc46c c99cc
354c  c  c cc
c53c09 c
cc 
c 46=3c
 c  c   c
c c 09c 
c 46c c 99c c

c
 c 
c c c 
c  c  c   c c
c

c  cc cc

c c

c
Ñ cc

c   cc
c c  c  c 
c   c  c 
 c c c c
   c  c c
cc
c c   cc

Ý c c c  c
c   c c c cc
 c   c
c c  c   c c c  c
 c c
  
c c 
c
c 
c 4% c +3%-c c 
c c  c  c   c   c  c
Ý46=3c  ccc c  c
 cc
  
c cc cc
 c  c ( c  
c c c  c Ý46=3 c 5==c
  
c

c c c c c
c c cc

9 cc cc 
ccc c
 c36c
c56c c  
c
E6c c c  c
c  c  c A
c c c c c
c  c
 c c c 

c  
c  c c  c c c
 c c
c
  c   c c
c cc

The "R" registersc


Ý cH!Hc   c cc cc  c   c c c
c!6c!3c
c c c 
c

c !)c Ý  c   c  c  c  c   c
  c
c 
c   
c  c 
c  c
  
c  c
 c c 

c  c c E6c Gc c 
c c  c H!Hc
  c  c  c  
c   c  c H  Hc   c Ý c
 c
c c
cc c c c c  c
c c  c
H!Hc   c Ý c H!Hc   c  c  c  c c   c  c
 c

c
The "Ñ" Register
Ý cH*Hc   c c c   cc c c
c c 
c c c
c c
c4% c+3%-ccÝ cH*Hc   c c
c cc c
Ý46=3c
  
2c (<;c *c 
c 1/c *c Ý  c c c 
c c
 c
c c c c  c cc
  c
 ccc
 c  c   c
 c
c H*Hc 
c c  c c   c  c

  
c c c  c  c (<;c 
c 1/c
  
c  c H*Hc
  c c 
c  c  c c 
  c   c  c   c
 c cc

 cH!Hc   cc

The Data Pointer (DPTR)


Ý c 1c 
 c +1Ý!-c c  c Ý46=3 c 
c   % c 3B% c
+5%-c   cÝ c cH!Hc   c
cH*Hc   c c
c 3%c  c 1Ý!c  c  c
c   c c  c c 
c c
cc c ccc
 cc
 c  c c cÝ46=3cc
 c 
c  c  
c  c Ý46=3c   c 
c
 c c c  c 
c  c c  c   c
 c c
1Ý!cc

 c1Ý!c c c


c cc
ccc
c
c c

c   c
cc
cc cc c  c c
c
 c 3B% c   c  c c c 
c  c c  c 5%c  c
 c c

ccc  c c 
cc
c c

c
The Program aounter (Pa)
Ý c  c"
 c+"-c cc5%c  c  c c cÝ46=3c
 c c
c
  
ccc c
c
c c 
c c
Ý46=3c c
  :c "c   c   c c 6666 c 
c c
 
c
 c c
c
  
c ccc c  
cc
c c"c

Ic   c
 
c c 
c 0
c c
  
c   c5c
 cEc c c"c cc
 
cc5c cEc
c  c  cc

Ý c   c "
 c c  c
c  c   c c
c c c  c
 c  c c Ý c c c c c 
Ic c 
c  c
"J5CE6 c A
c  c   c 
c c c c ;7(c 5CE6 c Ic
 c c c c
cc

The utack Pointer (uP)


Ý c0c
 c cc   cc1Ý!c
c"cc c
c
4% c+3%-ccÝ c0c
 c c cc
 c  c c

cccc c c c c cc


c cc

 
cc ccc
c c c cÝ46=3c c
 
 c
 c c c 0c 
c  
c   c  c c c  c  
c  c
 
cc

 
c c c c c c  c c  cÝ46=3c 
c  c c
 c c c 
c
 cc0c
c 
c 
 c c
cc0cc

Ý c  cc  
c c  
c 
c cÝ46=3c c
  :c
0c cc
  :cc6) ccc  c ccc
c c
c  c c c c  c
c 

c !(c   c 64 c Ý c
 c 
c 
c
c 
c c  c 
 
c  c
   c 2c 9 c  c Ý46=3c c
 
c  c c c 0c
+ c 6) c c 64 -c 
c  
c c  c  c  c c c  c
 c  c+64 -cc

c
0c c  c cc cÝ46=3cc c
  
2c<0cAc
";;c;";;c!$Ýc
c!$Ýcc c c c

c 
 c
c

 c c  cc

Addressing Mode

c H 
c Hc  c c  c c  c  
c c  
c
 c 
c
c  c c 
c c c c c
 c
ccc 2cc
Immediate Addressing (A/cK56 c
Direct Addressing (A/cE6 c
Indirect Addressing (A/cL!6c
External Direct (A/McL1Ý!c
Code Indirect (A/"cLN1Ý!c

$ cc  c 


c c   c  
c   cc

{mmediate Addressing
 c 
c c %
c c cccc  c
c
 c  c c c  
cc
c cÝ c c
c c  c
  
c  c   c c c c c  c
c
 cc

Direct Addressing c
1 c  
c c %
c  c  c c c c  c
c
 c c 
c c  c  
c c  c 
  c  c
 
cc

c
{ndirect Addressing

 c  
c c c  c   c  
c c  c
c

c   c    c 
c  
c c c    c 
 c
 
c c  c  c 
c c c  c  c  c 354c  c c


c!(c
c
c
c46=5cc

External Direct
$
c ( c c c
cc  cc
  
c  c c
c c c H$
c 1 Hc  
c c c c  c  c c
 c c c  c  
c c c c  c c  c 
c
 c   c 
c

c cc

External {ndirect
$
c  c 
c  c c  c 
c c  c c
 c
 
c  c c c $
c 
 c  
c Ý c  c c
 
c c c
c c
c  c c & c c cc
 c c
cc
c!(cc

Program Flow
 
c 
c Ý46=3c c  c
  :c c   c  c "c c 6666 c Ý c
Ý46=3c  
c 
c c c
  
c  
 c
c  c

 cc  c
  
c  c c"ccc  c c
Ý  c  c   c
  
c  c 
c  c  c c c  c "8c
  c 
  
c  

c
  
c  c & c 
c
 c
cH 
Hc c  
 c  
c
  c 
c

c 
c  c  c   c  c c  c  c  c   c
 
 c  cc
c c

c
aonditional Ñranching
Ý c Ý46=3c 

c c  c c
  
c  c  c c  c  c
 c c  c H
  
c  

Hc
  
c Ý  c

  
c  c   c  
c c  c c

%  
 c
 c cc 
c
  
c c c"
  
c 

c c c c


c 
ccc  c c
ccH 
Hc c
 cc
c
  
c 

c "
  
c 

c

c c   c c  c  c H9Ý$#Hc   c
c Ý46=3c  c

c


c  
c
c   c
 

cc
  
c 

c c
 c c  cc
c 
 cc
  
cc 
c354c
 c   c c  c 35)c  c 
c  c   c  c  c  c

  
c 
 c
  
cÝ c
c c
c ccc
 cc$;;Ac cc 
cN%c354c cc c c  c
 c

c c
  
c 

c
  
cc

Direct Jumps
 c 
  
c  

c c  c  
c c c 
c

  c c c c  c  


 c c c  
c  c  
c
 c 
c c 
c c  
c  c  
c Ý c c   
c c

c H.c Hc
c *0"c 
c  c  c c 
c  c   c  c c


c c c  
c  c   c  c 

c 
c

  
cc

Ý c   c   
c  
c  c 1 c 7c 
c "c

  
c
c c
  
c 

c c c  c 1 c7 c

c " c   c  c   c  
 c   c 
  
c  

c
  c c
c 
 c cc 
c
  
c c cc
c c

c
Direct aalls

  c   
c c cc   cc  
c   c c
 c;";;c
  
cÝ c c   cccH.c Hc
c
c* cc

 
c  c Ý46=3c  c 
c ;";;c
  
c c  c
  c  c  
c   c "
 c 
c  c c 
c  
c


 c 
c c c  c   c
 c c  c ;";;c

  
cc

{nterrupts

c
 c cc  c c  c c cÝ46=3cc  c
 c  
ccH % 
Hc  c
c  c cÝ46=3c c
c

c 
c 
c c c  c Ý c  c H
 Hc 
c 
c c
  c  c c  cH
Hcc


c
 c c   c 
 c c   

c 
c  c
 
c c
c c cÝ46=3c  c cH
c Hc  c

 c  
c c  c   c 
c  c c  c  
c c
c  c c  c 
c
 c 
 c Ý c
 c 
 c
   c  c  c 
 
c  c   c c 
c  c

c 
c  
c 
c 
 c c  c Ý46=3c c  c 
c
  c 
c

 c c c c c
 c
c
 cc

Ý c  c c
  c c  c  c 
c  c  
c9 c
 c  
c 
c 
 c   c c c  c c  c  c 9 c

 c  c c c c  c 


  c 
c  c   c  c c
 
c

c c

c
c

Timers
Ý cÝ46=3c c  c  c c  c cc  ccc

 c c c
c
  c
  cÝ cÝ46=3c  c
c c
 c
 
2cc
c
3-cD
c c
 c
c c
cc c 
c

 c
5-c"

c c
 c   c
E-c.
 
cc  c c c  c cc

Ý c c  c  c c 


c c c ccc cc c
 cÝ c c c  c cc  c
c c  c c
 c  c c   c  c c c 
  
c c c   c
c  c
  c 
cc  c  cc

Timer uFRs
 c 
 
c  c  c Ý46=3c  c  c   c  c  c

 
c  
 c  c c c A
c   c c Ý($!6c 
c  c
  c cÝ($!3cÝ c c  c  c c 09! c+Ý(A1c
cÝ"A#-c
 c
 c c  c
c c  c c  c c09! c c
cc  c+Ý6Ý;6c
cÝ3Ý;3-cc

c  
c 09! c
 c c c c   c c  c c  c c
c
 c 
c 09!c  c c
 c   c c c 
c  c c 
 c  c

 c  c c  


 cc
cc
c c

c
13bit Time Mode (mode 0)
Ý  ccH6Hc cc3E% c  cÝ c cc  c c  cc 
c

c  c Ý46=3c c 

c    c  c  c    c  c
46C4c .
 c  c 3E% c   c c c
c  c
c
 c

cc

 
c c  c c
c3E% ccÝ;c c
c c6ccE3c 
c
Ý;c c
 
c  c E3c c c H  Hc c 6c 
c
 
c Ýc
Ý  c c
c3Ec  cc c c  c c c
c 2c
  c 6%Cc c Ý;c
c  c 6%)ccÝcÝ c c
c
c 
c c
  c
c
c

c 43>5c ccc cc3E% c  cc 6c c
c  ccc: c43>5c
c c cc


c   c c  c  c  
c c  c  c c 
c c c 
c

 
c c c 
Ic c   c c c  c 
c c 
:
c
   c c  c  c 
c  c 
c   c  c 
  
c
+c
  
c
cc  
c c c
c
c c  cccEc
 cCc
 -cc

16bit Time Mode (mode 1)c


Ý  c c H3Hc c c 3B% c   c Ý c c c  c 
c  c
c c 
 
c & c  c 3E% c c c  c c 3Bc   c  c
 cc

Ý;c c
 
c  c 6c c 5==c  
c Ý;c c
 
c  c
5==c c   cc6c
c  cÝccc
 
cc3c0
c c
c c c 3B% c   c  c   c c 

c c c B==EBc  
c
 ccc cc3B% c  cc6c c c  ccc6c c
B==EBc
c cc
c c

c
8bit Time Mode (mode 2)c
Ý  ccH5Hc c
c4% c% cc c c ccc
 Oc0  
cc  c c
cc5cÝc  c cH cHc

c Ý;c c  c   c  c Ý  c Ý;c   c 

c c  
c Ý;c
  c5==c
c c   
c
 
c
cc  
cc
6c+ c
c c cc c6c
c3-c c cc  cc cc  c

cÝcc

uplit Timer Mode (mode 3)


Ý  c c HEHc c c  %  c c  
c Ý  c 6c c c
c
cEc c 
 c c  c  c4% c   cÝ c cc
cÝ  c6c cÝ;6c
cÝ  c 3c cÝ6c* c  c
c c 6cc
5==c 
c   c c c 6c c  c   c  c  c c c Ý  c 3c
c
 cc ccÝ6cc

 cÝ  c6c c
c  cc c cÝ  c3c+ cÝ3c
cÝ;3-c
c
cc
c c6c3c c5c
 %%   ccc
c  c c
c  c c   c 3c
c  c   c  c c  c  c
 c 
c c
Ý6c Ý c c   c 3c
c  c  c c c
 
c  c

cc
c c cc

Ý c
c c cc
c cc
c  c  cc c cc
cc
c c  c  c
c  
ccc c
  c
c
 c cc
c c c cÝ  c3c ccc c
  c
c
 cÝ6Ý;6c c c  c  cc
c

c c

c
Reading the Timerc
Ý  c c c
c  cc 
c cccc3B% c  8c
 cc c
 c
c c   c  
cGcc   c
c cccc c  c cc3B% c
 c ccc
cc 
c c  c  c  cc

Reading the value of a Timer


c  c   c c
c 
c 4% c %% c c    c 4% c c !c
c c
c  c   c%% 
c 
c ccc  c  c c
c Gc c c  c 3%c c c  c   c 
c  c

cc

  c c c


c  cc3E% c c3B% c  c c  c cc
 c c c"
 c c c 
c cc c c
 ccc c  c c5==c 
c c c  ccc c  c c
3=c
c c c cc 
c  c c c  cc  c
3C5==c +  c c 3Cc  c c 5==-c c c c 3=5==c  Oc
* c c c  c  c c  c 5==c *c 
c c c  c

c
  
cc c
cc c %%c
 c c c
  c c
 
c 
c c  c  c  c c c  c  c
3C5==c c 3=6c *c
c  c   c c c  c   c  c 
c
3=5==cA  c   cc c  cc

c
Detecting Timer 0verflowc
A
c c c
  cc& c
 c c c  c  c  cc6cÝ c
c c c c  c
c    c
  c
c  c c c  c   c
c   c c  c
  c
c 

c 
c  c   c  c
  ccc6cc
c c

c
uerial port 0peration
A
cc cÝ46=3 c 
c  c   c c  c
 c^c
  c 

c  c c  c  c Ý c c  c  cÝ46=3c  c 
c

 c  c c
c ccc c c c
c c
 cc c  c cc c  c
c c c
 c  c c

c c c c c  c 
c c c c   c   c   c
 
c

c
c
cc
cc cAc
 c
c  c  
c
c   c Hc Hc  c
  c  c

c  c   c c
  c
c c  cc

  c c c
c c c c  c 
c c c
c c

  c  c  c   c   
c c 
c c c A
c

  cc c ccc c cc
c09!cc cccc c
 c c c c c c09!cc ccc c c  c c
Ý c Ý46=3c c  c c  c 
 c 
c c  c 
c


c c   c c c
c c cc c
 c 
 c c
 c  c c c c  c c 
c   c c c c
c c c
 cc 
 
cc c c%%  c  c c  cc c
c
c
c 
c cc

uetting the uerial Port Mode


Ý c c
c c cc 
c
c cÝ46=3 c
 c  c
 c c  c
  c cÝ c c cc cÝ46=3c  c
c
c  c c 
c cc c c cc
c
c  c cc
c cc 
cc

9 c I c   
c  c H0 c "
 Hc +0"A#-c 09!c 
c 
c c
 c cc c09!c   
 2cc

c c

c
c

Ñit
Ñit Name Explanation of Function
Address
)c 0(6c >9 c 0 c cc c6c
Bc 0(3c >$ c 0 c cc c3c
(    c"
 
c$
c+
c
=c 0(5c >1 c
 -c
!  c$
cÝ c c cc c
c  cc
Cc !$#c >" c
 c   c
Ý 
 c c4cÝ c> c cc 
 c
cc5c
c
Ec Ý*4c >* c
Ec
5c !*4c > c ! c c4cÝ c> c c  c
cc5c
cE c
Ý 
 c9c0c 
ccc  c
cc
3c Ýc >> c
 
 c
! c9c0c 
ccc  c
cc
6c !c >4 c
 c

  
c c c
  cc
c c
 
cc0(6c
c0(3cc

c  
c2cc

Serial
SM0 SM1 Explanation Ñaud Rate
Mode
6c 6c 6c 4% c0 c!  c A   cc35c
6c 3c 3c 4% c<!Ýc 0ccÝ  c3c+P-c
3c 6c 5c >% c<!Ýc A   ccBCc+P-c
3c 3c Ec >% c<!Ýc 0ccÝ  c3c+P-c

c
uetting the uerial Port Ñaud Rate
A
c c0 c c(c  c
c
  c c
cc
 c   c  c 
  c  c  c   c c c Ý c 
c
  c c 0 c  c  c 3c 
c Ec Ý c *c !c c  
c
 c
c c   I c  
c 
c
cc6c
c5c
cc
6c cc c c  c c   c  
c  cc35cÝ c

c c c  c c336=>(:8cc6cc c c  c
c >53=4Ec c 
c c 5c  c c c c   c  c    c
  
c  ccBCc c
336=>c(:c  c c c c c
c cc3)5)>)cc


c  c 3c 
c Ec  c c c c  
c c  c   
c
  c3c  cÝ c c  
c  c3c  c c   c
 c c c Ý  c  c 
c  c 
c 
c  c   c 3c c
  c c c c  c  
 c c c c c  c  c

c  c c cc  c 3c
c4% c% c c+  c
c5-c
c cc cc+Ý3-c c  cÝ  c3cc  c
cc  
c  cc
 ccc cc

Writing to the uerial Portc


A
c  c 0 c  c  c 
c   c 
  c  c 
c
c  c  c  c c c c c  c c 
c c 
c  c
ccc  c c
 
c c  c c  c c
c
 c  c c ccc :cc

Ýc cccc c  c c


c c c c ccc
 cSÑUFc+>> -c09!cc

Reading the uerial Portc


!
c c  c c  c  c  c c  c  c Ýc c c
c c c  c c
c& c
 cc c cc  c
c
 cSÑUFc+>> -c09!c c cÝ46=3c  c c c cRIcc

c0"A#cc

c
"ome Automation Appliancesc
c 
cc 
c
c 
c  cc
  c
 
c c   c  
 c 
c   c
c  
 c
 
 c   c  c 
c
c c c c
 c
  c c
c c c
c c
c 
c c
 cÝ c ccc c
c
  cc c c
 c
H 
c  
Hc  c  c c
  c 
 c 
c  c
 c  c  % c 
 c c   
c  c  c 
c

 c 
c  c 
c   
c   c Ý c 
 c
c
c c 
c
c  c
c 
c 
c
 c c  c  c 
 c c c 
 

c   c  
c

cc
cH 
 Hc c  
c
 c+  c c

 c
 c   -c
c c cc  c  c


c
c
 
c  c
c 
c
c
c c  
ccc
 
c c 
 c c  c  
c c 
c   c c   c
  
c   c  c  c  
c  c 
c
c 
c
 ccc c c c ccc
c  c c

A  cc  cc
c 
c c c
  

cc
c

 c 
c 
c 
c  c  c c 
 c 
c  
c
 c
 c 
c 
c 
c 
c c c c 
c ( c
  c   c 
c 

c 
c

 c c   c
 
c   c  c   c 
c !91c c 
c   c c 
c
 c c
c c  c 
 c

c
Different "ome Automation Appliances
1 "eating, Ventilation and Air aonditioningc

c /
  
c 
c  c "
  

c  
c
c
  c
c   c
 c+  -cÝ c c
 c
cc
 c c  
c  ccc 
 c
c

%
 c
   c  c c 
c  c c 
c 
c c  c

 

c c 
c  c 
 c c 
 c  c  
 c

c
c c
  

c   c c

2 Lighting
;  
c
 c   c
 c  c cc
 
c
 c   c

Úc $
 c
 ccc c   cc c  cc
Úc  
cc  ccc 
 
c
c c
cc  cc
Úc ! 
cc c 
 
c 
cc ccc 
c

 cc

3 Video
Ý c
 c  c 
c 
c    
c 
c c  c
 ccc  c
c cÝ/ cÝ c c c
c  cc
 c %:
c c


  
c c  c
 c c  c  
c  c c  c  c  c

 c  cc c 
c c
c c  
 cc  c c
 c c c

c c

c
4 Natural lighting
# c   
c 
 c
 c 
 
c
 c  c ;"1c
 c    c 
c 

 c !
c 
 c
c  c c !9c

c c  c
c c   c 
c
  
c  c  c
 c c 
c   c c
  :c
 c

5 Audio
(& c 
 c   c  c  c 1   
c
2c Ý  c
 c  c 

 c  c  c  c 
 c c  
c c  c
  c c c c
 2cc

9c "c="ÝcBcc c c


 c
cc
9c 5c  cc  c
c+Cc c   c
c5cc
 cccc 
c c c  -cc
9c ccc
 c cc
c   cc

Ý c  c
 c  c 
c 
c    
c  c

c  
 c  c  
c c 
c  c  c  c
   
c  c 
c  c  c c c  c
c 
c  c  c
 cÝ c c c
c  cc c %:
c c

6 uecurit
"
 c
c
  
cc  c   c

  cc 
c c
 c
c c
c  c  c
 c  c 
c 

c  c c   c c  c 
 c 0 c
  c 
c c 
 c 
c  c   c c   c   c
 
c c  c  c 
 c  c  c c (
 c  c  c 
c
0 c   c
c
c 
c 
 c c cc
c
c
c
  :c
c
c
 c c  c  c c  c
 c c cc 
c

c
Ý c  c  c
 c 
 c 
c    
c c  c
  cc

Úc 1 
cc c
  
cc
9c 
 cc 
cc
cc
9c 
 cc
 c
cc 
 c
9c 
 cc c 
cc
9c 
 cc   c 
 cc
Úc 0  
cc  
cc
Úc 1 
cc c c c  c c+ c c c
c c
 -cc
Úc ( c cÝ 
cc
Úc   c
c c
cc
 c

º Intercoms

c
 c  c  c 
 
c  c c    
c 
c
c  c 
c c  c

Úc <  c
c c
c
 c c c

c c

 c c c

c"c  c
  cc c
  
cc
Úc Ý 
 
cc  cc
Úc 
 
 
cc

<
c  c    c  c 
c  c 
c c 
 c 
c

 c c c c

8  Plant Watering
Úc c+ -c
c  ccc
c0cc
Úc 0cc+
c
c
c
 -cc

c c

c
c

Project ucope
c
Ý c  c 
c c c  c 
c 
c  c 
c
 
c  
 c  c  c 
c   c Ý c
 c   
c
 c  c c  
c  c  c c  
 c 
c 

c
 c  
c c  c
 c 

c 
c c  c
 c c
 cÝ c c c c
 cc 

c c
  c c  c   c c 
c 
c Ý c   c  c 
c
 c  
c  c c  c  c 
c   c c
 c 

  c c  c c 


c c 
c c  c   c 
c
 c c c
c  c  c
c 
 c c  c  c c c 

c
 
c   c   
c
  c   c 
c 

c  c
    c
c
c cÝ c  c c c
c
 
c  c
c 
c  c    c  c  c 
c   c 
c

 
c c
cc
cc  c   c
c c c c

c
c

  c
  cc
 :c c  c 
c
Ý c  c  c c c &c
c
 
c c
c c
  c c c c  
c 
c
c
c c

c
0bjective of u stem
c
Ý c
c& cc c  c cccc  c
c
 c   cc c
c& cc c  c  c  c
c 
 c 

c
  c     c   c  c  c
 c c !c  
c  c . % c 
 c 
c c 
c

 c  c   c 
c c  c 
c 0(0c    c 
c   c Ý c
& cc c  c cc
c c  cc
 c c  c

c c c
c   
c   c 
c  c   c 
c  c c
  c  cc c  cc c c    c
c
 c c
c 
c % c   c  
c  
c  c c  c
 c c
  c
c c  c
cc c c
c
  c  c c cc cc
c& cc c  c
c
c & c c  c   c  c c  c c 
c   c c

c   c  
c  c   c  c c 
 
c
 
c 
 
c   c 
c c   
c  c c  c
  c c 
c   c  
 c  c 
c  c c
 c 
c   c 
 c  c  c 
 c  c 
 c c 
c
& cc c  c  c

Úc # c c
cc c c
cc
Úc c c  c  c c
c
c 
cc

c c 
c c c c;  
c
c c
  c
c
cc
c cc
c 
c cc
Úc Gcc c cA
c c
 c  cc
 cccc  c 
c c c c c
 c  c
c c
c c  cc
c c  c
 cc
Úc "c c c
 c  c c c 
ccc
 
 cc c  cc
Úc ;c
c c c
 c  c c c

c c
0
%;
c c%;
cc
c 
c c  c

 cc
Úc 0c c  c 
c
c cA
cc
 c
cc 
c c  c  c c c
c

c
 c

cc c 
c c
c
c
% c
 c cc
 cc c
c  c ccc c
ccc c  cc
Úc cc c
c c c  cc
cc
c c
c
 c  cc
c c c  cc
 cc 
c ccc 
ccc cc

c
Functionalit of u stem
c
Main Functionalit aore
c
±cA

c % c  c  c  c  c  c
±c  c"

  c
±c!% c  c c c c 
c
±cÝ  cc c 
c+
-c 
c 
 c
±c"
 c1 c; c
±c"
 c c 
c
±c/  c  
c 
c  c c  c

uwitch 0N/0FF Electronic Appliances


(Desktop/Web Ñased)
c
Ý c  c c
c  c   c
 
c c  cc
 c 
c c
cc c c  c
 c c  cc
 c
 c 
c 
 cc   c 
c c 
c c 
c

 c c
  c
c c  c
c c c  c

Timer to Automaticall uwitching (0N/0FF)


Electronic Appliances
c
Ý  c c c  c
c c  cc c  cc
 c  
c 
c  c c  c <  c 
c  
c  c  c 
c c c
 
cc c
c<  c
Ic ccc  c c
c

c c   c
 c c c c   c c
c c  c c
 c
c
cc c c c  c
c
c

c
Live utreaming Videos of "ouse through
0nline uecurit aameras
c
0 c cc c  
c  c
c c  cc  c c


c c c  
c c c  
c  c 
  c
c  c
 c # c 
c 

c   c c c c   I c    c
  c 
c c c 
c  c  c 
c   c  c   c c  c
 cc c 
c
c
aaptures Pictures 0f Remote Location
c
<  c 
c  c    c c c  
c  c 
  c
c  c
 c 
c   c  c c  c 1c # c 
 c   c c

 cc c  c  ccc
c c  c  c c
c c  c
c c  c
 c

c
c c<  c
c
 c   c c 
c
c
c
aontrol Electronic Door Locks
c
# c  c
c
 c   c c c
c c cc

c
  c 
c   c c <  c c  c 
c  c c  c 
c c
 c 
 c  c  
c c 0 c 
c 
c  c  c  c  c c
 
c
c
aontrol Room aurtains Ñ Pa
c
Ý c  c  c c  c c 
 c  c  
c c  c c 
c
 c # c 

c 
c 
c  c  
c c c c 
c  c

  c<  c
Ic
ccc  c
c
 c 
c
c
c

c
Loud Alarm to Alert about Danger
c
 
c
c

c  c ccc c  c c  c
  c c c  c 
c c  c  c   c 
c c  
c
c c
 c


c
uecurit
Ý  c  c c 
  c c 
c  c  
c 
  c 
c
 c  c 
c
c 
c 
c Gc c  c 
c c

 % c  c  c  c  c  c 
c  c c
    c  
c   c c Gc 
c  c 
 c  c  c
 c  c

c   cI cc c c
c+ c   c
 c c c c c
-cÝ c
c c
  c
  c cc
c c c  c  c c  c c
c 
c c c
c  c
c  c c  
c  c c 3Bc  c  
c c
 c c  c
 
c 
c 
 c c  c c  c   
c Ý c 
c c
   c 
c 
c c c 

c c  
c   c

c 
 c 
c c cc

# c c c c  c  c  c   c  c  c c  c


 
c  c  
c c
 c c c c c    c  c

 ccc
cc  cc   
 cGc ccc
c 

c c  c


c c  c  c 
c 
c   c
 c  c 
c    c c 
c  c  c c  c c
 c c  c 
c  c c c  cc   c c
9 c   c
  
c c  cc c" c0 cc

c c

c
Ñlock Diagram
c

c
c c

c
c

Pa connectivit of the circuit


c

c
c c

c
c

Areas of application of Automation


c

c
c c

c
c

c
c c

c
c

c
c

c 
c c
   cc
c 
  c 
c

c c

c
c

Transmitter uectionc

Circuit diagram of Transmitter Section

c
c

Receiver uectionc

Circuit diagram of Receiver Sectionc