- This topic has 1 reply, 2 voices, and was last updated 9 years, 6 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
|
Microcontroller › 8051 › 8051 interrupt
hello everyone
org 0000h
ljmp main
org 001bh
djnz r0,start
cpl p1.2
mov r0,#14
mov tl1,#00h
mov th1,#00h
start:reti
org 0030h
main:mov tmod,#10h
mov ie,#88h
mov r0,#14
mov tl1,#00h
mov th1,#00h
setb tr1
here:sjmp here
end
In this program whenever "reti" instruction executed after "djnz r0,start", it jumps to "here" subroutine then how timer 1 is auto reloaded although timer is used in mode 1 . . can you help me. . please unsure emoticon
timer rolls over from FFFFh to 0000h and again start counting. no need of auto reload this is default