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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/13/04 09:48
Read: times


 
#82976 - Limited View Point
Responding to: ???'s previous message
Jason:
You want a memory location to count out 4 seconds in a 1 byte counter variable. OK...with a maximum value of 255 in the byte your counter variable is going to have to step once each (4 sec / 256) = 15.625 milliseconds. Some code someplace is going to have to implement the stepping of the byte at this rate. Now that can be a timer interrupt programmed for the 15.625 millisecond interval OR it can be some program code that loops around on itself in some manner as to effectively divide the instruction cycle rate down to this rate. It seems a bit resricting to say that timers and/or DJNZ instructions cannot be used. I can understand that you may want to try to avoid the mess that a main program can get into trying to handle a whole bunch of these byte wide counter variables......so that is what a timer interrupt is all about. See the tutorials here at the site to learn how to implement the timers and their companion interrupts.

Michael Karas


List of 10 messages in thread
TopicAuthorDate
Use of Bitwise Area            01/01/70 00:00      
   Limited View Point            01/01/70 00:00      
      Method or formula            01/01/70 00:00      
         try these            01/01/70 00:00      
         Similar Code            01/01/70 00:00      
   You need a timer!            01/01/70 00:00      
   try this            01/01/70 00:00      
   Thank you            01/01/70 00:00      
      Vertical counters            01/01/70 00:00      
         Vertical Counters            01/01/70 00:00      

Back to Subject List