Glen wrote: > James Cameron wrote: > > If you erased it, then this is what I would expect. > i never programmed it. only tried to read the calibration > value & couldnt Just to clarify; "erasing" the device is when you expose it to an ultraviolet light source. "programming" it is when you put it into a programmer and send code to it. I suggested you may have erased it and you responded that you had never programmed it. Have you erased it? > you mean setup like this No, slightly wrong. I shall change it ... -------------- config word ---------------- variables -------------------- ORG 0x000 ; MOVWF OSCCAL ; store oscillator calibration ------------------------ GOTO START ; go to start of program ------------------------ ; rest of code ------------------------ ORG 0x1FF ; MOVLW CC ; CC = calibration value end ; end of the file The key points to remember are; a) the calibration value must be at 0x1ff for 12c508, b) the value is to be loaded into the W register, c) the CPU starts on reset at 0x1ff and rolls over to 0x000, d) if you so desire it, you store W into OSCCAL at 0x000, -- James Cameron (quozl@us.netrek.org) Linux, Firewalls, OpenVMS, Software Engineering, CGI, HTTP, X, C, FORTH, COBOL, BASIC, DCL, csh, bash, ksh, sh, Electronics, Microcontrollers, Disability Engineering, Netrek, Bicycles, Pedant, Farming, Home Control, Remote Area Power, Greek Scholar, Tenor Vocalist, Church Sound, Husband. "Specialisation is for insects." -- Robert Heinlein.