Can anybody see anything I'm doing wrong? Is there a minimum time the line has to be driven low for the interrupt to recognize that the line as fallen?
Here's my new code, and it's still not working. I know it's not a wiring issue because if I use a while((PIND&B00000100)); it quite happily gets kicked out of the loop when the pin drops.
No, once again I missed something. Well, didn't miss something but it's not the masters fault. I can toggle the interrupt by hand, but the slaves code isn't working properly. That can wait till tomorrow.
My advice is to get your sketch logic working using the simple Arduino commands and if its not fast enough because of the function call overhead that Arduino adds to attafchInterrupt you can optimize that later.
If you are interested in learning about the low level workings of the chip (which the Arduino abstractions are designed to hide) have a look at the avrfreaks forum. It's a really good site for technical discussions covering register level programming.
The code has exactly the same result, are you saying that because I used a different syntax in the ARDUINO IDE to program my ARDUINO board I'm not support to post in the ARDUINO forums?
Next time I'll just change the code into arduino syntax
I was simply pointing out that avrfreaks has more discussions geared towards register level technology so there are probably more people there that would be inclined to participate.
I believe that when this statement is called DDRD = 0x00 which is all pins
set to input. XORing it sets it to an output.
I wouldn't use XOR to set or reset bits. If you want to set a bit use OR. If you
want to reset a bit the use AND. The result of XOR is dependent on the previous
condition where as ORing with a '1" always produces "1" and ANDing with
a "0" always produces a "0".