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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/23/04 10:36
Read: times


 
#83691 - here is code prahlad and andy
Responding to: ???'s previous message
hi
here is simple code for 89c51rd2bn mcu from philips,timer0 not
interrupting timer1,although timer0 has higher priority where
is mistake

org 0000h
sjmp program_start
org 000bh
sjmp timer0
org 001bh
sjmp timer1

program_start:
mov ie,#10001010b ; enable timer interrupts
mov tmod,#11h ;16 bit mode of timer1 & timer0
mov th0,#0ffh
mov tl0,#9ch
mov th1,#0ffh
mov tl1,#9ch
mov iph,#00000011 ;interrupt priority level
mov ip,#00001001 ; timer0 leve2,timer1 level1
setb tcon.6 ; start timer1
there:
sjmp there
timer0:
cpl port3.1
mov th0,#0ffh
mov tl0,#9ch
reti
timer1:
setb tcon.4 ; in timer1 start timer0
infinte_loop:
cpl port3.0
nop
nop
nop
nop
nop
nop
nop ;infinte loop timer0 should
nop ;interrupt timer1,beacuse of
nop ;high proirity to generate
nop ;square pulse at port3.1
nop ; but there is no pule at port3.1
nop ; pulse is there at port3.0
nop
nop
nop
nop
sjmp infinte_loop
reti




List of 42 messages in thread
TopicAuthorDate
timer0 not interupting timer1            01/01/70 00:00      
   Re : ' '            01/01/70 00:00      
   Reply awaited.            01/01/70 00:00      
   That's no fun!            01/01/70 00:00      
   Re:            01/01/70 00:00      
   Lets figure out            01/01/70 00:00      
      one more            01/01/70 00:00      
         ...and another            01/01/70 00:00      
   4 levels of priority            01/01/70 00:00      
      Is it typo or new derivative.            01/01/70 00:00      
         programmable resistors            01/01/70 00:00      
            Re: Programmable resistors.            01/01/70 00:00      
      re 4 levels of priority            01/01/70 00:00      
   here is code prahlad and andy            01/01/70 00:00      
      Re            01/01/70 00:00      
         Oh yes!            01/01/70 00:00      
      How to post code            01/01/70 00:00      
         b was missed            01/01/70 00:00      
            Try it real.            01/01/70 00:00      
               Try it real.            01/01/70 00:00      
                  But why don't try?            01/01/70 00:00      
                     But why don't try?            01/01/70 00:00      
                        Maybe Philips specific?            01/01/70 00:00      
                           Maybe Philips specific?            01/01/70 00:00      
                              what was the problem?            01/01/70 00:00      
                                 what was the problem?            01/01/70 00:00      
                                    How? What?            01/01/70 00:00      
                                       How? What?            01/01/70 00:00      
                        further answers fully useless !            01/01/70 00:00      
                           Yes, useless!            01/01/70 00:00      
                              Yes, useless!            01/01/70 00:00      
                                 It's useless if you post a wrong copy            01/01/70 00:00      
      Mistake            01/01/70 00:00      
         Mistake            01/01/70 00:00      
   is asm51 is not appropriate            01/01/70 00:00      
   How we can help you:            01/01/70 00:00      
      How we can help you            01/01/70 00:00      
         20Kb Code.            01/01/70 00:00      
            More information            01/01/70 00:00      
   thanks Jan Waclawek            01/01/70 00:00      
      Don't compare hex!            01/01/70 00:00      
   Which assembler was used by you Shivani.            01/01/70 00:00      

Back to Subject List