SC5506A Operating & Programming Manual
Rev 2.1.1
25
Function:
sc5506a_RegWrite
Definition:
int
sc5506a_RegWrite(
deviceHandle
*
devHandle,
unsigned
char
commandByte,
unsigned
long
long
int
instructWord)
Input:
deviceHandle
*
devHandle
(handle to the opened device)
unsigned
char
commandByte
(register address)
unsigned
long
long
int
instructWord
(the data for the register)
Description:
sc5506a_RegWrite
writes the instructWord data to the register specified by the
commandByte. See the register map on
Error! Reference source not found.
for more i
nformation.
Example:
To set the power level to 2.00 dBm:
Function:
sc5506a_RegRead
Definition:
int
sc5506a_RegRead(
deviceHandle
*
devHandle,
unsigned
char
commandByte,
unsigned
long
long
int
instructWord,
unsigned
int
*receivedWord)
Input:
deviceHandle
*devHandle
(handle to the opened device)
unsigned
char
commandByte
(The address byte of the register to write to)
unsigned
long
long
int
instructWord
(the data for the register)
unsigned
int
*receivedWord
(data to be received)
Description:
sc5506a_RegRead
reads the data requested by the instructWord data to the register
specified by the commandByte. See the register map on Table 6 for more information.
Example:
To read the status of the device:
Function:
sc5506a_InitDevice
Definition:
int
sc5506a_InitDevice(
deviceHandle
*
devHandle,
bool
mode)
Input:
deviceHandle
*devHandle
(handle to the opened device)
bool
mode
(Set the mode of initialization)
Description:
sc5506A_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.
int
status = sc5506a_RegWrite(devHandle, RF_POWER, 200);
unsigned
int
deviceStatus;
int
status = sc5506a_RegRead(devHandle,
GET_DEVICE_STATUS,0x00,&deviceStatus);