Changes between Version 28 and Version 29 of warpdac_ad9775.c
- Timestamp:
- Jan 26, 2006, 2:44:39 PM (18 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
warpdac_ad9775.c
v28 v29 13 13 For all functions the input variable ''baseaddr'' is the base address of the SPI Core. 14 14 15 '''[source:/PlatformSupport/WARP_Libraries/warpdac_ad9775.c@latest#L94 void transmitdac(unsigned int* baseaddr, int val)]'''16 [[BR]]Transmits a value to a register. ''val'' a 4 bit hex value where the 2 least significant bits are the value to be stored and the 2 most significant bits choose the register in which to store the value.17 18 15 '''[source:/PlatformSupport/WARP_Libraries/warpdac_ad9775.c@latest#L110 void WarpDac_InitializeSPI(unsigned int* baseaddr)]''' 19 [[BR]]Initializes the SPI controller for DAC functions. This function must be called before calling any other DAC functions. ''dacs'' is the 4 bit hex value where the 2 least significant bits are the value to be stored and the 2 most significant bits choose the register in which to store the value.16 [[BR]]Initializes the SPI controller for DAC functions. This function must be called before calling any other DAC functions. 20 17 21 18 '''[source:/PlatformSupport/WARP_Libraries/warpdac_ad9775.c@latest#L120 void WarpDac_InitializeDAC(unsigned int* baseaddr, unsigned char dacs)]''' 22 [[BR]]This function must be called at the beginning of the program to make necessary changes in some of the registers. Initializes the DACs specified in ''dacs'', the 4 bit hex value where the 2 least significant bits are the value to be stored and the 2 most significant bits choose the register in which to store the value.19 [[BR]]This function must be called at the beginning of the program to make necessary changes in some of the registers. Initializes the DACs specified in ''dacs'', the 8 bit value where the 4 least significant bits choose the DAC to initialize. 23 20 24 21 '''[source:/PlatformSupport/WARP_Libraries/warpdac_ad9775.c@latest#L144 void WarpDac_Reset(unsigned int* baseaddr, unsigned char dacs)]''' 25 [[BR]]Resets the DAC registers to their default values. Calls WarpDac_InitializeDAC, so there is no need to repeat it in the code. ''dacs'' is the 4 bit hex value where the 2 least significant bits are the value to be stored and the 2 most significant bits choose the register in which to store the value.22 [[BR]]Resets the DAC registers to their default values. Calls WarpDac_InitializeDAC, so there is no need to repeat it in the code. ''dacs'' is the 8 bit value where the 4 least significant bits choose the DAC to reset. 26 23 27 24 '''[source:/PlatformSupport/WARP_Libraries/warpdac_ad9775.c@latest#L158 int WarpDac_Sleep(unsigned int* baseaddr, char mode, unsigned char dacs)]''' 28 [[BR]]Will take the specified DACs either in (''mode=1'') or out (''mode=0'') of sleep mode. ''dacs'' is a 4 bit hex value where the third most significant bit specifies the register to be altered.25 [[BR]]Will take the specified DACs either in (''mode=1'') or out (''mode=0'') of sleep mode. ''dacs'' is the 8 bit value where the 4 least significant bits choose the DAC to alter. 29 26 30 27 '''[source:/PlatformSupport/WARP_Libraries/warpdac_ad9775.c@latest#L206 int WarpDac_FineGainAdj(unsigned int* baseaddr, char chan, unsigned char value, unsigned char dacs)]''' 31 [[BR]]''dacs'' is a 4 bit hex value where the third most significant bit specifies the register to be altered.28 [[BR]]''dacs'' is the 8 bit value where the 4 least significant bits choose the DAC to alter. 32 29 33 30 '''[source:/PlatformSupport/WARP_Libraries/warpdac_ad9775.c@latest#L256 int WarpDac_CoarseGainAdj(unsigned int* baseaddr, char chan, unsigned char value, unsigned char dacs)]''' 34 [[BR]]''dacs'' is a 4 bit hex value where the third most significant bit specifies the register to be altered.31 [[BR]]''dacs'' is the 8 bit value where the 4 least significant bits choose the DAC to alter. 35 32 36 33 '''[source:/PlatformSupport/WARP_Libraries/warpdac_ad9775.c@latest#L306 int WarpDac_OffsetAdj(unsigned int* baseaddr, char chan, short value, unsigned char dacs)]'''