/*
Sequences the relays from left to right on the board
Note that unless JP8 and JP9 are connected, relays RL16 and RL17 will not work
*/

void main() {
  OSCCON = 0b01110000; //8MHz
  PLLEN_bit = 1; //Enable PLL (now 48MHz)
  TRISD = 0b00000000; //PortD all outputs
  LATD = 0b00000000; // PortD all off
  while (1) {
    LATD = LATD << 1; // Bitshift
    if (LATD == 0) {
      LATD = 1;
    }
    delay_ms(500);
  }
}