Mlodzianowski Janusz wrote: > I have just started playing with 12F629/675. > Is there a simple/elegant way, using CC5X compiler, to retrieve OSCCAL > calibation value? 'Retrieving' is a job for a PIC programmer I would say. I use it in a PIC program as follows: At the end of a program I define a fuction like this: #pragma origin 0x3ff static char calibrate(void) { return 128; // dummy! value. } And in main() I call this function as follows: OSCCAL = calibrate(); Of course in a similar way you can use the returnvalue of calibrate() for other purposes. BTW You have to have a programmer that supports the 16F629/675 and preserves the last word of program memory. It must ignore the contents of the hex file occupied by the function calibrate()! Regards, Rob. -- Rob Hamerling, Vianen, NL phone +31-347-322822 homepage: http://www.robh.nl/ -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body