Do you need an oscillator Do you need an oscillator input for Timer1? You still have Timer0, Timer2 and Timer3… plus Timer1 can be run off the internal oscillator anyway.
The PIC does not need the Timer1 oscillator to run. You only need to use that if you’re synchronising Timer1 with a clock source other than the main clock the PIC itself is using. This oscillator is not the same oscillator that the PIC processor itself runs off. If your code doesn’t make use of Timer1 then you don’t need to worry about the Timer1 module, you can just disable it.
The PIC18F252 has no The PIC18F252 has no internal oscillator, you are correct there. However, the Timer1 oscillator has nothing to do with the primary oscillator. The primary oscillator uses pins OSC1/CLKI and OSC2/CLKO/RA6, whereas the Timer1 oscillator uses pin RC0/TOSO/T1CKI, but it only uses that pin if you enable external clock source for Timer1.
but if i want to use pwm, i but if i want to use pwm, i would need timer 1 right? all along i’ve been unsing the input for timer 1 and its working well. Without the osc nothing works.
If you are using the actual PWM module you need Timer2, not Timer1. When you say that nothing works without the oscillator, which oscillator are you talking about?
If you want Timer1 to run If you want Timer1 to run without the crystal, you need to change the Timer1 configuration register. Timer2 has no input, as it derives its clock signal from the primary oscillator.