Diff being reverted:
diff --git a/cnc/03-interrupt.c b/cnc/03-interrupt.c
index 3efc4bc..ea095bc 100644
--- a/cnc/03-interrupt.c
+++ b/cnc/03-interrupt.c
@@ -66,6 +66,11 @@ ISR(TIMER0_COMPA_vect)
 	static uint8_t portc_new = portc_out;
 	static uint8_t portd_new = portd_out;
 
+	// write out values -- first thing so we get guaranteed timing
+	PORTB = (PORTB & ~portb_use) | portb_new;
+	PORTC = (PORTC & ~portc_use) | portc_new;
+	PORTD = (PORTD & ~portd_use) | portd_new;
+
 	// read status bits
 	uint8_t const pinc = PINC;
 
@@ -103,11 +108,6 @@ ISR(TIMER0_COMPA_vect)
 		portd_new ^= pin_astep;
 	else
 		portd_new |= pin_astep;
-
-	// write out new values
-	PORTB = (PORTB & ~portb_use) | portb_new;
-	PORTC = (PORTC & ~portc_use) | portc_new;
-	PORTD = (PORTD & ~portd_use) | portd_new;
 }
 
 void loop()