Positron Compiler Documentation

Oscillator Frequency Declare.

Positron8 · Revision 4.0.6.5 · PDF page 419

12-bit core device XTAL values: Declare Xtal = 4, 8, 10, 12, 16, or 20.

Standard 14-bit core device XTAL values: Declare Xtal = 3, 4, 7, 8, 10, 12, 14, 16, 19, 20, 22, or 24.

Enhanced 14-bit core device XTAL values: Declare Xtal = 3, 4, 7, 8, 10, 12, 14, 16, 19, 20, 22, 24, 32, 48, or 64.

18F device XTAL values: Declare Xtal = 3, 4, 7, 8, 10, 12, 14, 16, 19, 20, 22, 24, 25, 29, 32, 33, 40, 48, 64, 80, or 88.

Inform the compiler what frequency oscillator is being used on the microcontroller.

Some commands are very dependant on the oscillator frequency, Rsin, Rsout, DelayMs, and DelayUs being just a few. In order for the compiler to adjust the correct timing for these commands, it must know what frequency is being used on the microcontroller.

The Xtal frequencies 3, 7, 14, 19 and 22 are for 3.58MHz, 7.2MHz, 14.32MHz, 19.66MHz, 22.1184MHz and 29.2MHz respectively.

If the Declare is not used in the program, then the default frequency will be of an unknown state.

View original PDF page 419Open page in PDFOriginal PDF page 419