DioSetupFrequency

Applies To

GC5050, GX5050, GX5055, GX5150, GX5280, GX5290, GX5290e, GX5295, File

Purpose

Sets up the clock frequency.

Syntax

DioSetupFrequency (nMasterHandle, dwFrequency, pnStatus)

Parameters

Name

Type

Comments

nMasterHandle

SHORT

Master or File board handle.

dwFrequency

DWORD

Return frequency range.

GC5050: 5Hz to 60MHz.

GX5050: 5Hz to 60MHz.

GX5055: 5Hz to 50MHz.

GX5150: 5Hz to 60MHz.

GX5281: 5Hz to 50MHz.

GX5282: 5Hz to 100MHz.

GX5283: 5Hz to 200MHz.

GX5291/GX5291e: 1Hz to 100MHz.

GX5292/GX5292e: 1Hz to 100MHz.

GX5293/GX5293e: 1Hz to 200MHz.

GX5295: 1Hz to 100MHz.

pnStatus

PSHORT

Returned status: 0 on success, negative number on failure.

Comments

This function sets the board clock frequency using the internal reference clock.

The function does not change the current clock source setting.

Note: using driver v4.0 (Build 48) and above frequency can be set regardless of the board's state (PAUSE/HALT/RUN).

GX5150:

After calling DioReset or power up, the internal clock is set to 10 MHz.

Calling this function overwrites previous setting made by this function.

GC5050, GX5050, GX5055, GX5280 and GX5290, GX5290e, GX5295:

After calling DioReset or power up, the internal clock is set to 10 MHz.

GX5293/GX5293e: for frequencies above 100MHz the user must set the number of active I/O channels (wide) to be 16 or less, see the DioSetupIOConfiguration function for more details.

GX5283/GX5293/GX5293e: for frequencies above 100MHz all clock and strobe delays have to be between 0 and 3nSec, see DioSetupClkStrobeDelay function for more details.

Example

The following example sets the board clock and strobe source to internal, and sets the frequency to 2MHz:

 

SHORT nStatus;

DioSetupClkStrobeSource(nMasterHandle, 0, &nStatus);

DioSetupFrequency (nMasterHandle, 2e6, &nStatus);

 

See Also

DioGetFrequency, DioSetupClkStrobeSource