Datasheet for PIC 16F876 states 20MHz clock input, 40 is too fast.

Config fuses determine which feature is active in the PIC: ADC, USB, PWM, etc.

Robert