Master code for joystick to PIC