11.07.2015 Views

PICBASIC PLUS LITE Manual - Profe Saul

PICBASIC PLUS LITE Manual - Profe Saul

PICBASIC PLUS LITE Manual - Profe Saul

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>PICBASIC</strong> <strong>PLUS</strong> Compiler5.64. SET_OSCCALSyntax :Overview :Notes :SET_OSCCALCalibrate the on-chip oscillator found on some PICmicro devices.Some PICmicro devices, such as the PIC12C67x or 16F62x range,have on-chip RC oscillators. These devices contain an oscillator calibrationfactor in the last location of code space. The on-chip oscillatormay be fine-tuned by reading the data from this location and moving itinto the OSCCAL register. The command SET_OSCAL has beenspecially created to perform this task automatically each time the programstarts: -DEVICE 12C671SET_OSCCAL' Set OSCCAL for 1K device 12C671Add this command near the beginning of the program to perform thesetting of OSCCAL.If a UV erasable (windowed) device has been erased, the value cannotbe read from memory. To set the OSCCAL register on an erasedpart, add the following line near the beginning of the program: -OSCCAL = $C0 ' Set OSCCAL register to $C0The value $C0 is only an example. The part would need to be readbefore it is erased to obtain the actual OSCCAL value for that particulardevice.Always refer to the Microchip data sheets for more information onOSCCAL.119Copyright Crownhill 2001

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!