|
The PIC 12F629 and 12F675 have a factory set oscillator calibration value written to the last program memory location during manufacture. When programming the PIC the programmer software should read this value out, merge it with the program data being written to the PIC, and then write it back. However, since this calibration value is in the normal program memory area of the PIC it is quite possible to erase it. Once you've done this, working out what the value should be is not easy and without it the internal 4Mhz oscillator will not run at the correct frequency. Worse still, any application code that expects to find the calibration value will most likely crash. Therefore it is important to know the correct value for the internal oscillator calibration setting. This tip shows you how to make sure you always know what the correct oscillator calibration value is so you can recover it and write it back should you accidentally erase it.
Now if you ever erase the calibration value, all you have to do is take the binary value marked on the pins, prefix it with 34 and write it back to address 0x3FF - Easy! If you have lost the setting you can calculate a new value using the project here All information and software on this website are provided "as is", and without warranty of any kind, either express or implied. In no event shall I be liable to you or any third party for any consequential, incidental, direct, indirect, special, punitive or other damages arising out of the use or inability to use the software and/ or hardware on this web site. |