Jump to content

How To Restore a PIC's OSCAL Value

Recommended Posts

A common flash PIC microcontroller mistake involves the factory programmed Oscillator calibration (OSCAL) constant. This is a byte of data in the PIC that provides a correction value to it's internal clock frequency. For example, decoding or generating an accurate R/C pulse requires that the OSCAL have an accurate value. If your PIC project uses an external oscillator then you can totally ignore OSCAL. But if you use the internal oscillator, then treat the OSCAL feature with respect. Don't erase or write to it!

The issue is that many of the hobby based programming systems make it too easy to erase this value. Hence, the PIC's oscillator is no longer accurate enough for common R/C project applications. If you have recorded the value before using the chip then you can easily re-write it back. But, you know what they say about hindsight.

Fortunately, PIC's are cheap and you can just toss the ones with messed up OSCALs. However, if you would like to restore the value, there is a solution using EDN Magazine's design idea by Noureddine Benabadji: Click Here.

Link to post
Share on other sites
  • 3 weeks later...

Hi, Mr Cam

A PicBasicPro version of this utility ( for 12F6xx devices ) is also downloadable here :

see : .melabs.com/resources/samples/12F675/PBP/RECOVER.BAS

in the Labs X4 sample programs



Edited by Acetronics
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...