Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Error when programming PIC12f629: invalid calibration data(3fff)

Status
Not open for further replies.

shahram642005

Newbie level 6
Newbie level 6
Joined
Nov 19, 2013
Messages
12
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
73
hi,/
I encounter the following error when programming pic12f629 using HI-Tech C compiler. i know its because the calibration data in address 0x3ff is erased but I dont know how to preserve it before being erase while programming the MCU. can anybody help me and provide me proper code to preserve the calibration memory?

Error: "The Target has invalid calibration data(3fff)"

best regards
 

The calibraton data is stored as a "movlw xx" instruction in the final memory address and xx is the calibration value. The error is telling you the programmer found something other than that instruction there.
The safest way to preserve it is to read it before programming, if I'm prototyping with small batches of PICs I write the value under the package with a marker pen in case of accidents! If the value is lost completely, the Pickit 2 has a utility to recreate it and most programming software will offer to read it before programming and then write it back so it keeps it's value.
In a worst case scenario where you can't recalibrate it, add an instruction "movlw 0" at the final address, it will set the device to mid-range value which is usually not far off correct.

Brian.
 
The calibraton data is stored as a "movlw xx" instruction in the final memory address and xx is the calibration value. The error is telling you the programmer found something other than that instruction there.
The safest way to preserve it is to read it before programming, if I'm prototyping with small batches of PICs I write the value under the package with a marker pen in case of accidents! If the value is lost completely, the Pickit 2 has a utility to recreate it and most programming software will offer to read it before programming and then write it back so it keeps it's value.
In a worst case scenario where you can't recalibrate it, add an instruction "movlw 0" at the final address, it will set the device to mid-range value which is usually not far off correct.

Brian.

but what about programming the whole bunch of PICs in production line?it will be inconvenient to first read this value and write it down. is there a way to automatically save it and recalibrate in the software?
 

Regularly, the programmer software (e.g. MPLAB) will take care of preserving the calibration data. You probably did something wrong.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top