'How to save calibrating data?'
|I am developing a program in a windowed PIC14000. It is factory
preprogrammed with calibration data for oscillator, wdt, bandgap etc.
Problem: First time I erase it I will loose the calibration data in the chip.
I trying MPLAB 3.40.
For now, I read the target, then use Window\Calibration Data... , and then
copy-paste each value to a special file within project, keeping all chips
all calibrating data.
And when programming, the same way reverse. Easy to make errors.
There should be, and probably is, a way to save calibration data to a file
for each of my developement chips, so I can import them when programming.
I use 6 numbered chips, cycling them between programmer, prototype and eraser.
Don«t tell me about emulator; there is nor space, power or money enough ;)
/ Morgan Olsson, MORGANS REGLERTEKNIK, SE-277 35 KIVIK, Sweden \
\ iname.com, ph: +46 (0)414 70741; fax +46 (0)414 70331 / mrt
> I am developing a program in a windowed PIC14000. It is factory
> preprogrammed with calibration data for oscillator, wdt, bandgap etc.
> Problem: First time I erase it I will loose the calibration data in the chip.
I looked at a object file and it looks like it is simular
to intel hex format. A way to preserve the data might be
to read (download) theprogram on the old chip and
with a word processor remove all but that which holds
the calibration data.
Then add this data part onto the new .obj file before you
program the new chip.
Below is a .obj file of something for the Pic.
The first two characters are the number of data bytes.
Then 4 characters of address
Then maybe next 2 characters are for type?
then the data with a checksum at end.
The last line says that it is the end.
But all you would care about are the lines themselfs.
and if your data starts on a XXX0 boundry, the whole line
will contain your data.
I think each line stands by itself and they do not have
to be in order (except the last line which siginifys the end)
So this file contains data for
0000 - 0067
0200 - 022F
03FE - 03FF
It may be possible to write a simple program
for the P.C. to do this file merge.
Bill C. cornutt.combill
I've not worked with the PIC14000 chips yet, however two thoughts:
1) I suspect that you don't need accurate calibration info loaded for a
ALL proportion of your development time? (unless trying to sync serial)
2)if you set up the calibration data info as data to be assembled into
the hex file then you can use the if def statement series in MPASM to
automate the equivalent of your copy/paste labour and you can def the
S/No of each JW part prior to assembly/burn in.
3) Use the CBLOCK directive (again if using MPASM) to define each 14000
JW parts cal mem values, starting at an ORG of h'0FC0'. These file/s
can be "include"s to reduce your main file size.
Morgan Olsson wrote:
I've a similar problem with 12C509 - Again solved by labelling the EPROM with the original value ( not easy on an 8 legger:) ) and poking it in manually.
Of the few I've looked at, the calibration word seems to be around the 0xCxx mark. Anyone know how far the clock will drift if the calibration is slightly out????
More... (looser matching)
- Last day of these posts
- In 1998
, 1999 only
- New search...