There needs to be one line of code following the ORG 0x1FF line
MOVLW 0xnn ; where 0xnn is your osc. calibration value.
You did record the original value didn't you?
- Nick -
Quentin wrote:
{Quote hidden}>
> Tobias wrote:
>
> > I think the problem is the internal osc. When I program my chips I always
> > get an message "calibration data already programed" at the end. Also, when
> > verifying, I always get an missmatch at 0000 (calibration data?)
> >
> Ignore the message on an OTP.
> You must tell the PIC in the first line where to get the calibration
> data, so you must have the following at the top of your code (from the
> 12C508 template):
>
> ORG 0x1FF ; processor reset vector
> ; Internal RC calibration value is placed at location 0x1FF by Microchip
> ; as a movlw k, where the k is a literal value.
> ORG 0x000 ; coding begins here
> movwf OSCCAL ; update register with factory cal
> value
>
> Check also that you do not use the 12C509's reset vector (0x03FF).
>
> Hope this helps
> Quentin