i want ask what is the problem. my osc2 pin have 5v output. it no need crystal to run when i put a wire to osc1 it will run program, is it foul?
Datasheet page 145 has info on osc types and setup.
You may be making the chip oscillate by connecting the 2 pins, and this may not be stable.
For timing insensitive applications, the “RC” device
option offers additional cost savings. The RC oscillator frequency is a function of the supply voltage, the
resistor (REXT) and capacitor (CEXT) values and the operating temperature. In addition to this, the oscillator
frequency will vary from unit to unit due to normal process parameter variation. Furthermore, the difference
in lead frame capacitance between package types will also affect the oscillation frequency, especially for low
CEXT values. The user also needs to take into account variation due to tolerance of external R and C
components used. Figure 14-3 shows how the R/C combination is connected to the PIC16F87XA