You are on page 1of 5

2011MCS

*
*
A. 1 55
70
B.
(1)`( TIMER INTERRUPT) 10
(2) TIMER INTERRUPT
35
(3) TIMER INTERRUPT 55
70
C. 1
(1) ( TIMER
INTERRUPT) 65 80
(2) TIMER INTERRUPT
75 90
(3) TIMER INTERRUPT80
95

1
1. PROGRAM ROM 1000H-13FFH ( A )
1400H-17FFH( B ) data
1 A B byte
EXTERNAL DATA RAM 2000H-27FFH
2 (1000H)=38H, (1400H)=8AH, 38H x 8AH =1E30H
1EH EXTERNAL DATA RAM 2000H, 30H EXTERNAL
DATA RAM 2001HEXTERNAL
DATA RAM (2000H)=1EH, (2001H)=30H
3 (
END )

ORG
DB

JMP $
1000H
38H,93H,57H, (, 1024

)
ORG
1400H
DB
8AH, 0F3H, 0ACH, (,
1024 )

XDATA (2000H)=1EH, (2001H)=30H, (2002H)=8BH,


(2003H)=89H, (2004H)=3AH, (2005H)=74H, ,

2. PROGRAM ROM 1000H-13FFH ( A )


1400H-17FFH( B ) data
1 AB 8 SIGNED number
2
EXTERNAL DATA RAM 2000H
3 (1000H)=93H(1400H)=05H SIGNED
number 05H > 93H EXTERNAL DATA RAM 2000H
05HEXTERNAL DATA RAM 2001H 93H
EXTERNAL DARA RAM (2000H)=05H,
(2001H)=93H
4 (
END )
JMP

$
ORG
1000H
DB
93H,32H,99H (, 1024
DATA)
ORG
1400H
DB
05H, 7AH, 0FAH (, 1024
DATA)
EXTERNAL DATA RAM (2000H)=05H,
(2001H)=93H, (2002H)=7AH, (2003H)=32H, (2004H)=0FAH,
(2005H)=99H,
3.

(UNKNOWN)

1 Logic analyzer export

2
3 TIMER INTERRUPT ISR
10 RETI
4a. 48MHz 8051 2KHz ,
(output=P1.1)2s

t=0
20% 25%
10% 25%
10% 10%
MOV TMOD,#10H
MOV TH1,#0FEH
MOV TL1,#78H
SETB TR1
SETB P1.0
JNB TF1,$
CLR P1.0
CLR TF1
CLR TR1
MOV TH1,#0FEH
MOV TL1,#1AH
SETB TR1
JNB TF1,$

t=T

CLR P1.0
CLR TF1
CLR TR1
HERE:
MOV TH1,#0FFH
MOV TL1,#40H
SETB TR1
SETB P1.0
JNB TF1,$
CLR P1.0
CLR TF1
CLR TR1
MOV TH1,#0FEH
MOV TL1,#1AH
SETB TR1
JNB TF1,$
CLR P1.0
CLR TF1
CLR TR1
MOV TH1,#0FFH
MOV TL1,#40H
SETB TR1
SETB P1.0
JNB TF1,$
CLR P1.0
CLR TF1
CLR TR1
MOV TH1,#0FFH
MOV TL1,#40H
SETB TR1
JNB TF1,$
CLR P1.0
CLR TF1
CLR TR1

SJMP HERE
end
4b. 48MHz 8051
(output=P1.3) s
(1) 50 ms
(2) 40 ms
(3) 80 ms
(4) 100 ms
(5)