GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > GNAT / dev

Constituent: gnat_xbrd     Tag: mv2304


Interface   Data Structures   File List   Data Fields   Globals  

xbrd_io.h File Reference

Defines the input/output methods for the VME XBRD interface. More...

#include "GNAT/xbrd_hw.h"

Include dependency graph for xbrd_io.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Functions

int xbrd_Probe (xbrdHandle gx)
 attempts simple test for board existance

int xbrd_HWver (xbrdHandle gx, unsigned short int *version, unsigned short int *revision)
 fetchs the hardware version and revision numbers from the board

int xbrd_SWver (xbrdHandle gx, unsigned short int *version, unsigned short int *revision)
 fetchs the software version and revision numbers from the board

int xbrd_Version (xbrdHandle gx, unsigned short hwVer, unsigned short hwRev, unsigned short swVer, unsigned short swRev)
 Checks the COMM Board hardware version/revision.

int xbrd_DACload (xbrdHandle gx, unsigned short nDAC, unsigned int val)
 Loads the specified DAC with val.

int xbrd_DACread (xbrdHandle gx, unsigned short nDAC, unsigned int *val)
 Reads the specified DAC.

int xbrd_ADCload (xbrdHandle gx, unsigned short nADC, unsigned int val)
 Loads the specified ADC with val.

int xbrd_ADCread (xbrdHandle gx, unsigned short nADC, unsigned int *val)
 Reads the specified ADC.


Detailed Description

Defines the input/output methods for the VME XBRD interface.

Author:
Curt Brune -- curt@slac.stanford.edu

Function Documentation

int xbrd_ADCload xbrdHandle  gx,
unsigned short  nADC,
unsigned int  val
 

Loads the specified ADC with val.

Parameters:
gx handle of device
nADC index of ADC to load
val 32-bit value to load into ADC
See also:
xbrd_ADCread()
Returns:
OK on success
Writing to the ADC starts the acquisition cycle. The value written is ignored.

int xbrd_ADCread xbrdHandle  gx,
unsigned short  nADC,
unsigned int *  val
 

Reads the specified ADC.

Parameters:
gx handle of device
nADC index of ADC to read
val pointer to storage for 32-bit ADC value.
See also:
xbrd_ADCload()
Returns:
OK on success
On read bit 13 indicates the acquisition cycle is complete and that the 12-bit value is valid. If this bit is not set then return XBRD_ERR_ADC_NOT_READY.

int xbrd_DACload xbrdHandle  gx,
unsigned short  nDAC,
unsigned int  val
 

Loads the specified DAC with val.

Parameters:
gx handle of device
nDAC index of DAC to load
val 32-bit value to load into DAC
See also:
xbrd_DACread()
Returns:
OK on success
This is a "raw" interface to the MAXIM MAX5121 part, which is a 12-bit DAC. See the spec sheet for more info.

http://www.maxim-ic.com/quick_view2.cfm/qv_pk/1987

To perform a normal "write value" operation use the following pattern:

1 1 1 1 1 1 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 =============================== 0 1 0 D D D D D D D D D D D D 0

0 - bit is not set 1 - bit is set D - data bit of 12-bit DAC value

int xbrd_DACread xbrdHandle  gx,
unsigned short  nDAC,
unsigned int *  val
 

Reads the specified DAC.

Parameters:
gx handle of device
nDAC index of DAC to read
val pointer to storage for 32-bit DAC value.
See also:
xbrd_DACload()
Returns:
OK on success
When writing the DAC register it takes some settling time before the physical DAC part has consumed the new value. When reading the DAC bit 16 indicates if the DAC has completely settled. If this bit is not set on read return XBRD_ERR_DAC_NOT_READY .

int xbrd_HWver xbrdHandle  gx,
unsigned short int *  version,
unsigned short int *  revision
 

fetchs the hardware version and revision numbers from the board

Parameters:
gx handle of device
version 3 LSB contain hardware version number
revision 3 LSB contain hardware revision number
Returns:
OK on success
See also:
xbrd_SWver()

int xbrd_Probe xbrdHandle  gx  ) 
 

attempts simple test for board existance

Parameters:
gx handle of device to probe
Returns:
OK if board probed.

int xbrd_SWver xbrdHandle  gx,
unsigned short int *  version,
unsigned short int *  revision
 

fetchs the software version and revision numbers from the board

Parameters:
gx handle of device
version 3 LSB contain software version number
revision 3 LSB contain software revision number
Returns:
OK on success
See also:
xbrd_HWver()

int xbrd_Version xbrdHandle  gx,
unsigned short  hwVer,
unsigned short  hwRev,
unsigned short  swVer,
unsigned short  swRev
 

Checks the COMM Board hardware version/revision.

Parameters:
gx handle of device
hwVer VME XBRD hardware version
hwRev VME XBRD hardware revision
swVer VME XBRD firmware version
swRev VME XBRD firmware revision
Returns:
OK on success

Here is the call graph for this function:


Generated on Fri Oct 22 04:29:05 2004 by doxygen 1.3.3