PIC 16f676 ... Problems arise if by accident or otherwise, the program memory at address 0x3FF is erased or over written. Since the calibration value is unique to each individual PIC there is no way to know what it was, but it may possible to recover it by recalibrating against a known frequency ?
Hi Sahu, if you need to recover the calibration value you can write some simple code to output a frequency at 10% of the osc frequency then measure using a frequency meter;
It work you have to no how to do it. If it not working for you you have the pickit2 data and clock being held high with your hardware
Rb idea would be the simple way to go all the code in the Link is doing is counting the 60 hz toggle and figuring if your osc is running at the right speed to get a proper count.
If you have a PICkit 2 programmer, get version 2.50 (or later) software from the Microchip website. This includes a menu option to recalibrate and reprogram the OSSCAL setting in one operation.
I've reset some chips using the auto reset osccal and some I had to do more then one time. But I have found that it is easy if you don't have the chip data and clock hooked to any thing but the pickit2. If there pulled high it will not reset it. And some chips I had to regenerate it then load the chip manually