MityDSP Documentation Index

MityDSP::tcDspDac8534 Class Reference

Instances of this class handle access to a TI DAC8534 digital-to-analog converter via the generic SPI interface for the MityDSP. More...

#include <core/DspDac8534.h>

List of all members.

Public Types

enum  teLoadCommand { eeLoadNone = 0, eeLoadSingle = 1, eeLoadAll = 2, eeBroadcast = 3 }
 

The teLoadCommand enumeration defines various options for loading one or more 8534 devices on the SPI bus.

More...

Public Member Functions

 tcDspDac8534 (tcDspSpi *apSpi, unsigned int anSpiAddr, tcDspOutputLatch *apLatch=NULL, unsigned int anLatchID=0)
 This constructor is used to open an interface to a DAC8534 via the provided SPI interface.
 ~tcDspDac8534 ()
 Default destructor.
bool update (unsigned int anChannel, unsigned short anData, teLoadCommand aeLoad=eeLoadSingle)
 Updates the specified DAC channel with the provided 16-bit data.

Static Public Attributes

static const int gnDAC_CHANNEL_A = 0
 Constants for each of the 4 available channels on this device.
static const int gnDAC_CHANNEL_B = 1
static const int gnDAC_CHANNEL_C = 2
static const int gnDAC_CHANNEL_D = 3
static const int gnNUM_CHANNELS = 4

Protected Attributes

tcDspSpimpSpi
 Access to the SPI bus.
unsigned int mnSpiAddr
 Device address on SPI bus.
tcDspOutputLatchmpLatch
 Access to latch selector.
unsigned int mnLatchID
 ID of latch to use (if any).
unsigned short mnLastData [gnNUM_CHANNELS]
 Last data written to DAC.

Detailed Description

Instances of this class handle access to a TI DAC8534 digital-to-analog converter via the generic SPI interface for the MityDSP.

See also:
tcDspDac8534 Page

Member Enumeration Documentation

The teLoadCommand enumeration defines various options for loading one or more 8534 devices on the SPI bus.

Enumerator:
eeLoadNone 

don't load value into DAC

eeLoadSingle 

load value into current channel

eeLoadAll 

load all channels with their current data

eeBroadcast 

broadcast to all DAC's on this SPI


Constructor & Destructor Documentation

tcDspDac8534::tcDspDac8534 ( tcDspSpi apSpi,
unsigned int  anSpiAddr,
tcDspOutputLatch apLatch = NULL,
unsigned int  anLatchID = 0 
)

This constructor is used to open an interface to a DAC8534 via the provided SPI interface.

Parameters:
[in] apSpi Pointer to the SPI interface for the DAC8534.
[in] anSpiAddr Address of device on the SPI (0-3).
[in] apLatch Point to an output latch (default:NULL)
[in] anLatchID ID of the latch to use for this device, if any
Returns:
None.
See also:
DspDac8534.h
tcDspDac8534::~tcDspDac8534 (  ) 

Default destructor.

Returns:
None.
See also:
DspDac8534.h

Member Function Documentation

bool tcDspDac8534::update ( unsigned int  anChannel,
unsigned short  anData,
teLoadCommand  aeLoad = eeLoadSingle 
)

Updates the specified DAC channel with the provided 16-bit data.

By default, the data is loaded to the DAC output immediately. However, the data can also be written and not loaded, or the data can be written and all DAC channels loaded (this supports simultaneously changing the values on all 4 channels).

Parameters:
[in] anChannel DAC channel to write (0-3).
[in] anData 16-bit data to load to specified DAC channel.
[in] aeLoad Specifies if and when data is loaded (eeLoadNone, eeLoadSingle, eeLoadAll).
Returns:
true if successful
See also:
DspDac8534.h

Member Data Documentation

Constants for each of the 4 available channels on this device.

const int MityDSP::tcDspDac8534::gnNUM_CHANNELS = 4 [static]

Access to the SPI bus.

unsigned int MityDSP::tcDspDac8534::mnSpiAddr [protected]

Device address on SPI bus.

Access to latch selector.

unsigned int MityDSP::tcDspDac8534::mnLatchID [protected]

ID of latch to use (if any).

Last data written to DAC.


  
Generated on Fri Sep 23 16:33:48 2011 for MityDSP Core by  Doxygen Version 1.6.1
Copyright © 2009, Critical Link LLC, All rights reserved.