Author Topic: Need help understanding how OSCCAL value works on PIC16F676  (Read 357 times)

0 Members and 1 Guest are viewing this topic.

Offline chinoyTopic starter

  • Regular Contributor
  • *
  • Posts: 95
  • Country: in
    • RDDreams
I need to move a hex file onto a PIC16F676
In the past I have used my ICD2 to do this job and it has worked well.

But then I moved to a PICKIT3. And gave the ICD2 away to a friend.

I did test the PICKIT3 and it worked in the past. But after a gap of a few years Im trying with a fresh batch of PICs. Picked up a few dozen.
This time I keep getting the message invalid OSCCAL value.

Have spent days on the net trying to read up on a solution. Best I could find was that I may now need to buy a PICKIT2. Or build a custom circuit and run a program to re-calibrate the value. And then physically write that value to the PIC using the PICKIT3 s/w. Pickit2 had a function in the s/w to re calibrate the OSCCAL value.

The circuit uses and External 10 Mhz oscillator.
I did try buying a new batch of PICs from another shop same problem.

My questions.
1. Does the OSCAL value matter when using an external Crystal.
2. Is there a middle of the road value I can use. What would it be ?
3. Since PICkit2 and Pickit3 were made open source by microchip. If I find the source code can I copy over the recalibrate osccal code into the pickit3 code and complie it ?. Where can I find the open source code for Pickit2 and 3.


Good thoughts, Good deeds, Good words.
All the religion you need in life.
 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3237
  • Country: ca
Re: Need help understanding how OSCCAL value works on PIC16F676
« Reply #1 on: June 09, 2024, 08:38:21 pm »
If it reports wrong calibration value, this most like this is because the connection is incorrect, the PIC is bricked, or so something of that sort - it simply cannot read the value.

You will have much less problems if you use newer PICs.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf