SC5313A Operating & Programming Manual
Rev 1.0.2
24
Function:
sc5313a_RegRead
Definition:
int
sc5313a_RegRead (
deviceHandle
*
deviceHandle,
unsigned
char
commandByte,
unsigned
long
long
int
instructWord,
unsigned
int
*receivedWord)
Input:
deviceHandle
*deviceHandle
(handle to the opened device)
unsigned
char
commandByte
(address byte of the register to write to)
unsigned
long
long
int
instructWord
(data for the register)
unsigned
int
*receivedWord
(data to be received)
Description:
sc5313a_RegRead
reads the data requested by the instructWord data to the register
specified by the commandByte. See
Table 5 (register map) for more information.
Example:
To read the status of the device:
Function:
sc5313a_InitDevice
Definition:
int
sc5313a_InitDevice (
deviceHandle
*
deviceHandle,
bool
mode)
Input:
deviceHandle
*deviceHandle
(handle to the opened device)
bool
mode
(set the mode of initialization)
Description:
sc5313a_InitDevice
initializes (resets) the device. Mode = 0 resets the device to the
default power up state. Mode = 1 resets the device but leaves it in its current state.
Function:
sc5313a_SetFrequency
Definition:
int
sc5313a_SetFrequency (
deviceHandle
*
deviceHandle,
unsigned
long
long
int
frequency)
Input:
deviceHandle
*deviceHandle
(handle to the opened device)
unsigned
long
long
int
frequency
(frequency in Hz)
Description:
sc5313a_SetFrequency
sets the RF frequency so the device can automatically use the
information to set the optimal filters in the LO and RF filter banks.
Function:
sc5313a_SetRfAmplifier
Definition:
int
sc5313a_SetRfAmplifier(deviceHandle *devHandle,
bool
amplifier,
bool
mode)
Input:
deviceHandle
*deviceHandle
(handle to the opened device)
bool
amplifier
(0=AMP#1, 1=AMP#2)
bool
mode
(disable/enable)
Description:
sc5313a_SetRfAmplifier
enables or disables the RF amplifiers.
unsigned
int
deviceStatus;
int
status = sc5313a_RegRead(devHandle,
GET_DEVICE_STATUS,0x00,&deviceStatus);