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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/24/06 08:36
Read: times


 
#120911 - Code as shown should work methinks
Responding to: ???'s previous message
You have neglected to show us the initialisation code which could hold critical information, you have also not told us the frequency of the cpu - I gather this is 12MHz. What else does timer1 do? To isolate the problem, you need to get the code down to the bare minimum. What happens if you disable timer0? timer1? These routines could be stealing precious cpu time causing the timer2 code to miss interrupts. Divide and conquer is the name of the game.

Try to minimise interrupt sources in order to make the code easier to understand. If you have one timer doing 1mS and another timer doing 5mS, why not just use one timer at 1mS and execute the 5mS every 5 ticks? You could also add in your led multiplexing and keypad reading code here as well - as long as you keep the code to the bare minimum.

List of 17 messages in thread
TopicAuthorDate
problem in timer with a least count of 1 millisec            01/01/70 00:00      
   Code as shown should work methinks            01/01/70 00:00      
      clarifications            01/01/70 00:00      
         atomicity            01/01/70 00:00      
            atomicity problem?            01/01/70 00:00      
               about atomicity            01/01/70 00:00      
   Back to basic            01/01/70 00:00      
      reply to vishal sinha            01/01/70 00:00      
         bible time            01/01/70 00:00      
   Hm ...            01/01/70 00:00      
      reply to Christoph Franck            01/01/70 00:00      
         totally imprecse            01/01/70 00:00      
   What is the size of the variables?            01/01/70 00:00      
   not enough info            01/01/70 00:00      
      other details about code            01/01/70 00:00      
         here you go again            01/01/70 00:00      
         yet questions more            01/01/70 00:00      

Back to Subject List