Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/20/03 10:55
Read: times


 
#36830 - RE: can 8051 do multi tasking?
The simplest way:

clr et0 ;pulse width generation
clr tr0
setb ea
mov a,#00h
mov r5,#00h
mov tmod,#01h
Mov tl0,11h
mov th0,r7
setb et0
setb tr0
label:
; YOUR CODE DOING SOMETHING

sjmp label

org 000bh
cpl a
mov p1,a
cjne a,#00h,on

;if a=0 then jump to on value
;if a=1, then jump to off value

mov tl0,11h
mov th0,r7
reti

on: mov tl0,13h ;on time low byte
mov th0,r6
reti


Remove all empty loops and do something inside of them.

List of 13 messages in thread
TopicAuthorDate
can 8051 do multi tasking?            01/01/70 00:00      
RE: can 8051 do multi tasking?            01/01/70 00:00      
RE: can 8051 do multi tasking?            01/01/70 00:00      
RE: can 8051 do multi tasking?            01/01/70 00:00      
RE: can 8051 do multi tasking?            01/01/70 00:00      
RE: can 8051 do multi tasking?            01/01/70 00:00      
RE: can 8051 do multi tasking?            01/01/70 00:00      
RE: can 8051 do multi tasking?            01/01/70 00:00      
RE: can 8051 do multi tasking?            01/01/70 00:00      
RE: can 8051 do multi tasking?            01/01/70 00:00      
RE: can 8051 do multi tasking?            01/01/70 00:00      
RE: can 8051 do multi tasking?            01/01/70 00:00      
RE: can 8051 do multi tasking?            01/01/70 00:00      

Back to Subject List