Generate rotary encoder signal
If you don't care too much about the exact frequency and timing you can use the below method- delays are 1/4 of 1/60 second or 4167us ideally, but the writes and the loop use some time so the frequency will be a bit lower than 60Hz. 

If you need very accurate timing or you need the micro to be available for other tasks you can access the on-chip timers directly, but that's a bit more effort. 

// play with the below number a bit to change the timing
#define DLY 4167

void setup() {
pinMode(13, OUTPUT);
pinMode(12, OUTPUT);
digitalWrite(13, LOW);
digitalWrite(12, LOW);
}

void loop() {
  delayMicroseconds(DLY); 
  digitalWrite(12, HIGH);
  delayMicroseconds(DLY); 
  digitalWrite(13, HIGH);
  delayMicroseconds(DLY); 
  digitalWrite(12, LOW);
  delayMicroseconds(DLY); 
  digitalWrite(13, LOW);
  }


(ignore the voltage display, they are both 0/5V)