SC5506A Operating & Programming Manual
Rev 2.1.1
21
Constants Definitions
// Parameters for storing data in the onboard EEPROM
#define
CALEEPROMSIZE
65536
// bytes
#define
USEREEPROMSIZE
32768
// bytes
// Assign channel names
#define
CH1
0
#define
CH2
1
// Attenuator assignments
#define
CH1ATTEN0
0
#define
CH1ATTEN1
1
#define
CH2ATTEN0
2
#define
CH2ATTEN1
3
// 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 device
#define
SET_SYSTEM_ACTIVE
0x02
// set the system “a
ctive
”
light
#define
RF_FREQUENCY
0x10
// set the frequency
#define
RF_POWER
0x11
// set power of LO1
#define
RF_OUT_ENABLE
0x12
// enable RF output
#define
AUTO_PWR_DISABLE
0x13
// disable auto power leveling
#define
RF_ALC_MODE
0x14
// select closed (0) or open (1) loop ALC modes
#define
DEVICE_STANDBY
0x15
// place the selected channel in standby mode
#define
REFERENCE_MODE
0x16
// reference settings
#define
GET_TEMPERATURE
0x17
// get the internal temperature of device
#define
GET_DEVICE_STATUS
0x18
// read the device status
#define
USER_EEPROM_READ
0x1A
// read a byte from the user EEPROM
#define
USER_EEPROM_WRITE
0x1B
// write a byte to the user EEPROM
#define
REFERENCE_DAC_SETTING
0x1D
// set the reference DAC value
#define
CAL_EEPROM_READ
0x21
// read a byte from the calibration EEPROM
#define
STORE_STARTUP_STATE
0x23
// store the new default state
#define
SET_ALC_DAC_VALUE
0x24
// set the RF ALC DAC value
#define
GET_ALC_DAC_VALUE
0x39
// read back the RF ALC DAC value