Sometimes we need to test not just the value of pins but the order in which they are set. For example, many devices (such as LiquidCrystal) have a "clock" pin that is used to inform the device that the other pins have now been populated with useful values (see LiquidCrystal.cpp:303).
At first it seems that this could be done by incrementing the microsecond clock with each instruction but this is unrealistic (it implies a 1MHz machine) and makes some other tests less practical (it is nice that Blink can test for exactly microseconds for a delay() call).
My suggestion is that each event also have an instruction counter so we could determine what pin values were set before the clock pulse. Or is there something that does this that I'm missing?
Sometimes we need to test not just the value of pins but the order in which they are set. For example, many devices (such as LiquidCrystal) have a "clock" pin that is used to inform the device that the other pins have now been populated with useful values (see LiquidCrystal.cpp:303).
At first it seems that this could be done by incrementing the microsecond clock with each instruction but this is unrealistic (it implies a 1MHz machine) and makes some other tests less practical (it is nice that Blink can test for exactly microseconds for a delay() call).
My suggestion is that each event also have an instruction counter so we could determine what pin values were set before the clock pulse. Or is there something that does this that I'm missing?