     pinMode(MOSI, INPUT);   // NB: (1)
     pinMode(SCLK, OUTPUT);
     pinMode(DLOAD, OUTPUT);
-
     pinMode(BTN_MODE, INPUT_PULLUP);
     pinMode(BTN_SELECT, INPUT_PULLUP);
-
-    // Initial pin values
-    digitalWrite(SCLK, LOW);
-    digitalWrite(MISO, LOW);
-    digitalWrite(DLOAD, LOW);
 
     // Set up MX7219 with display test on
     setupMX7219();
     setMX7219Reg(MX7219_SCN_LIMIT, 0x06);   // Scan digits 0-6
     setMX7219Reg(MX7219_DPLY_TEST, 0x01);   // Enable display test
-    showing_dt = true; dt_shown_at = millis();
+    unsigned long dt_shown_at = millis();   // Record display test time
 
     // Initial address/data bus values
     address_bus = data_bus = 0;


    next_demo_loop_at = millis() + DEMO_LOOP_PERIOD;
    demo_loop_count = 0;
}

void loop() {
    // Display test off after DPY_TST_DURATION milliseconds
    if(showing_dt && (millis() - dt_shown_at > DPY_TST_DURATION)) {
        showing_dt = false;
        setMX7219Reg(MX7219_DPLY_TEST, 0x00);
    }

    // Poll switches
    mode_switch.poll();
    select_switch.poll();

// Status bits
byte status_bits;

// How long to show display test for
const int DPY_TST_DURATION = 500; // milliseconds

// Is processor stopped?
