View previous topic :: View next topic |
Author |
Message |
Yomi Guest
|
Reading the calibration code 12F629 |
Posted: Tue Nov 23, 2004 9:14 am |
|
|
Can someone tell me please how can I read the calibration value from a new 12F629 device?
I use the CCS : ICD-U40 latest version.
If I don't write to this address just download my program, does the ICD-U40 erase the calibration value?
Thanks. |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Tue Nov 23, 2004 10:26 am |
|
|
It is the last program memory address. Most if not all programmers and ICD's protect this location for you. That is, they read the value, erase the chip and reprogram it back. |
|
|
yomi Guest
|
|
Posted: Wed Nov 24, 2004 6:06 am |
|
|
Mark,
Thanks for your reply.
Isn't there a way just to read the value (without changing it)?
Is this code necessary:
Code: | #asm
call 0x3FF //**Call will return CAL value to W reg
movwf 0x90 //Move CAL value from W to OSCCAL reg
#endasm
|
|
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Wed Nov 24, 2004 7:13 am |
|
|
That is the code required to put the value in the OCCCAL reg. What is your goal? |
|
|
Yomi Guest
|
|
Posted: Fri Nov 26, 2004 3:52 am |
|
|
The goal is to keep the calibration frequency after I download my code, or after complete erase of the chip. |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Fri Nov 26, 2004 1:08 pm |
|
|
Quote: | Most if not all programmers and ICD's protect this location for you. That is, they read the value, erase the chip and reprogram it back. |
|
|
|
|