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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
02/06/03 10:02
Read: times


 
#38391 - RE: delay of x minutes
Responding to: ???'s previous message
Hi Waqar,

Its like I need 60,000 Dollars. Government of USA does not print a bill of this amount so I can't buy anything of ten thousand dollars :(

But I got an idea:

why not add 600 bills of 100 $ each and make total amount that I need :)

was a joke, but good enough to make you understand that any amount is made up of some basic units.

use a value of #100d in autoreload mode (with 12MHz) and increment a counter 10 times in an ISR. That will give you a delay of 1Sec. (some software tuning would yet be required to cut off the overhead for the time taken by instructions themselves).

Increment another counter above 60 times and that will give you a delay of 1 min.

Good Luck

Babar


PS:
Never implement the delays (particularly in clocks) in the delay loops like DJNZ.....

How can you do other stuff like refreshing the display or allow time setting with the loop. Even if you can do that withing the loop it will screw the accuracy of the clock until you take care of time by every instructin being executed and make adjustments therein the code and eventually blow your mind.




List of 19 messages in thread
TopicAuthorDate
1 Minute Delay            01/01/70 00:00      
   RE: 1 Minute Delay            01/01/70 00:00      
   RE: 1 Minute Delay            01/01/70 00:00      
   RE: 1 Minute Delay            01/01/70 00:00      
   Check my Delay            01/01/70 00:00      
      checking on simulator            01/01/70 00:00      
         Now 1 Minute delay program in assembly            01/01/70 00:00      
         RE: delay of x minutes            01/01/70 00:00      
            I really tried hard but no use            01/01/70 00:00      
               RE: I really tried hard but no use            01/01/70 00:00      
   RE: Check my Delay            01/01/70 00:00      
   RE: 1 Minute Delay            01/01/70 00:00      
   RE: I really tried hard but no use            01/01/70 00:00      
      Ijaz is right            01/01/70 00:00      
         RE: Waqar            01/01/70 00:00      
   RE: Software            01/01/70 00:00      
   difference between counter and timer            01/01/70 00:00      
      RE: difference between counter and timer            01/01/70 00:00      
      RE: difference between counter and timer            01/01/70 00:00      

Back to Subject List