MityDSP Documentation Index

tcDspDacAd420

Introduction

The tcDspDacAd420 class is used to provide access to an Analog Devices AD420 digital-to-current loop converter via the MityDSP generic SPI interface. An instance of the tcDspSpi class, and an optional output latch selector and ID are provided in the constructor.

The AD420 is a single-channel 16-bit device. Data written to the device is loaded immediately.

See also:
MityDSP::tcDspSpi Class Reference
MityDSP::tcDspDacAd420 Class Reference

Example

This is a simple example of tcDspDacAd420 creation and usage:

 {
     unsigned int      my_spi_base_addr = 0xB0000200;
     int               myLatchID = 9;
     tcDspOutputLatch  MyClass::myOutputLatch;
     tcDspSpi         *MyClass::mySpi;
     tcDspDacAd420    *MyClass::myDac;
 
     // create access to the SPI
     mySpi = new tcDspSpi((void *)my_spi_base_addr);

     // create access to DAC on SPI address 2
     myDac = new tcDspDacAd420(mySpi, myOutputLatch, myLatchID);

     // load DAC "data"
     for (i=0; i<100; i++) 
     {
         // write data to the device
         myDac->update((unsigned short)(600 * i));
         TSK_sleep(10);
     }

     :
 
 } 

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