HỆ VI ĐIỀU KHIỂN VÀ BIT MCS51 !"#$!$%"" !"#$!$%""!"#$!$%"" !"#$!$%"" #" #"#" #" #&'" #&'"#&'" #&'" " "" " (() (()(() (() "*+" "*+""*+" "*+" , ,, , /01234-567-892:45;<16238 /01234-567-892:45;<16238 /01234-567-892:45;<16238 /01234-567-892:45;<16238 = == = /01234->.? @7 /01234->.? @7 /01234->.? @7 /01234->.? @7 7 77 7 /01234-1.A67 /01234-1.A67 /01234-1.A67 /01234-1.A67 5 55 5 /01234-7-892:4B892C4D62C8E-62:4 /01234-7-892:4B892C4D62C8E-62:4 /01234-7-892:4B892C4D62C8E-62:4 /01234-7-892:4B892C4D62C8E-62:4 2 22 2 /0123 /0123 /0123 /01234-F;G19/=6H 4-F;G19/=6H4-F;G19/=6H 4-F;G19/=6H I II I J JJ J"*+" "*+""*+" "*+" " "" " !+%" !+%"!+%" !+%" K KK K$ $$ $ K KK K+ ++ + I II I !"%%% !"%%%!"%%% !"%%% L LL L M MM M !" !"!" !" N NN N !%OL !%OL!%OL !%OL P PP P ! !! ! !"# " "" " O$#Q+"* O$#Q+"*O$#Q+"* O$#Q+"* O$#Q+"* O$#Q+"*O$#Q+"* O$#Q+"* , ,, , R892C45;<16238E62:8H-;/S R892C45;<16238E62:8H-;/SR892C45;<16238E62:8H-;/S R892C45;<16238E62:8H-;/SK KK KH-,4-A-65T7- H-,4-A-65T7-H-,4-A-65T7- H-,4-A-65T7-=6H =6H=6H =6H = == = R892C45;<16238E62:8 R892C45;<16238E62:8R892C45;<16238E62:8 R892C45;<16238E62:8K KK KH-8U-,/H=,?HD.C4A=.3=6HVH.?7D.3H-,9D.:6 H-8U-,/H=,?HD.C4A=.3=6HVH.?7D.3H-,9D.:6H-8U-,/H=,?HD.C4A=.3=6HVH.?7D.3H-,9D.:6 H-8U-,/H=,?HD.C4A=.3=6HVH.?7D.3H-,9D.:6 7 77 7 R892C45;<16238E62:8 R892C45;<16238E62:8R892C45;<16238E62:8 R892C45;<16238E62:8K KK KH-8U-,/H=,?HD.C4A=.3=6HVH.?7D.37.?DT4- H-8U-,/H=,?HD.C4A=.3=6HVH.?7D.37.?DT4-H-8U-,/H=,?HD.C4A=.3=6HVH.?7D.37.?DT4- H-8U-,/H=,?HD.C4A=.3=6HVH.?7D.37.?DT4- 5 55 5 R892C45;<16 R892C45;<16R892C45;<16 R892C45;<16238E62:8 238E62:8 238E62:8 238E62:8 K KK KH-8U-,/H=,?HD.C4A=.3=6HVH.?7D.3H-,9D.:6 H-8U-,/H=,?HD.C4A=.3=6HVH.?7D.3H-,9D.:6H-8U-,/H=,?HD.C4A=.3=6HVH.?7D.3H-,9D.:6 H-8U-,/H=,?HD.C4A=.3=6HVH.?7D.3H-,9D.:6 I II I !%OLO$#Q+"* !%OLO$#Q+"*!%OLO$#Q+"* !%OLO$#Q+"* O$#Q+"*" O$#Q+"*"O$#Q+"*" O$#Q+"*" M MM M +"*"O$#Q+"* +"*"O$#Q+"*+"*"O$#Q+"* +"*"O$#Q+"* -;W4AI -;W4AI-;W4AI -;W4AI 6D62C8E-62:4=6HS 6D62C8E-62:4=6HS6D62C8E-62:4=6HS 6D62C8E-62:4=6HS * ** *K KK KA892X4Y4-*-8/ A892X4Y4-*-8/A892X4Y4-*-8/ A892X4Y4-*-8/ I II I 6F;G19/ 6F;G19/6F;G19/ 6F;G19/ " "" " #J #J#J #J ** **** **J%J J%JJ%J J%J I II I #J #J#J #J J%Z+! J%Z+!J%Z+! J%Z+! M MM M L#+OJ L#+OJL#+OJ L#+OJ $ %&'()*+,-./-01234&./5&61-7+89:93;-<'93=&* %&'()>*?:5;1'+4&1-7+@A %&'()B*3,.&5,989:93;-<'93=&8?091'5,.C25D&'?0&65+E9CF+E1'/3G3.C E.'+E1'+&'* %&'()(*+E1':5;&6'5;G5,H-I&6J3HK:5+E&* %&'()*+E1':L&'.'?I9:93;-<'93=&/3J+M8+I'93=&.'L.'?I969+&./34&>J3H* %&'()N*+E1':5;&6'5;G5,'93=&.'LH-I&6"* %&'()K*+E1':5;&6'5;G5,'93=&.'LH-I&6"150.'34F2+051'-54&669?I'5E1* %&'()@*+7&6.50F.+O.1+018-I&6&'?0@A* %&'()AP+,-./-0125D&'?0234&./5&689:93;-<'93=&* %&'()Q*9&''5E+1+01'6+0&2+&<.'+&'6'91'5&'50F.'+&'6'9* %&'()*9F3/'5+E.:5D&6?7F5H3Q* %&'()>*9F3/'5+E.:5D&6?7F5H3>* %&'()B*9F3/Q'5+E.:5D&6?7F5H3B* %&'()(*+01&6-5;&R-&6:S+:3,&.9F3/ 15-&.3/* %&'()*5:5D/5D&6R-&6.SI234&&65+I9* %&'()N*?:5;1'+4&1-7+@A>8?09&65T8+I5>J+I*Q8+I>UJ+I** %&'()K*5+E.:5D&61-7+.9F3/>?71'3,:5D.SE:5D&6&+EVJ+E9* %&'()@*5+E.:5D&61-7+.9F3/>?71'3,:5D'-&'+D&HSTJ93D-* %&'()A*?:5;<'5,91-7+./-M3;&HSTJ93D-&5,9.93,V* %&'()>Q*9+7&:5;.'?I969+&* %&'()>*9+7&:5;.'?I969+&./-M3;&HSTJ93D-F5HQ* %&'()>>*5D.S0&6H-E&6<93=-Q:3=.+W&6.'34F&65T/+2+X&6.'+&'6'9HL1'* %&'()>B*-&61+,VR-&61'5./-M3;&HSTJ93D-&5,9.93,V* %&'()>(*?I2+05V'+0.R5&6HSTJ93D-* %&'()>*3,.&5,9&'93;-89RS7JM0* %&'()>N*'93,.J+DV.5,1:5D+-H* %&'()>K*9:93;-<'93=&.'SE1'93D&1'S?&6./%&'1'Y&'./5&6>./S?I&6'?EV<'54&68+I150&6+O.* %&'()>@*9:93;-<'93=&@A>150N&6-5;&&6+O.* %&'()>A*+,-./-01&6+O.1-7+89:93;-<'93=&* +7&6()*'S01&+W&61+011'+4&1-7+V5/.B* +7&6()>*+01.'+&'6'9G+-<'989:93;-<'93=&2L/3G3.* +7&6()B*+0129../5&6.'+&'6'9./+E&6.'+09* -;W4AI -;W4AI-;W4AI -;W4AI 6D62C8E-62:4=6HS 6D62C8E-62:4=6HS6D62C8E-62:4=6HS 6D62C8E-62:4=6HS * ** * K KK KA892X4Y A892X4YA892X4Y A892X4Y4-*-8/ 4-*-8/4-*-8/ 4-*-8/ 6F;G19/ 6F;G19/6F;G19/ 6F;G19/ +7&6()(*+0129.JSE+1'5E&2+&<.'+&'6'9* +7&6()*50F.+O..+DVJ3D&'89:93;-<'93=&* +7&6()N*+01.'+&'6'9.9F3/89:93;-<'93=&* +7&6()K*+0129../5&6.'+&'6'9"* +7&6()@*+0129.1'5E&F5H3./5&6.'+&'6'9"* +7&6()A*+0129../5&6.'+&'6'9* +7&6()Q*+0129../5&6.'+&'6'9>* +7&6()*+0129../5&6.'+&'6'9:93;-<'93=&./-M3;&HSTJ93D-* +7&6()>*+01<93=-./-M3;&HSTJ93D-* +7&6()B*50F.+O..5,1:5D2+-H* +7&6()(*50F.+O.1'S01&+W&61+0129.1-7+.'+&'6'9* +7&6()*50F.+O.1'S01&+W&61+0129.1-7+.'+&'6'9* +7&6()N*50F.+O.1+0129.1?I1-7+1+01&6-5;&&6+O.* +7&6()K*50F.+O.831.5/:L+1'Z&6+O.* -;W4AI -;W4AI-;W4AI -;W4AI 6D62C8E-62:4=6HS 6D62C8E-62:4=6HS6D62C8E-62:4=6HS 6D62C8E-62:4=6HS * ** *K KK KA892X4Y4-*-8/ A892X4Y4-*-8/A892X4Y4-*-8/ A892X4Y4-*-8/ M MM M 6F;G19/ 6F;G19/6F;G19/ 6F;G19/ * @QP !"#! !"$ % !"!&'()* !"'" !"+,-.# !"()$ /"#0 !"+!1120"34 31$5 !"()0#-"6! #!-"6! !"-$ 5310# !"+33 **3#""0 *7 80# !"1--9 : % !"$ : 5$ : 5;5$ <#3 !"#! !"*;5 #3 1#! !"3!$5"! - !"$ =311"3 6#>-2!#-" !" 1"$ ?3- !"13 1 !"**4$@11* -*-*6!*0#3 $A!"#6! !" !"#!".B# 313$ 5601161-6-04 !"-;5!3CA!!$ 83-!0!!#,#0#3 1*0#30#13-! D0# !"C#E0#3 &0# !"!11-- !0#"$ 5110033"0! 31$ 53*0 3!FGAH/$@ ;! ! $ 5 3 " 3 !" ! I 4 > J19KKBBB$-!$-KL 53--0*-3! -;W4AI -;W4AI-;W4AI -;W4AI 6D62C8E-62:4=6HS 6D62C8E-62:4=6HS6D62C8E-62:4=6HS 6D62C8E-62:4=6HS * ** * K KK KA892X4Y A892X4YA892X4Y A892X4Y4-*-8/ 4-*-8/4-*-8/ 4-*-8/ 6F;G19/ 6F;G19/6F;G19/ 6F;G19/ N NN N GA5M:N23!+O5(2!# 61$ %3+O5N261'"P-$5>!12!3 3!1!$ %3+Q5N261'"HPRSA$511!1! I6-$ %3+T5N261'"U!0-1 I- !$53111 !$ M0A5M:N2!A5M:N)(-A5M:N2--# !!1!+"$ @"3-.6"* *#!!$ VW#331*#" "0 *3!1*-".*-"*-"- 73 !"3#-!E$ * )P ?3-"!%3A5M:N2*!0 3+T5N2.+T5N)$530011 0$ 53A5M:N2.3-09 ♦ 5'8"X/FM@RSA#3!3$ ♦ 52)+<"RFA$ ♦ 'P K1Y;1KS1Z+$ ♦ 51"#!1$ ♦ 531['8"#3!3$ ♦ 531['8"#3!$ ♦ 5)2O3" $5! !"$ G3A5M:N2.A5M:N).6 1--*1*30"06 "3$%6#3+T5N200# 3+O5N2"+Q5N2$%3+TMN20"+T5N2* -11!$\00 $G1">13+T5N2K+T5N)$ [ [[ [ M3"':2$53 -9 : 8F/]--12*-1)PM^$ -;W4AI -;W4AI-;W4AI -;W4AI 6D62C8E-62:4=6HS 6D62C8E-62:4=6HS6D62C8E-62:4=6HS 6D62C8E-62:4=6HS * ** *K KK KA892X4Y4-*-8/ A892X4Y4-*-8/A892X4Y4-*-8/ A892X4Y4-*-8/ 6F;G19/ 6F;G19/6F;G19/ 6F;G19/ : <3!Y-#!Z$ : %RFAX!0R-!$ : A#13#$ : 8 !"&*"#!*-K$ : GF*<*#1'1O*12*1)*1(-$ : G-P5Y1-Z$ : 5#!#1Y#1Z$ : G 1MPY01Z$ : G!;RY00Z$ : \2033D!"4>- D!"4>" $ %&'()*+,-./-01234&./5&61-7+89:93;-<'93=&* 5 3 1 " 1 )F/]*-12*-1)*-P5* -;W4AI -;W4AI-;W4AI -;W4AI 6D62C8E-62:4=6HS 6D62C8E-62:4=6HS6D62C8E-62:4=6HS 6D62C8E-62:4=6HS * ** * K KK KA892X4Y A892X4YA892X4Y A892X4Y4-*-8/ 4-*-8/4-*-8/ 4-*-8/ 6F;G19/ 6F;G19/6F;G19/ 6F;G19/ 1*PM^*!;R*-!* 3!$ G1!!1!D0!3 C1!1!#1 "#$ [ [[ [ M3+T5N2"':)$ %3+T5N2'O$G)'1YE!2 )Z*-,3 13;S_1 1`.!10#!04>34>#!1 $ %&'()>*?:5;1'+4&1-7+@A $ 5P9 5/.QP PO)0()a(T$ G30##- 1O#!-3;SY;1:S1Z$ G3!0#-1O !04>0#!FbQaFbO$YF##0094>*#9#!Z 5/.P P202a+$P2>2#!-3 1;S*12$ 5/.>P P))0)2a)+$ -;W4AI -;W4AI-;W4AI -;W4AI 6D62C8E-62:4=6HS 6D62C8E-62:4=6HS6D62C8E-62:4=6HS 6D62C8E-62:4=6HS * ** *K KK KA892X4Y4-*-8/ A892X4Y4-*-8/A892X4Y4-*-8/ A892X4Y4-*-8/ SS SSSS SS 6F;G19/ 6F;G19/6F;G19/ 6F;G19/ G30##- 1)#!-3;SY;1:S1Z$ G3!0#-1) !04>F+aF2N$ 5/.BP P()02Oa2Q$ 51"*#"33! .6.+T5N2':29 P($O Rcb \#!1$ P($2 Gcb \ #!1$ P($) 0INT \&O$ P($( 1INT \&2$ P($' GO \ --KO$ P($N G2 \ --K2$ P($[ WR G63#!!$ P($Q RD G63#!$ +7&6()*'S01&+W&61+011'+4&1-7+V5/.B* $ 5639 PSEN !" #$%& PMH\!6)T#11- OE Y1!. RD ZHPRSA11"-!$ 81-# PSEN * 1 PSEN $ PSEN -13+T5N2!"!$5-! HPRSAD0#!!+T5N23- !$8+T5N2HPRSA PSEN -!2$ '()*#)++ ,,*#$%& 83+T5N2" *1O!04> 0#!_FbQaFbO`#1#!4>$G6F/H (O#!-63314>#! ;5$d-':($ G6F/H!- 1O!4>1 4>2$ 5 6F/H0I2K[0#&3 3#6 F/H!- !11 $ -;W4AI -;W4AI-;W4AI -;W4AI 6D62C8E-62:4=6HS 6D62C8E-62:4=6HS6D62C8E-62:4=6HS 6D62C8E-62:4=6HS * ** * K KK KA892X4Y A892X4YA892X4Y A892X4Y4-*-8/ 4-*-8/4-*-8/ 4-*-8/ 6F;G19/ 6F;G19/6F;G19/ 6F;G19/ S SS S G!13F/H#!- !13!1X!0R-+T5N2$ ':(>!-3+T5N)HPRSA3" 6F/H*!33#33 $ %&'()B*3,.&5,989:93;-<'93=&8?091'5,.C25D&'?0&65+E9CF+E1'/3G3.C E.'+E1'+&'* EA #- %),,& G6 EA (2!-2.-O$ \ EA !-!2YeNZ30$ \ EA -!OYO%Z30$ .".,& \RMGT!R0+T5N2$M-0':($ 81.0-003$806 01-6!)"-"*1 4613$ G00-&':)$ GD!-P5fOOOO@$M0* 3!&4>OOOO@ 3!&4>OOOO@$ . HỆ VI ĐIỀU KHIỂN VÀ BIT MCS51