How heavily optamized are the ATMega's?

Go To Last Post
54 posts / 0 new

Pages

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok, I see, because its being defined each time the ISR runs, its then wiped out essentially. How would I make it a local static syntactically(aka what would that look like)?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
ISR(PCINT1_vect) 
{    
   static uint8_t Temp0; 
   uint8_t PCDF0; 
       
   PCDF0 = ((PINC&(1<<0)) == 0) ? 1 : 0;       

   TS = (PCDF0 == Temp0) ? 1 : 0; 
          
   Temp0 = PCDF0;       
}

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hopefully I'll get a chance to test this over thanks giving, crossing my fingers that it will work. I'm also trying another board I have just in case the first one has a bad processor.

Pages