/*
Mirrors PortB onto PortD
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
  ANCON0 = 0b11111111; //All digital
  ANCON1 = 0b00011111; //All digital
  while (1) {
    LATD = PORTB;
    delay_ms(100);
  }
}