SC5313A Operating & Programming Manual
Rev 1.0.2
21
Constants Definitions
// Parameters for storing data in the onboard EEPROM
#define
CALEEPROMSIZE
32768
// bytes
#define
USEREEPROMSIZE
32768
// bytes
// Define labels
#define
CH_I
0x00
#define
CH_Q
0x01
#define
RF_ATTEN1
0x00
#define
RF_ATTEN2
0x01
#define
RF_ATTEN3
0x02
#define
RF_AMP1
0x00
#define
RF_AMP2
0x01
// Define error codes
#define
SUCCESS
0
#define
USBDEVICEERROR
-1
#define
USBTRANSFERERROR
-2
#define
INPUTNULL
-3
#define
COMMERROR
-4
#define
INPUTNOTALLOC
-5
#define
EEPROMOUTBOUNDS
-6
#define
INVALIDARGUMENT
-7
#define
INPUTOUTRANGE
-8
#define
NOREFWHENLOCK
-9
#define
NORESOURCEFOUND
-10
#define
INVALIDCOMMAND
-11
// Define device registers
#define
INITIALIZE
0x01
// initialize the devices
#define
SET_SYSTEM_ACTIVE
0x02
// set the device “active” LED
#define
RF_FREQUENCY
0x10
// set the frequency
#define
RF_AMPLIFIER
0x12
// enable amplifiers
#define
RF_ATTENUATION
0x13
// set attenuation for digital step attenuators
#define
RF_PATH
0x14
// select the RF path
#define
RF_FILTER_SELECT
0x15
// manually select the RF filter
#define
LO_FILTER_SELECT
0x16
// manually select the LO filter
#define
LO_OUT_ENABLE
0x17
// enable LO output
#define
IF_GAIN_DAC
0x18
// set the I and Q chain IF gain
#define
VCOM_OUT_DAC
0x19
// sets common output voltage
#define
DC_OFFSET_DAC
0x1A
// sets the DC offset
#define
LINEARITY_DAC
0x1B
// sets the Linearity DAC (0 to 0xFFF)
#define
STORE_STARTUP_STATE
0x1D
// store the current state as default
#define
USER_EEPROM_WRITE
0x1F
// write a byte to the user EEPROM
#define
GET_DEVICE_STATUS
0x20
// read the device status
#define
GET_TEMPERATURE
0x21
// get the internal temperature of the device
#define
USER_EEPROM_READ
0x23
// read a byte from the user EEPROM
#define
CAL_EEPROM_READ
0x24
// read a byte from the calibration EEPROM