 volatile uint16_t pwm_lengths[] = { 0x30, 0x10, 0x06 }; // PWM cycle lengths
 uint8_t pwm_i = 0; // Current PWM cycle
 volatile uint8_t spi_row_change = false;
+volatile uint8_t driving_readiness = 1;
 
 // Hardware configuration
 #define PIN_COL_BIT0 A2

		digitalWrite(PIN_ROW_LATCH, HIGH);
		spi_row_change = false;
		screen_on();
	}
}

ISR(TIMER1_COMPA_vect)
{
	// Screen is off when we hit here (OC1A has been set LOW)
	try_drive_screen();
}

static void try_drive_screen(void)
{
	// Do not drive until both timer interrupt and SPI interrupt
	// have completed.
	if (++driving_readiness != 2) return;
	driving_readiness = 0;
		
	// Are we moving to next segment?
	if (pwm_i == 0) {
		if (col_i == 0) {
