hi james , James Cameron wrote: > Glen wrote: > > i have a 12c508jw & have tried to read the osscal value prior to > > programming it. i can't find the osscal code when i read the pic > > when using picprog. it just shows all F's > > If you erased it, then this is what I would expect. Read it before > erasing it. If it's too late, then bad luck. Either buy another one, > or ask around for the procedure to re-create it using a test jig. ****************i never programmed it. only tried to read the calibration value & couldnt ********** > > > > since i'll have to install a calibration constant at the beginning of > > the program (because its a 12c508jw) is this the correct way? > > No. It should go at the last code location as described in the data > sheets. The instruction should be the "movlw" there, and the "movwf" > should be at 0x00. ****************i read from the microcontroller handbook (2-28)but its pretty vague( for a beginner that is )sorry but to clarify your statement, you mean setup like this -------------- config word ---------------- variables -------------------- ORG 0x1FF ; ORG 0x000 ; this is what the template shows MOVWF OSCCAL ; ------------------------ GOTO START ;start of program --------------------- ; rest of code ---------------------- MOVLW CC ;CC = calibration value (2ND last piece of code) end ;end of code with thanks , glen