GET_OSC_OUTPUT_FREQ

The GET_OSC_OUTPUT_FREQ function returns the currently requested oscillator output frequency in Hz. The oscillator output is one of the available pin types which can be set in the Pin Mapping.

Note that this function retrieves the requested frequency, which may differ from the actual frequency if an unavailable frequency was requested. To measure the frequency of the signal being output on the pin, the PIN_FREQUENCY function may be used instead.

GET_OSC_OUTPUT_FREQ was added in XJTAG v3.11 and is not recognised in versions prior to that.

GET_OSC_OUTPUT_FREQ can be called without any brackets after it, but this usage is discouraged and will be deprecated in a future version.

Syntax

GET_OSC_OUTPUT_FREQ()

Return value

An INT value containing the frequency in Hz. The range of values is between 0 Hz and 166 MHz in 10 kHz increments. If the output is currently in a high-impedance state, then zero is returned.

Example

ReportOscOutputFreq()(INT freq)
  freq := GET_OSC_OUTPUT_FREQ();	
  PRINT("Current OSC_OUTPUT frequency is: ", freq, " Hz.\n");
END;