Jump to content
Sign in to follow this  
Mr.RC-Cam

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.

Share this post


Link to post
Share on other sites

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

http://www.melabs.com/resources/samples.htm

Alain

Edited by Acetronics

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×