In message <199702040222.UAA14939@Jupiter.Mcs.Net> PICLIST@MITVMA.MIT.EDU writes: > > 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? > > Hmm... others have suggested a problem with old initialization code intended > for other parts which may clear the calibration register incorrectly; it may > also be a power-up problem as you suggest. For fun, however, what if you try > something like this: > > 0FFF: movlw $C0 ; Or whatever constant > 0000: movwf $1F ; Not the calibration port! > ... > 00xx: movf $1F,w ; Read back the value above > 00xx: movwf $05 ; ...and store it to the speed register > > Does something like that work any better? > Did anyone try this? I'm interested to know if this is a good work around. (I'd try it myself, but my PC has been taken away for repair.) Regards, Mike Watson -- Mayes uk