




版權(quán)說(shuō)明:本文檔由用戶(hù)提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
?жㄖ
??????????ㄐ?????????
????????
????????????
亶??????
???????????????CPU?RAM?ROM?
?
/???
?
?????
а???????к??????????а????????????ъ?
亶??↖??
???????????????а??????????ㄟ1ˊ1
?????
????к?????????????
???
??????а???1976~1978????????????????In
???
MCS-48?????????????
а???
??8?CPU??
/?
????I/O??RAM?
ROM???????ъ亶???????1978~1982?
?cn
????????а學(xué)???????I/O??8?
???16????????????64K????
???????
??????學(xué)????????????
н
???
?
???й???1982~1990???16???????16?????CPU?16????
RAM?
ROM???а?
???
???
????????
??????
?
In
???MCS-96??仁??12M??
RAM
?232???ROM?8K????
???
?8???
??10?A/D????
儈???/?
?????????1990?~????
?????
??????
????????????
??
???????
???
???
??
儈????1ˊ2
?????????1??
?RAM???????????????儈?????;?2?
?
???к????????
?ROM?
??
?RAM
オ?к
?;?3????
??а??????
??;?4?
?а??
??????????I/O??
??
;?5??21???
????;???
????
?
(6)
????
????
???????????
??オ??1ˊ3
???????
??ж?
4??????
8??????
1始1
MCS-51?
???
?????
???
??
???8051AHH
MOSROM
(4k)128??8031AHAH
MOS128??8751HH
MOSEPROM?4K?128??80C51OSROM
?4K?128??80C31OS128??8051H
MOSROM
?8K?256??8031H
MOS256??1ˊ4
??????ж?
???
??????????
???
??ж??
???п?
???
?
??
??????
???
???
???????
?
ㄖ
MCS-51???????
??ㄐ????Mw1??8051???????
???
????P0?P1?P2?
P3??I/O?????
??
???????
?
??????
???2ˊ1
MCS-51?????????????點(diǎn)累芯皮管腳0ж?
8051??????腳0
腳廉?????????
???
展??皮管腳廉累0
累廉
累必
累恰
腳蔽照
置蔽照?
2-1
MCS-51????????置溢空ww置類(lèi)空w.PLCw??
8051????
????
??
?????
?
2-2
?8051????
???л?
??????
2-28051??????環(huán)環(huán)環(huán)環(huán)留廉000留??置類(lèi)空0環(huán)環(huán)環(huán)留0000留?
置類(lèi)空狀溢模廉??
置類(lèi)空狀溢模0脹環(huán)置置溢空????????0?恰?00留必0留方0留環(huán)環(huán)留??置溢空0000留環(huán)環(huán)環(huán)環(huán)留?
2-38051??????恰0留??????
?2FH2EH2DH2CH2BH2AH29H28H27H26H25H24H23H22H21H20HD7D6D5D4D3D2D1D0?
2-48051
?RAM??
?7FH7EH7DH7CH7BH7AH79H78H77H76H75H74H73H72H71H70H6FH6EH6DH6CH6BH6AH69H68H67H66H65H64H63H62H61H60H5FH5EH5DH5CH5BH5AH59H58H57H56H55H54H53H52H51H50H4FH4EH4DH4CH4BH4AH49H48H47H46H45H44Hn43H42H41H40H3FH3EH3DH3CH3BH3AH39H38H37H36H35H34H33H32H31H30H2FH2EH2DH2CH2BH2AH29H28H27H26H25H24H23H22H21H20H1FH1EH1DH1CH1BH1AH19H18H17H16H15H14H13H12H11H10H0FH0EH0DH0CH0BH0AH09H08H07H06H05H04H03H02H01H00H??????E0H??????
??ACC.7?ACC.0E7H?E0H*
ACCF0H??B.7?B.0F7H?F0H*
BD0H?????PSW.7?PSW.0D7H?D0H*
PSW81H?????SP82H?
?
?DPL83H??
?
?(?8?)DPHA8H??
?
?(儈8?)IE.7?IE.0AFH?A8H*
IEB8H?
???
?IP.7?IP.0BFH?B8H*
IP80H?
???
?P0.7?P0.087H?80H*P090H??0P1.7?P1.097H?90H*P1A0H??1P2.7?P2.0A7H?A0H*P2B0H??2P3.7?P3.0B7H?B0H*P387H??3PCON98H???
?⌒???SCON.7?SCON.09FH?98H*
SCON99H????SBUF88H??????TCON.7?TCON.08FH?88H*
TCON89H?
?TMOD8AH?
?
??TL08BH?
?0?8?TL18CH?
?1?8?TH08DH?
?0儈8?TH1?
?1儈8?累0富高照
4累0富高???
4???????????腳廉腳必蕩點(diǎn)點(diǎn)空芯蔽??展??????
2-5P0?????δ度ε緊0?????δ微ε緊度?????累廉富高4???????????????к
??腳蕩點(diǎn)點(diǎn)照?2-6
P
1?4????累廉富???
?
2-6P1?????δ態(tài)ε緊微?????累必富高???
累必富高4照
4???????????腳蕩點(diǎn)點(diǎn)????к
?空芯蔽????
2-7P2?????δ意ε緊態(tài)?????累恰富高44累恰富高???照??????????????腳蕩點(diǎn)點(diǎn)???
??к
??????
?P3??????
2-8δ意ε緊態(tài)?????累恰富高???累恰富高44照??????????????腳蕩點(diǎn)點(diǎn)????
????
??к
???
2-8P3???????
2-3 P3???????I/O???
???P3.0RXD???
??
ㄟP3.1TXD???
??
?ㄟP3.2INT(————)0
ww???
??0P3.3INT(————)1???
??1P3.4T0?
/??0P3.5T1?
/??1P3.6WR(———)??RAM?
?P3.7RD(———)??RAM??а?
?????????
???脹?
2-9
?????
?2ˊ2
MCS-51
???
??
?ww
w.P
LCw
orld
.cn????廉?
????????必???????度κ???微κ?????溢種狀脹廉脹必脹恰脹慢脹拉脹?·商蹤器廉??廉??
??ла
?商過(guò)器必??廉??
?廉??必??
??
?
??????ла
??ла
?脹廉脹必脹恰脹慢脹拉脹?
?
??商器脹廉脹必脹恰脹慢脹拉脹脹廉脹必脹恰脹慢脹拉脹?
2-10
MCS-51??
/?????商ww.3ˊ
?????
MCS-51???
??
?
???
?й?
????ROM?
RAM?
??溢種狀脹廉脹慢脹脹拉脹恰脹必累脹狀管溢廉拉?
溢方溢廉拉?
溢方累必累0溢操?溢0溢操?溢0???
2-11????ROM??1ˊ????ROM??2ˊ????RAM?
?溢種狀脹廉脹慢脹脹拉脹恰脹必累點(diǎn)留?累0累點(diǎn)種??????????脹廉脹慢脹脹拉脹恰脹必累脹狀管置照累必累點(diǎn)留?累點(diǎn)留?照累留??
必累?累點(diǎn)種?????
2-12
????RAM??微κ態(tài)
空點(diǎn)脹始拆度??????
????а?
???腳腳種商蹤器?????蔽腳溢種廉置???
??蔽腳溢種必蕩點(diǎn)點(diǎn)蔽腳溢種必蔽腳溢種廉蕩脹脹商過(guò)器方0拉廉?????方0拉廉管點(diǎn)???
??蔽腳溢種廉蔽腳溢種必蕩脹脹方0點(diǎn)拉廉?
????方0點(diǎn)拉廉點(diǎn)廉點(diǎn)必?
2-13
MCS-51
???1ˊ
?????2ˊ??????
?????????1ˊ
?????照廉照必置脹腳展蕩累照蕩點(diǎn)點(diǎn)蕩脹脹置溢空????
??????
2-14
8051??????2ˊ??????蕩點(diǎn)點(diǎn)方0拉廉蕩點(diǎn)點(diǎn)置脹腳展累蕩照蕩脹脹置廉題點(diǎn)必必μ環(huán)置狀脹狀腳蕩點(diǎn)點(diǎn)方0拉廉蕩點(diǎn)點(diǎn)蕩脹脹點(diǎn)廉必必μ環(huán)置必
置廉廉題
廉題點(diǎn)必必必μ環(huán)商蹤器к???商過(guò)器?????置狀脹狀腳蕩點(diǎn)點(diǎn)方0拉廉蕩點(diǎn)點(diǎn)置脹腳展累蕩照蕩脹脹置廉必00點(diǎn)必必μ環(huán)置必廉題??????
2-15????脹腳展累蕩照3.????у??????PC0000HACC00HB00HPSW00HSP07HDPTRwww.P0000HP0?P3FFHIP00000BIE0XX00000BTMOD00HTCON00HTH000HTL000HTH100HTL100HSCON00HSBUFн?PCON(OS)00000B微κ意
空點(diǎn)脹始拆度?????????
?а?
???
???PCONPCON??
???
?й?
??
?D7D6D5D4D3D2D1D0SMOD———GF1GF0FDIDL?пㄖ
MSC-51
????
???3ˊ1
?
?
?????ф????
?
ж?
?????????
????
?
???
???????????[???]????
[???]
[
?][???]???????й???22HINC
AADD
A?#22HMOV
5EH?4FH·
04H·85H?4FH??5EH?
3-1???
???·
24H3ˊ2
??
?ж?
??????
?п?
??
????
???
????
?????
г????3ˊ3
MSC-5
1
?
??
?
?
?
???
??
?????MSC-51?ww1w.P1LC1w
?
??學(xué)???
?
?學(xué)?
??29???
?
??學(xué)?
??24?????
?學(xué)?
??24???
???學(xué)?
??17???
?
?
學(xué)?
?
?17??方0留ла?
?溢種芯拉慢留齒e首模拉慢留必000留必00廉留必00必留必0拉留·累點(diǎn)?
必00必留↓?
??????商累點(diǎn)器模必0拉留?
??
3-2??????
ㄖ
空點(diǎn)脹始拆度??????ぁ?????溢??滿(mǎn)??????┑??累必???累廉累恰????????┑??商蹤器亪???商過(guò)器???????
4-1??????意κ
度
??ぁ?ж?
?????1.???
??
?CLR
CMOV
R0?#40H
?
? ??????????LOOP1?MOV
A?@R0ADDC
A?@R1
??MOV
@R0?AINC
R0
?
??INC
R1DJNZ
R2?LOOPl
??
??LOOP1JNC
LOOP2
????LOOP2MOV
@R0?#01HLOOP2?DEC
R0RETMOV
R1?#5OH
?
?
?аMOV
R2?#04H
???
??www.?PL2ˊ??????
?MOV
A?R0
??
???
?MOV
R
?A2MOVA?R?7MOV
R
?ACLR
CLOOP1?MOV
A?@R0ADDC
A?@R1
?MOV
@R0
?AINC
R0INC
R1
???
?
1DJNZ
R7?LOOP1JB
OV?ERR
????????DEC
R0MOV
A?@R0
JNBE7H?LOOP2SETB
07H
??
??,????2?????
?LOOP2?MOV
A?RMOV
R0?ARET??
???ERR??RET↓???
?管??Y??
???
?點(diǎn)↓??????
???廉????
↓??
?Y管????
???SDADD?CLR
07H
????
??
4-3
??????
??ぁ??ぁ???
???
?MOV
R0?#40HMOV
R1?#5OHMOV
R2?#04HCLR
C@R0?AMOVINC
R0INC
R1DJNZRETR2?LOOP1- ?
? ???-
? ??????LOOP1?MOV
A?@R0SUBB
A?@R1
???а????
???й?
?????
(BCD?)
????管??Y??儈???廉??????Y管??????
廉??
????
4-4
BCD??????ぁ??ぁ?BCDADD?MOV
20H?R0MOV
23H?R?CLR
CLOOP0?MOV
A?@R0
???ADDC
A?@R1
???DA
A
???MOV
@R0?A0INC
R
?
?
1INC
R1??
??DJNZ
R?
?LOOP0
?
?
?MOV
R2.
#23HJNC
RETURNMOV@
R0?#01HINC
R?RETURN?MOV
R0?#20HRET?
?????ZHENFA:
MOV
A?R0MOV
B?R1MUL
ABMOV
R??AMOV
R4?B?(R1)*(R0)??????R????儈??R40?(R2)*?R0?MOV
A?RMOV
B?R2MUL
ABADD
A?R4MOV
R4?A?(R1)*(R0)?儈?
(R2)*(R0)?????
?R4???
CY?MOV
A?BADDC
A?#OOH?(R2)*(R0)?儈?
??????
MOVR??A ??
?R?RET??
????????DV:
MOV
R7,#08HDVl:
CLR
CMOVA?R?RLC
AMOV
R
?A6?MOV
A?RRLC
A??(R6)?(R?)??а??
4-5
??ぁ??ぁ?????а??07H?
?MOV
07H?CCLR
CSUBB
A?R2JBO7H?GOU????操置Y
???模廉?管????商器置商置拉器??а?Y???模0?管????
儈?
-?????????к廉??商置操器-廉模0?Y??
管JNC
GOUADD
A?R2AJMP
DV2??
(儈?)
???????1???-
????-
??????к1-??(儈?)GOU:INC
R?DV2:MOV
R
?A6DJNZ
R7?DVlRET意κ
微
?
?
?
?
?
? ??ж?
????y7?y0??
?
????A?
???4?MOV
A?31HSWAP
ARL
A?y2?y0?
儈3?ANL
A?#111000OOB
???5????ORL
4OH?A
???
???4-7
?
30H?
31H???
?а?8??:(30H)=x7x6x?x4x?x2x1x0
(3lH)=y7y6y?y4y?y2y1y0?
??30H????
?5????31H????
?3???
????
?40H??
???ф?www.P(40H)=y2y1y0x4x?x2x1x0??????ANL?ORL????? ??? ??
л?MOV
4OH?3OH
??x7?x0??
40H??ANL
4OH?#000111llB??儈3??????
????1ˊASCII?о??
??
???4-10
??????????ASC1I?????4????1?????????????????
л???
н???
????:
“??0”~“??9”?ASCII?
?“30H”~“39H”???о30H????
?“00H”~“09H”?
?
?0AH?“??A”~“??F”?ASCII?
?“41H”~“46H”???
?
?37H?
??
?“0AH”~“0FH”?????>0?A?H??????????
л????R1????
??ASCHIN:MOV
A?R1
??CLR
C
?
?????CSUBB
A?#30H
?ASCII?
?30H???0-9???MOV
R1?A
?
??SUBB
A?#0AH
??
?
>9?JC
LOOP
???9
??↓?XCH
A?R1??>9
37HSUBB
A?#07HMOV
R1?ALOOP:
RET2ˊBCD?о??
????儈??滿(mǎn)點(diǎn)照???????×廉00????BCD?δ?? ε?????
ぁ??ぁ???????滿(mǎn)點(diǎn)照?????儈?滿(mǎn)點(diǎn)照???廉0??????滿(mǎn)點(diǎn)照?
4-6??
??
л?MAIN?MOV
A?R?MOV
R2?A??????????????ACALL
BCDBINMOV
B?#64HMUL
ABMOV
R6?AXCH
A?BMOV
R??A
MOVA?R4
MOV
R2?A
ACALLBCDBIN
ADDA?R6
MOV
R4?A
MOV
A?R?ADDC
A?#00HMOV
R??A
RET????
л?BCDBIN?MOV
A?R2ANL
A?#0F0HSWAP
A??????MOV
A?R2MOV
B?#0AHMUL
ABMOV
R??A??儈?BCD?????4?ANL
A?#0FHADD
A?R3MOV
R2?ARET-??BCD?4ˊ3
????TR
???????
??
л?
MOV??MOVCA?@DPTR?#BS?????????俆?RL
A
???
??MOV
R2?A-
??TR
????????????
?TR
???????儈?MOVC
A?@PUSH
A
INC
AMOVC
A?@MOV
DPH?APOP
DPLCLR
AJMP
@???
?????????????????TRBS?
DB
RK0LDB
RK0HDB
RK1LDB
RK1HDB
RK2LDB
RK2H?
?意κ
意
?ぁ?а?
?????????????
??4-17
?????R??(R?)=0???
OPRO(R?)=1???
OPRl…(R?)=n???
OPRn????
??
л?
MOV????????A?R?RL
A
?
??
2MOV
DPTR
?#BRTABL?????俆?JMP
@
TR ???
?????????
??BRTABL?AJMP
OPR0AJMP
OPR1…AJMP
OPRn??
???????
?ぁ????
5??4-19
?
?R??OPRD0?
??0OPRD1?
??1OPRD2?
??2OPRD3????????
?????
л???3??4??OPRD4??? ??
л:MOV
A?R?MOV
DPTR?#TAB3?
?
??
???俆?MOVC
A?@TR
?
??????
A?
JMP@
TR??? ?? ???????
???TAB3:
DB
OPRDO-TAB3DB
OPRDl-TAB3DB
OPRD2-TAB3DB
OPRD3-TAB3DB
OPRD4-TAB3п?
????
?
???ぁ??4-20
???????R??
???
OPRDl?…
OPRDn?????
??
л:??
??????? ?????
???OPRD0?MOV
DPTR?#BRTABL
??
??
????(A)?(R?)*2?(R?)*2???
DPH-
???
TR
????
??儈8?TR
????
???8????
??
DPTR?MOV
A?R?ADD
A?R?JNC
NAND?INC
DPHNAND?MOV
R??AMOVCA?@XCHA?R?INC
AMOVCA?@MOV
DPL?AMOV
DPH?R?CLR
AJMP
@??? ??
?????
???TRBRTABL?DW
OPRDODW
OPRD1?DW
OPRDn??
??“RET”??
????4-21
?
???R??
???
?
????????
?????
???OPRD0?OPRDl?…
OPRDn?????
??
л?MOV
DPTR?#TAB3-?
?????MOV
A?R?ADD
A?R?
JNCNANDINC
DPHTR
????
??儈8?TR
????
???8????
???????
???NAND?MOV
R??AMOVC
A?@XCH
A?R?INC
AMOVC
A?@PUSH
AMOVA?R?PUSH
A
RETTAB3?DW
OPRD0
??? ??DWOPRDl?DWOPRDn4ˊ5
I/Oㄟ??
??理
環(huán)增照狀蕩點(diǎn)點(diǎn)方0恰廉累廉富廉累廉富必累廉富恰磁0磁廉磁恰累廉富
照
0
狀
環(huán)商蹤器方0恰廉???商過(guò)器?????4-22
?? ???4-9???????0200HD
BIT
00HE
BIT
01HG
BIT
02HLOOP1?ORL
P1?#08HLOOP2?MOV
C?P1.3JC
LOOP2ORL
P1?#03HMOV
C?P1.0MOV
D?CMOV
C?PMOV
E?CANL
C?DMOV
G?CMOV
C?EORL
C?DANL
C?/G1.1???K0?????D???K1?????E?D?E?C???G?D?E?C??D?E???D?E???
????
л??MOV
P1.2?CSJMP
LOOP1END???
P1.3?????K3???????
?
?K3w
LOOP2????
?
?
??
??P1.0?
P1.1??意κ
控
?
ぁ?
??
?
?
?
?
?
?ж?
?????????
RAM????4-23
????????
RAM???
?
??
??SUBRT?????????????:MAIN:MOV
R0?#30H
???RAM
????
??MOV
R7?#0AH
???RAM
?????ACALL
SUBRT
???
????SJMP
$???
SUBRT:MOV
-
????A?#00HLOOP?MOV
?R
0
?AINCR0DJNZ
R7?LOOPRET??
???
?????4-25
HEX?????????
????
??????ASCII???ASC?
ASC+1??????仈??????????а????
?ASCII????????????????
????????┑?仈??????
???1200H????
?????????ASCII?-
??
??ASC?????APUSHHEXACALL
HASCPOP
ASCMOV
A?HEXSWAP
APUSHACCACALL
HASC?儈??????4?????
???儈?????ASCII?POP
ASC+1
???
?ASC+1SJMP
$
?
??????HASC?DEC
SPDEC
SPPOP
ACCANL
A?#0FH????
???SP????
?A??
???
?4?ADD
A?#07H
????MOVC
A?@A+PC
??
?ASCII?PUSH
ACCINC
SPINC
SPRET-
??
??SP?
???儈8???????ASCTABL?DB
‘0’?‘1’?‘2’?‘3’?‘4’?‘5’?‘6’?‘7’DB
‘8’?‘9’?‘A’?‘B’?‘C’?‘D’?‘E’?‘F’
ENDй?
?
????????????л???????
?
????4-26
??????THIS
IS
AN
EXAMPLE????????????????н?
??
??
?????
??
???
?
????MAIN?
…ACALL
????????DB‘THIS
IS
AN
EXAMPLE'??????????DB
OAH?ODH?OOHNEXT?
…????PRINT?POP
DPHPOP
DPLPPPl?TRMOV
A?#OOHMOVC
A?@INC
DPTRJZ
PPPEND??
Ⅲ???????
?????PPP2?SJMP
PPPlPPPEND?JMP
@?????TR????????-
?
???NEXT??????
???ㄖ?
展??展?
???
??
?拆κ度?ж?
?
/?
?????
?廉ˊ?
展????????????腳留廉腳種廉腳留0腳種0腳點(diǎn)類(lèi)管腳空類(lèi)照腳廉腳0?????
5-1
TMOD?TCONфT0?T1?????2ˊ?
/?
??
??
????÷廉必廉??腳環(huán)蔽?腳蔽ㄟ點(diǎn)展腳模0點(diǎn)展腳模廉?
5-2
?/?????????
?
/?
?
????TMOD??
5-1
??
?
?TMOD???
л?TMODD7D6D5D4D3D2D1D0GATEC/T(—)M1M0GATEC/T(—)M1M0M1
M0?
????
?100
0?013???0
1?116???1
0?2??
??8???1
1?3?
?0????8????
?1?→?п?
?
???TCON?
??
?TCON????
л?TCON8FH8EH8DH8CH8BHn8AH89H88HTF1TR1TF0TR0IE1IT1IE0IT0拆κ
微
?
?
展??
?????
?ж?
?0?M1M0???00
??
/??????
?0??
?????
?
5-3
???????÷廉必腳環(huán)0?點(diǎn)展腳模0點(diǎn)展腳模廉增皮管腳0
ㄟ理溢腳狀腳0
ㄟ腳置0腳留0腳種0商拉?器
商方?器?
5-3
T0(?T1)?0????
?1????÷廉必腳種0
商方?器腳環(huán)0?點(diǎn)展腳模0點(diǎn)展腳模廉增皮管腳0
ㄟ理溢腳狀腳0
ㄟ腳置0腳留0
商方?器?
5-4
T0(?T1)
?1??п?
?2???÷廉必腳種0
商方?器腳環(huán)0?腳0
ㄟ點(diǎn)展腳模0點(diǎn)展腳模廉?增皮管腳0
ㄟ理溢腳狀腳置0腳留0商方?器????
5-5
T0(?T1)
?1??п?
?2???÷廉必腳種0
商方?器腳環(huán)0?腳0
ㄟ點(diǎn)展腳模0增皮管腳0
ㄟ理溢腳狀腳置0腳留0
商方?器????
5-6
T0(?T1)
?2??點(diǎn)展腳模廉o??
?3????÷廉必腳種0商方?器腳環(huán)0?腳0
ㄟ點(diǎn)展腳模廉增理溢腳狀皮管腳0
ㄟ腳置0腳留0商方?器廉展廉必fos道廉展廉必fos道點(diǎn)展腳模0腳環(huán)廉?廉展廉必f
os道腳置廉?
5-7
T0?3с?
T1??ж?
?0?
?1????5-1
?T1
?0???
?
P1?1?
???1ms?
⌒??500μs?
а????
1ms
⌒???T1???fosc=6MHZ?
??仈
????P1?1???500μs
??T1???
?0?GATE=0?C/T(—)=0?M1M0=00?T0н????
???н??
???а??0???
TMOD=00H??????
TMOD?0???н??TMOD??л???
?T1?
???????X?T=12/fosc=12/6×106=2μs?213ˉX?×2×10ˉ6
s
=500×10ˉ6
sX=7942D=1111100000110B=1F06H111??
13??
??
?TL
儈3??儈8????TH1???TH1=F8H?????
л?MOVMOVSETBTR1-
?T1LP1?JBCTF1?LP2?????AJMPLP1LP2?MOVTL1?06H???MOVTH1?F8HCPLP1?1???AJMPLP1?????TL1?#06HTH1?#F8H??TL1???TH1?ww??0?X??5???TL
??5????TL=0??
?2????5-2
??
?1
?2?
?????┑100???P1?0?
???仈
????
??T1?P3.5?????????а??
??????
?
??
?
?
н?
?
?X=28ˉ100=156D=9CHTH1=TL1=9CHTMOD=60H1??????TF1?????
л?MOV
TMOD?#60H ???T1?
?2MOVTL1?#9CH?MOVTH1?#9CHSETBTR1-
?T1DEL?
JBCAJMPTF1?REPDEL?????REP?CPLP1?0???AJMP
DELп?
?
?????
5-8??↙???????5-3
?T0?????INT0??к
??↓????????????
????????
?????????????T0???
?1?GATE??1??TR0?1?а
INT0?P3?2?
??к
?儈????
?????????
→????
??T0???????????
л?皮管腳0商累恰富必器0暫留?商腳空類(lèi)照器廉?腳置0腳0?0?
?
0?腳置0
→腳0??腳0????
л?BEGIN?TMOD?#
O9H?T0?
?
?1?GATE?1WAIT1????INT0??-
?T0???↓?????INT0??-→T0???????俆???R0???????
??????????儈?????4???????WAIT2?WAIT3?A?@R0DISUPMO
VMO
TL0?#00HVMO
TH0?#00HVJB
P3?2?WAIT1SET
TR0
BJNB
P3?2?WAIT2JB
P3?2?WAIT3CLR
TR0MO
R0?#DISBUFVMO
A?TL0
VXCH
A?@R0
DINC
R0SWA
A
PXCH
A?@R0
DINC
R0MO
A?TH0
VXCH
A?@R0
DINC
R0SWA
A
PXCH
D
LCA
LLAJM
DISPDIS?????????????????????ㄖ
MCS-51????????6ˊ1
MCS-5
1
?
??
?
?
??????????ж?
8051?????
??廉必恰慢拉操方暫廉
0廉廉廉必廉恰廉慢廉拉廉廉操廉方廉暫必0慢0恰暫恰方恰操恰恰拉恰慢恰恰恰必恰廉恰0必暫必方必操必必拉必慢必恰必必必廉累廉富0累廉富廉累廉富必累廉富恰累廉富慢累廉富拉累廉富累廉富操置脹腳置蔽照展累恰富0腳蔽照展累恰富廉皮管腳0展累恰富必皮管腳廉展累恰富恰腳0展累恰富慢腳廉展累恰富拉
W置展累恰富置照展累恰富操蔽腳溢種必
蔽腳溢種廉
蕩脹脹蕩點(diǎn)點(diǎn)累0富0展溢照0累0富廉展溢照廉累0富必展溢照必累0富恰展溢照恰累0富慢展溢照
慢累0富拉展溢照拉累0富
展溢照累0富操展溢照操狀溢展
溢種狀展累置類(lèi)理累脹狀管累必富操展溢廉拉累必富展溢廉慢累必富拉展溢廉恰累必富慢展溢廉必累必富恰展溢廉廉累必富必展溢廉0累必富廉展溢暫累必富0展溢方方0恰廉方0拉廉方操拉廉累廉富操累廉富累廉富拉累廉富慢累廉富恰累廉富必累廉富廉累廉富0累脹狀管狀溢溢種狀置狀脹狀腳累必富操累必富累必富拉累必富慢累必富恰累必富必累必富廉累必富0方0恰廉方0拉廉累恰富操
累0富操累恰富
方操拉廉
累0富累恰富拉
累0富拉累恰富慢
累0富慢累恰富恰
累0富恰累恰富必
累0富必累恰富廉
累0富廉累恰富0
累0富0溢種狀溢廉拉溢廉慢溢廉恰溢廉必溢廉廉溢廉0溢暫溢方溢操溢溢拉溢慢溢恰溢必溢廉溢0照操照照拉照慢照恰照必照廉照0理增拉蕩蕩點(diǎn)點(diǎn)蕩脹脹???o
??商照滿(mǎn)器????商溢滿(mǎn)器???商點(diǎn)滿(mǎn)器??皮展類(lèi)?
6-1MCS-51??????????
MCS-51?????????累0累廉累必累恰增拉蕩增拉蕩狀溢方0拉廉方操拉廉蔽腳溢種廉蔽腳溢種必方方方方?
6-28051/8751??????控κ
微
空點(diǎn)脹始拆度?
?
?
?
?????ж?
??ぁ??
????
?ぁ狀溢方0恰廉累必富操累必富0~~累0富操累0富0累脹狀管~~~點(diǎn)狀溢廉拉溢方溢操??溢0??照操?
?照00磁?
慢磁類(lèi)狀?
6-3?????
?а???
??????www.1.???
??а???
?累脹狀管累必富0累必富廉累必富必累必富恰累必富慢累必富拉累必富累必富操4類(lèi)4廉4恰4慢4拉4操4必照0照廉照必照恰照照4累0富0累0富廉累0富必累0富恰累0富慢累0富拉累0富累0富操溢種狀照0照廉照必照恰照慢照拉照照操照操理類(lèi)狀類(lèi)狀溢方溢暫溢廉0溢廉廉溢廉必溢0溢廉溢必溢恰溢慢溢拉溢溢操方0恰廉必操點(diǎn)慢點(diǎn)狀狀溢操慢留恰操恰?
6-4??8K??ぁ???????w2.?
?狀累置類(lèi)空????3.???
?狀必累置類(lèi)空???4類(lèi)4廉4必4恰4慢4拉4累0富0累0富廉累0富必累0富恰累0富慢累0富拉累0富累0富操溢種狀照0照廉照必照恰照慢照拉照照操照廉照必照恰照慢照拉照照操4操理類(lèi)狀類(lèi)狀方0恰廉必方點(diǎn)慢狀溢操慢留點(diǎn)恰操恰置照累脹狀管W置累必富操累必富0累必富廉累必富必累必富恰累必富慢W狀點(diǎn)狀溢方
溢暫溢廉0溢廉廉溢廉必溢0溢廉溢必溢恰溢慢溢拉溢溢操操慢種脹0方?
6-5E2PROM??ぁ?????????
??????溢操溢溢拉溢慢溢恰溢必溢廉溢04類(lèi)4廉4必4恰4慢4拉44操累0富0累0富廉累0富必累0富恰累0富慢累0富拉累0富累0富操溢種狀皮展類(lèi)0皮展類(lèi)廉皮展類(lèi)必皮展類(lèi)恰皮展類(lèi)慢皮展類(lèi)拉皮展類(lèi)皮展類(lèi)操照0照廉照必照恰照慢照拉照操理類(lèi)狀方0恰廉廉廉點(diǎn)狀狀溢累恰富操商置照器累恰富商W置器累必富0累必富廉累必富必累必富恰累必富慢累必富拉累必富累必富操類(lèi)狀W狀溢方溢暫溢廉0留點(diǎn)恰操恰?
6-6??2KB???????1ˊ
??
?а????
?2.????
??????п?
??
????
4操40照操照0操慢留點(diǎn)恰操恰累必富操累必富累必富拉累必富慢累必富恰累必富必累必富廉累必富0溢種狀累0
累脹狀管W置置照方0點(diǎn)拉廉皮點(diǎn)0必操慢溢廉必點(diǎn)狀溢廉廉溢廉0溢暫溢方溢操溢0照操
照0
類(lèi)狀皮點(diǎn)廉必操慢照操照0類(lèi)狀溢0溢廉必點(diǎn)狀溢廉廉溢廉0溢暫溢方溢操溢0W狀類(lèi)狀溢廉必點(diǎn)狀溢廉廉溢廉0溢暫溢方溢操溢0W狀類(lèi)狀照操-照0皮點(diǎn)必必慢照操-照0
皮點(diǎn)恰必慢理滿(mǎn)溢Y必Y廉Y0操慢留點(diǎn)廉恰暫廉L
溢廉廉溢廉0溢暫
溢方
溢操?
6-7??16KB
RAM?
16KB
EPROM點(diǎn).c狀n控κ
態(tài)
?
?的展類(lèi)????ж?
??I/O????累0富0累0富廉累0富必累0富恰累0富慢累0富拉累0富累0富操方0點(diǎn)拉廉W置
累必富0置照照0照廉照必照恰照慢照拉照照操磁0磁廉磁必磁恰磁慢磁拉磁種狀照0磁操種狀照廉種狀照必種狀照恰種狀照慢種狀照拉種狀照操增拉蕩操慢留點(diǎn)必操恰操慢留點(diǎn)必慢慢404廉4必4恰4慢4拉44操理照0
40照廉
4廉照必
4必照恰
4恰照慢
4慢照拉
4拉.cn
4
種狀照照操
4操?
6-8??I/O???????
??ぁI/O????廉必恰慢拉慢0恰恰0必累點(diǎn)恰累點(diǎn)慢腳皮空狀置皮管置狀脹狀腳累點(diǎn)拉腳皮空狀置類(lèi)芯蕩點(diǎn)點(diǎn)恰暫
累點(diǎn)必恰方
累點(diǎn)廉恰操
累點(diǎn)0累滿(mǎn)操恰拉
累滿(mǎn)恰慢
累滿(mǎn)拉恰恰
累滿(mǎn)慢恰必
累滿(mǎn)恰恰廉
累滿(mǎn)必累滿(mǎn)廉必暫
累滿(mǎn)0必方
累溢操必操
累溢累溢拉必拉
累溢慢必慢
累溢恰必恰
累溢必必必
累溢廉必廉
累溢0
方廉拉拉皮類(lèi)展空腳
操點(diǎn)狀
方置照
暫廉W置
0溢種狀
廉廉溢照0
廉必溢照廉
廉恰溢照必
廉慢溢照恰
廉拉溢照慢
廉溢照拉
廉操溢照
廉方溢照操
廉暫蕩脹脹
必0必拉滿(mǎn)??置溢空廉慢??
??溢滿(mǎn)點(diǎn)溢照0
?
操置照W置置狀脹狀腳溢種狀腳皮空狀皮
管
腳皮空狀類(lèi)芯腳蕩點(diǎn)點(diǎn)商增拉蕩器蕩脹脹商理管照器累點(diǎn)0
?
拉累滿(mǎn)0
?
操累溢0
?
操皮類(lèi)展空?
6-98155????
????
6-1
8155??
?AD0~AD7?
?
?
?
?A7
A6
A5
A4
A3A2A1A0×
×
×
×
×000.cn□??
?
?
?
?×
×
×
×
×001??I/O
?
A
??
?×
×
×
×
×010??I/O
?
B
??
?×
×
×
×
×011?
C
φ??I/O
?
?
?
?
?×
×
×
×
×100?
?
/??
?
?
?
8
?
??
?×
×
×
×
×101?
?
/??
?
?
儎8
?
??
?3.方廉拉拉о??????置狀脹狀腳腳皮空狀皮管
腳皮空狀類(lèi)芯累點(diǎn)累滿(mǎn)累溢溢照0
?
操溢種狀置照W置皮類(lèi)展
空點(diǎn)狀腳
方廉拉拉方0恰廉置脹腳置照W置溢種狀累必富恰累必富慢累0蕩點(diǎn)點(diǎn)??
6-2
8155?RAM?
I/O??
??
6-10
??ж?8155????P2.4P2.3??
?00RAME700H?E7FFH
(256B)01I/O?EF00H
?
?
?
/
?
?
?EF01H
??I/O
?AEF02H
??I/O?BEF03H
?
CEF04H
??
?
8
?EF05H
??儈8
?
?
???w4.8155片內(nèi)RAM的使用?1???????????
6-3
C???
?□
??ALTIALT2ALT3ALT4PC0??
?
????
?A
I
N
T
R
δ
A
?
?
?εA
I
N
T
R
δ
A
?
?
?εPC1AB
Fδ
A???
?
┗εAB
Fδ
A???
?
┗εPC2ASTBδ
A???εASTBδ
A???εPC3???
?B
I
N
T
R
δ
B
?
?
?εPC4BBFδ
B
???
?
┗εPC5BSTBδ
B?
??ε?
?A?B??
??I/O?A?B??
??I/O?A
?
?
??????B
?
?
?
?
I
/
O
?A
?
?
B
?
?
????
/???
?置照W置皮展類(lèi)??
????
????????
????
??
????????
????
??
??皮展類(lèi)溢皮管腳置溢滿(mǎn)環(huán)滿(mǎn)皮管腳置滿(mǎn)滿(mǎn)環(huán)滿(mǎn)脹腳滿(mǎn)?
6-128155
?4??????累溢累點(diǎn)0累點(diǎn)廉累點(diǎn)必
溢脹腳滿(mǎn)方廉拉拉累點(diǎn)恰累點(diǎn)慢累點(diǎn)拉累滿(mǎn)6.
?
展????
6-4
8155?
??
?M2
M1□
??
?
?
???
?0
0?
?
?
?0
1???
?1
0□?↘??
????
?
??1
1?????йㄖMCS-51?????
?描κ度??????ж?
??????〃??
?1.??????
7-2
????????n-1?高???響ж???器n+1…P1
0D
0D1D2D3D4D5D6D
7P1
0D0…??
?□
?
??
僂?
↘
??
????
?
?
??
?
?
?□
?
?CRC??#
1CRC??#
2?7-3
?
??????
????
描始意
?????
?п?
????
???
?(Simplex)?
?
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶(hù)所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶(hù)上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶(hù)上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶(hù)因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025企業(yè)網(wǎng)絡(luò)維護(hù)合同書(shū)
- 汽車(chē)美容市場(chǎng)定位與評(píng)估試題及答案
- 2025年高考考前信息必刷卷02英語(yǔ)(新高考I卷)考試版
- 2025二手車(chē)買(mǎi)賣(mài)合同(個(gè)人直售)(無(wú)中介)
- 2025企業(yè)專(zhuān)項(xiàng)贊助協(xié)議合同范本
- 政治經(jīng)濟(jì)學(xué)復(fù)習(xí)資料
- 政府專(zhuān)職消防員職業(yè)技能鑒定考試題庫(kù)800題(含答案)
- 2025企業(yè)終止合同的條件及流程
- 廣州科技貿(mào)易職業(yè)學(xué)院《BM技術(shù)應(yīng)用》2023-2024學(xué)年第二學(xué)期期末試卷
- 長(zhǎng)輸管道事故類(lèi)型
- 2025屆貴州省安順市高三二模語(yǔ)文試題
- 2025中國(guó)海洋大學(xué)輔導(dǎo)員考試題庫(kù)
- 新疆維吾爾自治區(qū)普通高職(專(zhuān)科)單招政策解讀與報(bào)名課件
- 2024年昆明渝潤(rùn)水務(wù)有限公司招聘考試真題
- 2025-2030中國(guó)小武器和輕武器行業(yè)市場(chǎng)發(fā)展趨勢(shì)與前景展望戰(zhàn)略研究報(bào)告
- 高中主題班會(huì) 高考勵(lì)志沖刺主題班會(huì)課件
- 高三復(fù)習(xí):2025年高中化學(xué)模擬試題及答案
- 月考試卷(1~3單元)(試題)-2024-2025學(xué)年六年級(jí)下冊(cè)數(shù)學(xué)人教版(帶答案)
- 8.1薪火相傳的傳統(tǒng)美德 教學(xué)設(shè)計(jì)-2024-2025學(xué)年統(tǒng)編版道德與法治七年級(jí)下冊(cè)
- 中國(guó)急性缺血性卒中診治指南(2023)解讀
- 凱萊通綜合版
評(píng)論
0/150
提交評(píng)論