problem with pic12f675

Status
Not open for further replies.

sanjubluerock3

New Member
hi i am having trouble loading hex to pic12f675 my pickit2 detects it but on the right side i see this message "OSCCAL:Invalid Value 3FF" i can import hex but when i try to write it gives me an error "invalid osccal value detected " please help me.....
 

Attachments

  • pic 12f675 error 2.PNG
    93.1 KB · Views: 1,282
  • pic 12f675 error.PNG
    66.2 KB · Views: 1,150
You need to goto....tools/osccal/auto regenerate and insert a new osccal value..

Ian
 
i get two options enter manually or auto regenerate if select the second option it gives me an error saying osccal auto-regenerating failed and if i don't know what value to enter
 
2C is about mid value for the oscillator value so it must work. You don't need to insert an oscillator value just skip it
 
You haven't unintentionally write protected the chip? Can you write to any other locations, ie can you write the program to the chip?

Looks to me as if the program has written 3FF to every location.

Ian
 
Last edited:
You haven't unintentionally write protected the chip? Can you write to any other locations, ie can you write the program to the chip?

Looks to me as if the program has written 3FF to every location.

That's probably the result of erasing the chip, it sets all bit's to ones - because of that you have to save and restore the OSCCAL value.
 
Import a valid hex file... manually insert 0x2C into the OSCCAL and try to upload the hex file... If you read the chip it will erase the windows applications program area and the OSCCAL value.

Ian
 
sorry same issue if anybody has working 12f675 please post the correct oscalvalue thanks in advance please i need help urgently
 
Any value up to about 5Ch will work. You can simply disregard the notice for the oscillator value and program the chip.
 
Last edited:
I have one in my pickit2 as we speak and the osccal value is 3450 That surprised even me....

Ian
 
Thaks colin

I've just been looking at the original post... The chip is code protected
 
The PICkit2 should be able to recalibrate it. If it can't there's some underlying reason which you want to get to the bottom of.

Try erasing the PIC, turning off code protect, and then re-try the auto-calibrate.
 
Last edited:
sorry same issue if anybody has working 12f675 please post the correct oscalvalue thanks in advance please i need help urgently

The value is specific to each chip, that's the point of it - it's calculated and written during testing.

There are details on MicroChip somewhere on how to measure it yourself.

The value from another chip, as suggested above, will work fine - BUT the oscillator may not be as accurate as you would like.
 
Before I had a PICkit2 programmer I used this to recalibrate my 12F675 and 12F629 when I accidentally erased them. It saves the value to EEPROM which you need to read back and then enter manually
PIC 12F629 / 12F675 internal oscillator recalibration utility

Since I got a PICkit2 I've never needed to use it since the PICkit2 does it and writes the value back to the correct location making it quicker and easier.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…