Wait loop/polling vs harware timer ss a good habbit thing for me. It's how I did similar things when I used HCS08 chips.
I appriciate the difficulty that comes with interrupts and how to mitigate their problems. They do seems to be my best option here.
I already gave a project description in the OP. It's a local positioning system that uses syncronised radio and ultrasound pulses. If it helps, I can paste the code that I had working this afternoon. It mostly worked, but the reciever wasn't fast enough to pick up 4us bursts from it's ultrasonic reciever circuit.
==========Rx==================
const int ultrasound = 12;
void setup() {
Serial.begin(9600);
pinMode(ultrasound, INPUT);
}
void loop() {
while (Serial.available() == 0);
char temp = Serial.read();
Serial.write(temp);
int i = 0;
while (digitalRead(ultrasound) == HIGH) {
i++;
if (i == 0) {
break;
}
}
Serial.print(i);
Serial.print('\n');
}
============Tx================
const int ultrasound = 13;
void setup() {
Serial.begin(9600);
pinMode(ultrasound, OUTPUT);
}
void loop() {
for (char i = 'A'; i < 'D'; i++) {
digitalWrite(ultrasound, LOW);
delay(200);
Serial.print(i);
digitalWrite(ultrasound, HIGH);
delay(50);
}
}