實(shí)驗(yàn)九 定時(shí)、記數(shù)、顯示(80C51單片機(jī)匯編語(yǔ)言編程)
偉福:數(shù)碼管為共陰極;
KEY/LED_CS與CS0連線,則段地址為:8004H,位地址為:8002H
ORG 0000H
AJMP MAIN
ORG 0003H
AJMP INT0
ORG 0013H
AJMP INT1
ORG 001BH
AJMP T1
ORG 0030H
MAIN:MOV TMOD,#16H ;T0計(jì)數(shù),T1計(jì)時(shí)
INT0:JB P3.1,AA
INT1:JB TR0,BB
T1:MOV TH1,#0EFH
H_BCD:MOV A,TL0
JISHU:MOV R2,#3
FT:MOV A,@R0 ;將所計(jì)數(shù)轉(zhuǎn)換成數(shù)碼管顯示形式
DISP:MOV DPTR,#8002H
TAB:DB 3FH,06H,5BH,4FH,66H,6DH,7DH,07H,7FH,6FH
評(píng)論