| Modifier and Type | Field and Description |
|---|---|
static int |
CEX_10UA
Current excitation - 10 microamps
|
static int |
CEX_210UA
Current excitation - 210 microamps
|
static int |
CEX_OFF
Current excitation - off
|
static int |
CIT_ADC_0
Configuration item - ADC 0
|
static int |
CIT_ADC_1
Configuration item - ADC 1
|
static int |
CIT_ADC_2
Configuration item - ADC 2
|
static int |
CIT_ADC_3
Configuration item - ADC 3
|
static int |
CSI_CH_0_COEF_0
Config subitem - Channel 0 coefficient 0
|
static int |
CSI_CH_0_COEF_1
Config subitem - Channel 0 coefficient 1
|
static int |
CSI_CH_0_COEF_2
Config subitem - Channel 0 coefficient 2
|
static int |
CSI_CH_0_COEF_3
Config subitem - Channel 0 coefficient 3
|
static int |
CSI_CH_0_GAIN
Config subitem - Channel 0 gain value
|
static int |
CSI_CH_0_TC
Config subitem - Thermocouple type for channel 0
|
static int |
CSI_CH_0_VCONN
Config subitem - Input type for ADC 2&3 channel 0
|
static int |
CSI_CH_1_COEF_0
Config subitem - Channel 1 coefficient 0
|
static int |
CSI_CH_1_COEF_1
Config subitem - Channel 1 coefficient 1
|
static int |
CSI_CH_1_COEF_2
Config subitem - Channel 1 coefficient 2
|
static int |
CSI_CH_1_COEF_3
Config subitem - Channel 1 coefficient 3
|
static int |
CSI_CH_1_GAIN
Config subitem - Channel 1 gain value
|
static int |
CSI_CH_1_TC
Config subitem - Thermocouple type for channel 1
|
static int |
CSI_CH_1_VCONN
Config subitem - Input type for ADC 2&3 channel 1
|
static int |
CSI_CONN_TYPE
Config subitem - Connection type for RTD & Thermistor Sensors
|
static int |
CSI_EXCITATION
Config subitem - Current excitation
|
static int |
CSI_FILTER_RATE
Config subitem - Filter update rate
|
static int |
CSI_I_VALUE_0
Config subitem - Measured I value @ 10uA
|
static int |
CSI_I_VALUE_1
Config subitem - Measured I value @ 210uA
|
static int |
CSI_I_VALUE_2
Config subitem - Measured I value @ 10uA (3 wire conn)
|
static int |
CSI_SENSOR_TYPE
Config subitem - Connected sensor type
|
static int |
CSI_V_VALUE_0
Config subitem - Measured V value @ 10uA
|
static int |
CSI_V_VALUE_1
Config subitem - Measured V value @ 210uA
|
static int |
CSI_V_VALUE_2
Config subitem - Measured V value @ 210uA (3 wire conn)
|
static int |
CSI_VREF
Config subitem - Measured Vref value
|
static int |
FREQ_10_HZ
Filter rate - 10 Hz
|
static int |
FREQ_12_5_HZ
Filter rate - 12.5 Hz
|
static int |
FREQ_125_HZ
Filter rate - 125 Hz
|
static int |
FREQ_16_7_HZ
Filter rate - 16.7 Hz
|
static int |
FREQ_19_6_HZ
Filter rate - 19.6 Hz
|
static int |
FREQ_250_HZ
Filter rate - 250 Hz
|
static int |
FREQ_33_3_HZ
Filter rate - 33.3 Hz
|
static int |
FREQ_39_2_HZ
Filter rate - 39.2 Hz
|
static int |
FREQ_4_17_HZ
Filter rate - 4.17 Hz
|
static int |
FREQ_50_HZ
Filter rate - 50 Hz
|
static int |
FREQ_500_HZ
Filter rate - 500 Hz
|
static int |
FREQ_6_25_HZ
Filter rate - 6.25 Hz
|
static int |
FREQ_62_5_HZ
Filter rate - 62.5 Hz
|
static int |
FREQ_8_33_HZ
Filter rate - 8.33 Hz
|
static int |
GAIN_128X
Gain - 128X
|
static int |
GAIN_16X
Gain - 16X
|
static int |
GAIN_1X
Gain - 1X
|
static int |
GAIN_2X
Gain - 2X
|
static int |
GAIN_32X
Gain - 32X
|
static int |
GAIN_4X
Gain - 4X
|
static int |
GAIN_64X
Gain - 64X
|
static int |
GAIN_8X
Gain - 8X
|
static int |
RANGE_1_25V
Voltage range +/- 1.25V
|
static int |
RANGE_10V
Voltage range +/- 10V
|
static int |
RANGE_2_5V
Voltage range +/- 2.5V
|
static int |
RANGE_5V
Voltage range +/- 5V
|
static int |
STP_DISABLED
Sensor type - Disabled
|
static int |
STP_RTD
Sensor type - RTD
|
static int |
STP_SEMICONDUCTOR
Sensor type - Semiconductor
|
static int |
STP_THERMISTOR
Sensor type - Thermistor
|
static int |
STP_THERMOCOUPLE
Sensor type - Thermocouple
|
static int |
STP_VOLTAGE
Sensor type - Voltage
|
static int |
TC_TYPE_B
Thermocouple type B
|
static int |
TC_TYPE_E
Thermocouple type E
|
static int |
TC_TYPE_J
Thermocouple type J
|
static int |
TC_TYPE_K
Thermocouple type K
|
static int |
TC_TYPE_N
Thermocouple type N
|
static int |
TC_TYPE_R
Thermocouple type R
|
static int |
TC_TYPE_S
Thermocouple type S
|
static int |
TC_TYPE_T
Thermocouple type T
|
static int |
TCT_2WIRE_1SENSOR
Therm connection - two wire, one sensor
|
static int |
TCT_2WIRE_2SENSOR
Therm connection - two wire, two sensors
|
static int |
TCT_3WIRE
Therm connection - three wire
|
static int |
TCT_4WIRE
Therm connection - four wire
|
static int |
USB_TC_AI_DID
The USB-TC-AI DAQ device
|
static int |
USB_TC_DID
The USB-TC DAQ device
|
static int |
USB_TEMP_DID
The USB-TEMP DAQ device
|
static int |
VCT_CALIBRATION
Voltage connection - calibration
|
static int |
VCT_DIFFERENTIAL
Voltage connection - differential
|
static int |
VCT_GROUNDED
Voltage connection - grounded
|
static int |
VCT_SINGLE_ENDED
Voltage connection - single-ended
|
| Constructor and Description |
|---|
MccUsb() |
| Modifier and Type | Method and Description |
|---|---|
float |
adcIn(int chan,
int units)
Reads an ADC channel
|
int |
adcScan(int start,
int end,
int units,
float[] value)
Scans ADC channels
|
void |
blink()
Blinks the LED
|
void |
calConfig(int gain,
int polarity,
int path)
Configures the calibration MUX
|
void |
calibrate(int type)
Calibrates the ADC channels
|
void |
calSteps(int[] steps)
Gets the number of calibration steps
|
void |
close()
Closes the connection to the device
|
void |
cntrInit()
Initializes the event counter (sets it to zero)
|
int |
cntrRead()
Reads the event counter
|
void |
configAlarm(int alarm,
int iOptns,
int oOptns,
float value1,
float value2)
Configures an alarm
|
void |
dioConfig(int direction)
Configures the DIO port
|
void |
dioConfigBit(int bitno,
int direction)
Configures one DIO line
|
int |
dioIn()
Reads all the DIO lines
|
int |
dioInBit(int bitno)
Reads one DIO line
|
void |
dioOut(int value)
Writes all the DIO lines
|
void |
dioOutBit(int bitno,
int value)
Writes one DIO line
|
void |
getAlarmConfig(int alarm,
int[] optns,
float[] values)
Gets an alarm configuration
|
int |
getBurnout(int mask)
Gets the burnout status and clears it under a mask
|
float |
getCoefficient(int chan,
int coeff)
Gets a channel's coefficient
|
int |
getDevId()
Gets the device ID
|
int |
getExcitation(int chan)
Gets a channel pair's current excitation
|
int |
getFilterRate(int chan)
Gets a channel pair's filter update rate
|
int |
getGain(int chan)
Gets a channel's gain
|
float |
getItem(int item,
int subItem)
Gets a configuration item
|
float |
getReferenceVoltage(int chan)
Gets a channel pair's reference voltage
|
int |
getSensorType(int chan)
Gets a channel pair's sensor type
|
int |
getStatus()
Gets the calibration status
|
int |
getTCType(int chan)
Gets a channel's thermocouple type
|
int |
getThermConnType(int chan)
Gets a thermistor or RTD channel pair's connection type
|
org.lsst.ccs.drivers.usb.UsbDevice |
getUsbDevice()
Gets the USB device object
|
int |
getVoltageConnType(int chan)
Gets a voltage channel's connection type
|
void |
open(int did,
String serial,
boolean force)
Opens a connection to a device
|
void |
prepareDownload(int code,
int micro)
Prepares for a download
|
int |
readCode(int addr,
int count,
byte[] data)
Reads firmware code
|
int |
readMemory(int addr,
int type,
int count,
byte[] data)
Reads device memory
|
void |
reset()
Resets the device
|
void |
setCoefficient(int chan,
int coeff,
float value)
Sets a channel's coefficient
|
void |
setExcitation(int chan,
int value)
Sets a channel pair's current excitation
|
void |
setGain(int chan,
int gain)
Sets a channel's gain
|
void |
setItem(int item,
int subItem,
float value)
Sets a configuration item
|
void |
setSensorType(int chan,
int type)
Sets a channel pair's sensor type
|
void |
setTCType(int chan,
int type)
Sets a channel's thermocouple type
|
void |
setThermConnType(int chan,
int type)
Sets a thermistor or RTD channel pair's connection type
|
void |
setVoltageConnType(int chan,
int type)
Sets a voltage channel's connection type
|
void |
writeCode(int addr,
int count,
byte[] data)
Writes firmware code
|
int |
writeMemory(int addr,
int type,
int count,
byte[] data)
Writes device memory
|
void |
writeSerial(String serial)
Writes the serial number
|
public static final int USB_TC_AI_DID
public static final int USB_TC_DID
public static final int USB_TEMP_DID
public static final int CIT_ADC_0
public static final int CIT_ADC_1
public static final int CIT_ADC_2
public static final int CIT_ADC_3
public static final int CSI_SENSOR_TYPE
public static final int CSI_CONN_TYPE
public static final int CSI_FILTER_RATE
public static final int CSI_EXCITATION
public static final int CSI_VREF
public static final int CSI_I_VALUE_0
public static final int CSI_I_VALUE_1
public static final int CSI_I_VALUE_2
public static final int CSI_V_VALUE_0
public static final int CSI_V_VALUE_1
public static final int CSI_V_VALUE_2
public static final int CSI_CH_0_TC
public static final int CSI_CH_1_TC
public static final int CSI_CH_0_GAIN
public static final int CSI_CH_1_GAIN
public static final int CSI_CH_0_COEF_0
public static final int CSI_CH_1_COEF_0
public static final int CSI_CH_0_COEF_1
public static final int CSI_CH_1_COEF_1
public static final int CSI_CH_0_COEF_2
public static final int CSI_CH_1_COEF_2
public static final int CSI_CH_0_COEF_3
public static final int CSI_CH_1_COEF_3
public static final int CSI_CH_0_VCONN
public static final int CSI_CH_1_VCONN
public static final int STP_RTD
public static final int STP_THERMISTOR
public static final int STP_THERMOCOUPLE
public static final int STP_SEMICONDUCTOR
public static final int STP_DISABLED
public static final int STP_VOLTAGE
public static final int FREQ_500_HZ
public static final int FREQ_250_HZ
public static final int FREQ_125_HZ
public static final int FREQ_62_5_HZ
public static final int FREQ_50_HZ
public static final int FREQ_39_2_HZ
public static final int FREQ_33_3_HZ
public static final int FREQ_19_6_HZ
public static final int FREQ_16_7_HZ
public static final int FREQ_12_5_HZ
public static final int FREQ_10_HZ
public static final int FREQ_8_33_HZ
public static final int FREQ_6_25_HZ
public static final int FREQ_4_17_HZ
public static final int TC_TYPE_J
public static final int TC_TYPE_K
public static final int TC_TYPE_T
public static final int TC_TYPE_E
public static final int TC_TYPE_R
public static final int TC_TYPE_S
public static final int TC_TYPE_B
public static final int TC_TYPE_N
public static final int GAIN_1X
public static final int GAIN_2X
public static final int GAIN_4X
public static final int GAIN_8X
public static final int GAIN_16X
public static final int GAIN_32X
public static final int GAIN_64X
public static final int GAIN_128X
public static final int RANGE_10V
public static final int RANGE_5V
public static final int RANGE_2_5V
public static final int RANGE_1_25V
public static final int VCT_DIFFERENTIAL
public static final int VCT_SINGLE_ENDED
public static final int VCT_GROUNDED
public static final int VCT_CALIBRATION
public static final int TCT_2WIRE_1SENSOR
public static final int TCT_2WIRE_2SENSOR
public static final int TCT_3WIRE
public static final int TCT_4WIRE
public static final int CEX_OFF
public static final int CEX_10UA
public static final int CEX_210UA
public int getDevId()
public org.lsst.ccs.drivers.usb.UsbDevice getUsbDevice()
public void open(int did,
String serial,
boolean force)
throws org.lsst.ccs.drivers.commons.DriverException
did - The device identifier code.serial - The serial number of the device, or null if the first
found device of this type is to be used.force - If true, claiming the device is forced, allowing it
to be opened even if another driver has claimed it.org.lsst.ccs.drivers.commons.DriverExceptionpublic void close()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionpublic void dioConfig(int direction)
throws org.lsst.ccs.drivers.commons.DriverException
direction - The direction to set for all the DIO lines. If
0, all lines are output; otherwise they are input.org.lsst.ccs.drivers.commons.DriverExceptionUnsupportedOperationExceptionpublic void dioConfigBit(int bitno,
int direction)
throws org.lsst.ccs.drivers.commons.DriverException
bitno - The number (0 - 7) of the DIO line to configure.direction - The direction to set for the DIO line. If 0,
the line is output; otherwise it is input.org.lsst.ccs.drivers.commons.DriverExceptionUnsupportedOperationExceptionpublic int dioIn()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionUnsupportedOperationExceptionpublic int dioInBit(int bitno)
throws org.lsst.ccs.drivers.commons.DriverException
bitno - The number (0 - 7) of the DIO line to read.org.lsst.ccs.drivers.commons.DriverExceptionUnsupportedOperationExceptionpublic void dioOut(int value)
throws org.lsst.ccs.drivers.commons.DriverException
value - A bit mask of the states to set in the 8 DIO lines.org.lsst.ccs.drivers.commons.DriverExceptionUnsupportedOperationExceptionpublic void dioOutBit(int bitno,
int value)
throws org.lsst.ccs.drivers.commons.DriverException
bitno - The number (0 - 7) of the DIO line to write.value - The value (0 or 1) to write.org.lsst.ccs.drivers.commons.DriverExceptionUnsupportedOperationExceptionpublic void cntrInit()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionUnsupportedOperationExceptionpublic int cntrRead()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionUnsupportedOperationExceptionpublic float adcIn(int chan,
int units)
throws org.lsst.ccs.drivers.commons.DriverException
chan - The channel to read: 0 - 3 are temperatures; 4 - 7
are temperatures for the USB-TC-AI and voltages for
the USB-TC; 128 - 129 are the CJCs (only one for the
USB-TC-AI).units - The units of the result: for temperature channels
0 = temperature, 1 = raw units; for voltage channels
0 = voltage, 1 = ADC counts; CJC is always temperature.org.lsst.ccs.drivers.commons.DriverExceptionUnsupportedOperationExceptionpublic int adcScan(int start,
int end,
int units,
float[] value)
throws org.lsst.ccs.drivers.commons.DriverException
start - The first channel to read (0 - 7).end - The last channel to read (0 - 7 and >= start).units - The units of the result: for temperature channels
0 = temperature, 1 = raw units; for voltage channels
0 = voltage, 1 = ADC counts.value - An array of sufficient size to contain the read values.org.lsst.ccs.drivers.commons.DriverExceptionUnsupportedOperationExceptionpublic void blink()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionUnsupportedOperationExceptionpublic void reset()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionUnsupportedOperationExceptionpublic float getItem(int item,
int subItem)
throws org.lsst.ccs.drivers.commons.DriverException
item - The item code (ADC number in the range 0 - 3) of the
configuration data.subItem - The subitem code of the configuration data.org.lsst.ccs.drivers.commons.DriverExceptionUnsupportedOperationExceptionpublic int getSensorType(int chan)
throws org.lsst.ccs.drivers.commons.DriverException
chan - The channel number of one of the pair.org.lsst.ccs.drivers.commons.DriverExceptionUnsupportedOperationExceptionpublic int getThermConnType(int chan)
throws org.lsst.ccs.drivers.commons.DriverException
chan - The channel number of one of the pair.org.lsst.ccs.drivers.commons.DriverExceptionUnsupportedOperationExceptionpublic int getFilterRate(int chan)
throws org.lsst.ccs.drivers.commons.DriverException
chan - The channel number of one of the pair.org.lsst.ccs.drivers.commons.DriverExceptionUnsupportedOperationExceptionpublic int getExcitation(int chan)
throws org.lsst.ccs.drivers.commons.DriverException
chan - The channel number of one of the pair.org.lsst.ccs.drivers.commons.DriverExceptionUnsupportedOperationExceptionpublic float getReferenceVoltage(int chan)
throws org.lsst.ccs.drivers.commons.DriverException
chan - The channel number of one of the pair.org.lsst.ccs.drivers.commons.DriverExceptionUnsupportedOperationExceptionpublic int getTCType(int chan)
throws org.lsst.ccs.drivers.commons.DriverException
chan - The channel number.org.lsst.ccs.drivers.commons.DriverExceptionUnsupportedOperationExceptionpublic int getGain(int chan)
throws org.lsst.ccs.drivers.commons.DriverException
chan - The channel number.org.lsst.ccs.drivers.commons.DriverExceptionUnsupportedOperationExceptionpublic float getCoefficient(int chan,
int coeff)
throws org.lsst.ccs.drivers.commons.DriverException
chan - The channel number.coeff - The coefficient number (0 - 3).org.lsst.ccs.drivers.commons.DriverExceptionUnsupportedOperationExceptionpublic int getVoltageConnType(int chan)
throws org.lsst.ccs.drivers.commons.DriverException
chan - The channel number.org.lsst.ccs.drivers.commons.DriverExceptionUnsupportedOperationExceptionpublic void setItem(int item,
int subItem,
float value)
throws org.lsst.ccs.drivers.commons.DriverException
item - The item code (ADC number in the range 0 - 3) of the
configuration data.subItem - The subitem code of the configuration data.value - The value to set. Note that most items are unsigned
bytes, but are specified as floating point.org.lsst.ccs.drivers.commons.DriverExceptionUnsupportedOperationExceptionpublic void setSensorType(int chan,
int type)
throws org.lsst.ccs.drivers.commons.DriverException
chan - The channel number of one of the pair.type - The sensor type to set.org.lsst.ccs.drivers.commons.DriverExceptionUnsupportedOperationExceptionpublic void setThermConnType(int chan,
int type)
throws org.lsst.ccs.drivers.commons.DriverException
chan - The channel number of one of the pair.type - The connection type to set.org.lsst.ccs.drivers.commons.DriverExceptionUnsupportedOperationExceptionpublic void setExcitation(int chan,
int value)
throws org.lsst.ccs.drivers.commons.DriverException
chan - The channel number of one of the pair.value - The encoded excitation value to set.org.lsst.ccs.drivers.commons.DriverExceptionUnsupportedOperationExceptionpublic void setTCType(int chan,
int type)
throws org.lsst.ccs.drivers.commons.DriverException
chan - The channel number.type - The thermocouple type to set.org.lsst.ccs.drivers.commons.DriverExceptionUnsupportedOperationExceptionpublic void setGain(int chan,
int gain)
throws org.lsst.ccs.drivers.commons.DriverException
chan - The channel number.gain - The encoded gain value to set.org.lsst.ccs.drivers.commons.DriverExceptionUnsupportedOperationExceptionpublic void setCoefficient(int chan,
int coeff,
float value)
throws org.lsst.ccs.drivers.commons.DriverException
chan - The channel number.coeff - The coefficient number (0 - 3).value - The value to set.org.lsst.ccs.drivers.commons.DriverExceptionUnsupportedOperationExceptionpublic void setVoltageConnType(int chan,
int type)
throws org.lsst.ccs.drivers.commons.DriverException
chan - The channel number.type - The connection type to set.org.lsst.ccs.drivers.commons.DriverExceptionUnsupportedOperationExceptionpublic void configAlarm(int alarm,
int iOptns,
int oOptns,
float value1,
float value2)
throws org.lsst.ccs.drivers.commons.DriverException
This routine configures the temperature and voltage alarms. There are eight alarms available, corresponding to the eight available DIO bits. If an alarm is enabled, its associated DIO line will be configured as an output on power on and driven to its non-alarmed state. The alarm conditions are evaluated every measurement cycle.
Input options:
| Bit | Description |
|---|---|
| [0-2]: | input channel (0-7) |
| 3: | units: 0 = temperature, 1 = raw |
| [4-6]: | threshold type: |
| 000 - alarm when reading > value1 | |
| 001 - alarm when reading > value1, reset when reading < value2 | |
| 010 - alarm when reading < value1 | |
| 011 - alarm when reading < value1, reset when reading > value2 | |
| 100 - alarm when reading < value1 or > value2 | |
| 101 - not used | |
| 110 - not used | |
| 111 - not used | |
| 7: | not used, must be 0 |
Output options:
| Bit | Description |
|---|---|
| 0: | 1 = enable alarm, 0 = disable alarm |
| 1: | 0 = active low alarm, 1 = active high alarm |
| [2-7]: | not used |
alarm - The number (0 - 7) of the alarm to configure.iOptns - Input options.oOptns - Output options.value1 - The first alarm condition value.value2 - The second alarm condition value.org.lsst.ccs.drivers.commons.DriverExceptionUnsupportedOperationExceptionpublic void getAlarmConfig(int alarm,
int[] optns,
float[] values)
throws org.lsst.ccs.drivers.commons.DriverException
alarm - The number (0 - 7) of the alarm.optns - A two-element array to receive the alarm's input [0]
and output [1] options.values - A two-element array to receive the alarm's value1 [0]
and value2 [1] condition values.org.lsst.ccs.drivers.commons.DriverExceptionUnsupportedOperationExceptionpublic void calSteps(int[] steps)
throws org.lsst.ccs.drivers.commons.DriverException
steps - A two-element array to receive the number of steps
used in temperature [0] and voltage [1] calibrations.org.lsst.ccs.drivers.commons.DriverExceptionUnsupportedOperationExceptionpublic void calConfig(int gain,
int polarity,
int path)
throws org.lsst.ccs.drivers.commons.DriverException
This configures the calibration mux for voltage channels 4-7. To use the calibration input, the channel must be configured for calibration using setItem().
gain - The gain selector.polarity - The polarity: 0 = positive, 1 = negative.path - The channel path: 0 = channel high, 1 = channel loworg.lsst.ccs.drivers.commons.DriverExceptionUnsupportedOperationExceptionpublic void calibrate(int type)
throws org.lsst.ccs.drivers.commons.DriverException
This is used after reconfiguring the channel(s). This may take up to several seconds, and the completion may be determined by polling the status with getStatus(). Temperature readings will not be updated while the calibration is ongoing, but DIO operations may be performed. The device will not accept setItem() or memWrite() commands while calibration is being performed. Additionally, any calibrate() commands with type argument other than 255 (calibrate abort) will be ignored. After a calibration is aborted, getStatus() will indicate a calibration error until a new calibration is started. Once voltage calibration has been completed successfully, the calibration path location in the isolated microcontroller's EEPROM will be updatated to indicate which path was used for the most recent calibration.
type - The type of calibration to perform: 0 = temperature,
1 = voltage, 255 = abort.org.lsst.ccs.drivers.commons.DriverExceptionUnsupportedOperationExceptionpublic int getStatus()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionUnsupportedOperationExceptionpublic int getBurnout(int mask)
throws org.lsst.ccs.drivers.commons.DriverException
This routine returns the status of burnout detection for thermocouple channels. The return value is a bitmap indicating the burnout detection status for all 8 channels. Individual bits will be set if an open circuit has been detected on that channel. The bits will be cleared after the call using the mask parameter. If a bit is set, the corresponding bit in the status will be left at its current value.
mask - The mask of status bits to clear (0 = clear).org.lsst.ccs.drivers.commons.DriverExceptionUnsupportedOperationExceptionpublic int readMemory(int addr,
int type,
int count,
byte[] data)
throws org.lsst.ccs.drivers.commons.DriverException
addr - The memory address.type - The memory type: 0 = main microcontroller,
1 = isolated microcontroller.count - The number of bytes to read (62 max for main, 60 max
for isolated).data - An array of sufficient size to contain the read data.org.lsst.ccs.drivers.commons.DriverExceptionUnsupportedOperationExceptionpublic int writeMemory(int addr,
int type,
int count,
byte[] data)
throws org.lsst.ccs.drivers.commons.DriverException
Locations 0 - 255 are available on the main microcontroller.
addr - The memory address.type - The memory type: 0 = main microcontroller,
1 = isolated microcontroller.count - The number of bytes to write (59 max).data - The data to write.org.lsst.ccs.drivers.commons.DriverExceptionUnsupportedOperationExceptionpublic void writeSerial(String serial) throws org.lsst.ccs.drivers.commons.DriverException
Note: The new serial number will be programmed but not used until hardware reset.
serial - The serial number to write. At most 8 bytes are
written, and shorter strings are padded with blanks.org.lsst.ccs.drivers.commons.DriverExceptionUnsupportedOperationExceptionpublic void prepareDownload(int code,
int micro)
throws org.lsst.ccs.drivers.commons.DriverException
This routine puts the device into code update mode. The unlock code must be correct as a further safety device. Call this once before sending code with writeCode(). If not in code update mode, any call to writeCode() will be ignored. A reset() call must be issued after the code download in order to return the device to operation with the new code.
code - The unlock code (must be 0xad).micro - The microcontroller to load (0 = main, 1 = isolated).org.lsst.ccs.drivers.commons.DriverExceptionUnsupportedOperationExceptionpublic void writeCode(int addr,
int count,
byte[] data)
throws org.lsst.ccs.drivers.commons.DriverException
This routine writes to the program memory in the device, and is not accepted unless the device is in update mode. It will normally be used when downloading a new hex file, so it supports memory ranges that may be found in the hex file. The microcontroller that is being written to is selected with the prepareDownload() routine.
The address ranges are:
0x000000 - 0x0075FF: Microcontroller FLASH program memory
0x200000 - 0x200007: ID memory (serial number is stored here on
main micro)
0x300000 - 0x30000F: CONFIG memory (processor configuration data)
0xF00000 - 0xF03FFF: EEPROM memory
FLASH program memory: The device must receive data in 64-byte segments that begin on a 64-byte boundary. The data is sent in messages containing 32 bytes. count must always equal 32.
Other memory: Any number of bytes up to the maximum (32) may be sent.
addr - The start address to be written to.count - The number of bytes to write.data - The data to be written.org.lsst.ccs.drivers.commons.DriverExceptionUnsupportedOperationExceptionpublic int readCode(int addr,
int count,
byte[] data)
throws org.lsst.ccs.drivers.commons.DriverException
addr - The start address to be read from.count - The number of bytes to read.data - An array large enough to hold the read data.org.lsst.ccs.drivers.commons.DriverExceptionUnsupportedOperationExceptionCopyright © 2014 LSST. All rights reserved.