 }
 
 void setup() {
-	// Set output pins for LED display
+	// Enable output pins for LED display
 	for (int i=0; i<ARRAY_SIZE(pin_col); i++) {
 		pinMode(pin_col[i], OUTPUT);
 	}
 	pinMode(PIN_ROW_LATCH, OUTPUT);
 	pinMode(PIN_COL_LATCH, OUTPUT);
 
-	// Initialize serial
+	// Initialize serial and SPI
 	Serial.begin(19200);
-
-	// initialize SPI
 	SPI.begin();
-	Timer1.initialize(pwm_lengths[0]);
-	Timer1.attachInterrupt(driveDisplay);
+
+	// Timer magic
+	cli();
+	TCCR1A = 0; // Do not toggle pins
+	TCCR1B = (1 << CS11 | 1 << CS10); // Clock divider 64, 64/16e6 = 40µs cycle
+	TCCR1C = 0; // not forcing output compare
+	TCNT1 = 0; // set timer counter initial value (16 bit value)
+	TIMSK1 = 1 << OCIE1A; // enable timer compare match 1A interrupt
+	OCR1A = 1; // Go to the interrupt vector ASAP
+	sei();
 }
 
 void loop() {

	plane[byte_i] |= bit_i;
}

void driveDisplay() {
	static int cur_pin = pin_col[0];

	// Set run length
	Timer1.setPeriod(pwm_lengths[pwm_i]);
	
	// Main screen turn off.
	digitalWrite(cur_pin, HIGH);

#define LITERAL_ESCAPE  '\0' // Escape followed by this is literal escape.
#define CMD_FRAME       'F'  // Incoming frame
#define CMD_PING        'P'  // Serial port ping
#define CMD_PWM         'W'  // PWM parameter setup

#define MODE_NOOP    0 // No operation, ignore input until escape
#define MODE_ESCAPE  1 // Escape received, wait for a command
#define MODE_FRAME   2 // Receiving frame
#define MODE_PWM     3 // PWM parameter setup

// Hacklab logo at startup
static uint8_t buf_a[3][56] = {
