ekartgo
Member
Are all pins equal in response times for a digital transition on a T4.1?
I am setting no more than four interrupts active at a time to watch for either rising or falling edges.
For example:
Bryan
I am setting no more than four interrupts active at a time to watch for either rising or falling edges.
For example:
Code:
void turn_on_coil2_fwd()
{
if (!coil2_state)
{
noInterrupts();
digitalWriteFast(HB2_ON_GPIO, HIGH);
delayMicroseconds(US_PULSETIME);
digitalWriteFast(HB2_ON_GPIO, LOW);
interrupts();
coil2_state = 1; // Don't pulse again
// Set hard off and others for progression
attachInterrupt(digitalPinToInterrupt(PTR2_GPIO), turn_off_coil2, RISING);
attachInterrupt(digitalPinToInterrupt(PTR3_GPIO), turn_off_coil3, RISING); // Overlap
attachInterrupt(digitalPinToInterrupt(PTR1_GPIO), turn_on_coil1_fwd, FALLING);
attachInterrupt(digitalPinToInterrupt(PTR4_GPIO), turn_on_coil4_fwd, FALLING);
}
}
Bryan