Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Deney 7 Cevap Anahtarlari

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

UYGULAMA 1A CEVAP ANAHTARI UYGULAMA 2A 16 BİT ZAMANLAYICI 1 İÇİN CEVAP ANAHTARI

0,072 0.72 600000


 60000,  600000, = 9,1553...
1,2.10 −6 1,2.10 −6 65536
65536 − 60000  5536 65536 − 0,1553* 65536  55358

org 00h bekle: jnb tf0, bekle org 00h bekle: jnb tf1, bekle
sjmp start clr tf0 sjmp start clr tf1
start: mov th0,dph start: djnz r0, bekle
mov tmod,#00000001b mov tl0,dpl mov tmod,#00010000b cpl p2.0
;T/C0, 16-bit sjmp bekle ;T/C1, 16-bit mov th1,dph
mov dptr,#5536d end mov r0,#10d mov tl1,dpl
mov th0,dph mov dptr,#55358d mov r0, #10d
mov tl0,dpl mov th1,dph sjmp bekle
setb tr0 mov tl1,dpl end
setb tr1

UYGULAMA 1B CEVAP ANAHTARI UYGULAMA 2B CEVAP ANAHTARI


0.0096
 8000, 0.72
 600000,
600000
= 73,242... 8192 − 0,242* 8192  6209
1,2.10 −6 1,2.10 −6 8192
8192 − 8000  192 6209
 194,031 → TH1 = 194 , TL1  0.31* 32 = 10
org 00h bekle: jnb tf1, bekle 32
sjmp start clr tf1 org 00h bekle: jnb tf1, bekle b
start: mov th1,#06d sjmp start clr tf1
mov tmod,#00000000b mov tl1, #00d start: djnz r0, bekle
;T/C1, 13-bit sjmp bekle mov tmod,#00000000b cpl p2.0
mov th1,#06d end ;T/C1, 13-bit mov th1,#194d
mov tl1, #00d mov r0,#74d mov tl1,#10d
setb tr1 mov th1,#194d mov r0, #74d
mov tl1,#10d sjmp bekle
setb tr1 end

UYGULAMA 2C CEVAP ANAHTARI

UYGULAMA 1C CEVAP ANAHTARI org 00h clr tf1


sjmp start clr p2.0
240  10 −6 start: mov th1,dph
 200
1,2.10 −6 mov tl1,dpl
256 − 200  56 mov acall geckme
tmod,#01010000b sjmp bekle
org 00h bekle: jnb tf1, bekle ;T/C0, 16-bit geckme:
sjmp start clr tf1 ;timer mode timer mov r0,#0FFh
start: mov th1,dph mov dptr,#65533d mov r1,#0FFh
mov tmod,#00100000b mov tl1,dpl mov th1,dph devam:
;T/C1, 8-bit sjmp bekle mov tl1,dpl djnz r0,devam
mov dptr,#56d end setb tr1 ; mov r0,#0FFh
mov th1,dph timer 0 is enabled djnz r1,devam
mov tl1,dpl bekle: jnb tf1, bekle ; In setb P2.0
setb tr1 polling mode, waiting for ret
overflow, TL0=8Ah, TH0=8Ch end

You might also like