how come the interrupt source code below doesn't break? Am I missing something? I just want it to inc. var "a" each time there is a change in int pin 4. This is for 2313 btw.
======
#include <avr/io.h>
#include <avr/interrupt.h>
#include <avr/signal.h>
int a=1,b=0;
INTERRUPT(SIG_INTERRUPT1)
{
a++;
}
void main (void)
{
DDRD=0;
why doesn't the result of variable "a" in the interrupt handler get transfer to variable b by the instruction b=a in the main program? variable b always zero as if "a" is never change
Would there be a problem if I use a 5 feet wire to connect a signal from the avr pin to other digital circuit? Is there a limit to how long the wire can be?