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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
10/14/05 18:04
Read: times


 
#102423 - can any one suggest me to find a solutio
Responding to: ???'s previous message
I tried ISR addressing in this code .
Iam unable to get desired result . couldn't find where i went wrong.

i programmed as below..
1) Timer0 of AT89c51 to count for 50 sec.
2) Timer0 ISR to decrement registers ro & r1 to measure 50 sec
The problem i face is... the ports(of port1) are not getting set at appropriate timing intervals when tested using LED's.
can any one suggest me to find a solution...

org 0
ljmp main

org 0Bh
LJMP Timer0_ISR

main:
Mov ro,#13d ;when decremented to 00 "one sec" is over
Mov r1,#49d Decremented every 1 sec for 50sec
mov Tmod,#01h(16 bit timer mode)
mov TH0,#00h
mov TL0,#00h
setB TR0
cjne r1,#02d,$
Mov P1,#54h
cjne r1,#13d,$
mov p1,#FEh
cjne r1,#35d,$
mov p1,#BDh,$
clr TR0
ljmp main

Timero_ISR:
Dec ro
cjne ro,#00d,$
mov ro,#13d
dec r1
RETI

end


List of 29 messages in thread
TopicAuthorDate
writing code in interrupt handler addr            01/01/70 00:00      
   tell you how to write ...            01/01/70 00:00      
      Thank U...            01/01/70 00:00      
         short answer            01/01/70 00:00      
   My book            01/01/70 00:00      
      Let's make it more complete            01/01/70 00:00      
         this could/would confuse some newbie            01/01/70 00:00      
            can any one suggest me to find a solutio            01/01/70 00:00      
               as previously stated:            01/01/70 00:00      
               Initialize and do_forever            01/01/70 00:00      
         where does org100h and org30h branch to?            01/01/70 00:00      
            what do you mean?            01/01/70 00:00      
               hope iam clear now            01/01/70 00:00      
               what is the possible Address range ....            01/01/70 00:00      
                  bible time            01/01/70 00:00      
            ORG            01/01/70 00:00      
               should i add startup 51 for my code..            01/01/70 00:00      
                  manual?            01/01/70 00:00      
                     It indicates for C code            01/01/70 00:00      
                        does it say "use for assembler"?            01/01/70 00:00      
                           No. The example for adding startup.A51            01/01/70 00:00      
                              conclusion?            01/01/70 00:00      
                                 i got my codes executed successfully....            01/01/70 00:00      
                                    dwarfs ?            01/01/70 00:00      
                                        u people...            01/01/70 00:00      
                                          If that is what you ment, then why not s            01/01/70 00:00      
                  assembly codes with AT89C51            01/01/70 00:00      
                     no problem with hex            01/01/70 00:00      
                        up to you...            01/01/70 00:00      

Back to Subject List