tom_hanks
Joined: 04 Apr 2007 Posts: 20
|
EC mode..oscillator |
Posted: Thu Jul 26, 2007 5:33 am |
|
|
ALL,
System is using a 30Mhz OSC in EC mode. the output of PIC, OSC2(FoSC/4 =7.5Mhz) is feed to pheripheral chip.
on based on OSC2 output i have to generate some control signals..
which is the best way of the following..
1. input the OSC2(uP_CLK) output (while (input (uP_CLK));//wait till CLK is high).
2. use a timer0,
(
setup_timer_0(RTCC_8_BIT|RTCC_INTERNAL|NO_PRESCALER);
set_timer0(1);
)
on interrupt set the flag to generate the control signals.
3. or trace the OSC2 output to any input pin of PIC and sample/generate the control signal ..
any suggetion is welcome..
tom |
|