if possible try using an single supply opamp in comparator configuration... if this is also not possible... tell me what all components you can use.....
The 18F4320 has a maximum external oscillator speed of 25MHz, it's clearly stated on page 3. Internally it's PLL can do a 4x multiply on a 10MHz crystal to run it at 40MHz but the PLL will generally fail at much above 10MHz. You prototype board will also have way too much stray capacitance for MHz operation.
Thanks for reply...
in DS(PG.3), it is mention that u can use the external clock upto 40Mhz.
and hence i am using external oscillator as a Ext clock in EC mode...
any way my code is working now..
if u need it, let me know..