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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/16/06 20:24
Read: times


 
#118441 - Some code from the prof broke interrupt
Responding to: ???'s previous message
With some help from the prof, I got the interrupt code working. But then he made a change to it:

// Timer is stop
TR0 = 0;
TH0 = seed >> 8;
TL0 = seed & 0xff;
TF0 = 0;
TR1 = 1;
// Timer is start

and that broke it. Any idea what happened?

This works, but he said that it's not good design to load the reload timer while the clock is running:

// TF0 = 0;
// TH0 = seed >> 8;
// TL0 = seed & 0xff;

List of 19 messages in thread
TopicAuthorDate
Timer0_ISR delay troubles            01/01/70 00:00      
   Why it doesn't work            01/01/70 00:00      
      Extra Atomic            01/01/70 00:00      
   Been there Done That            01/01/70 00:00      
   Yes,very atomic            01/01/70 00:00      
      nuclear explosions            01/01/70 00:00      
   Also            01/01/70 00:00      
      Thanks everyone            01/01/70 00:00      
         learn to swim before diving in            01/01/70 00:00      
         using 1            01/01/70 00:00      
            Some code from the prof broke interrupt            01/01/70 00:00      
               Nevermind            01/01/70 00:00      
               which it is not            01/01/70 00:00      
                  Explain?            01/01/70 00:00      
   What happend to common sense?            01/01/70 00:00      
      specific examples are dangerous            01/01/70 00:00      
      Uncommon Sense            01/01/70 00:00      
         Practical programming            01/01/70 00:00      
            Charles            01/01/70 00:00      

Back to Subject List