Rather than me seperatly e-mail those who sent me private e-mail about the 12C508 & their trouble with the JW version's not taking a cal. constant, I wanted to post something that might help you out. Please notice that the trouble is not that the value doesn't work when OSCCAL is loaded from with the main part of the program; changing it 'on the fly' within the main prog loop seems to work fine. The problem is that (at least for some of us), setting it with the first two bytes executed after powerup does not work. I have isolated it down to two trivial cases: This DOES NOT WORK on some JW 12C508's: --------------------------------------- 1FFE 0C40 movlw 0x40 0000 0025 movwf 0x5 ------ the two above are the important ones, the code following is other init. 0001 clrf 0x4 0002 movlf 0x9 0003 movlw 0xf 0004 moxwf 0x7 etc. The following code DOES correctly set OSCCAL (notice two duplicate lines added) ------------------------------------------------------------------------------- 1FFE 0C40 movlw 0x40 0000 0025 movwf 0x5 0001 clrf 0x4 0002 movlf 0x9 0003 0C40 movlw 0x40 \ 0004 0025 movlw 0x5 / Repeating these two lines DOES load OSCCAL 0005 movlw 0xf 0006 moxwf 0x7 etc. This points to a powerup problem, at least in my mind. Also, notice that to make this woek, you need to KNOW the calibration constant, so it won't work well for mass-programming OTP's. Why would the value stay in OSCCAL when written with instructions several cycles after powerup, but not when written on the first two instructions? -Todd Peterson