AD5668 Digital to Analog Converter

Revision:
1:b54ba779d19a
Parent:
0:55d636c5638a
Child:
2:25d6955d0d38
--- a/ad5668.h	Wed Apr 05 22:15:15 2017 +0000
+++ b/ad5668.h	Thu Apr 06 12:25:45 2017 +0000
@@ -31,6 +31,8 @@
  *
  * http://www.analog.com/media/en/technical-documentation/data-sheets/AD5668.pdf
  *
+ * Tie LDAC and CLR pins to VDD if not being used.
+ *
  * Example:
  * @code
  * #include "mbed.h"
@@ -133,17 +135,8 @@
     /**
      * Set power mode for each channnel.
      *
-     * @param pwrMode - power mode of the device.
-     *                  Example: AD5668_PWRDN_NONE,
-     *                           AD5668_PWRDN_1K,
-     *                           AD5668_PWRDN_100K,
-     *                           AD5668_PWRDN_3STATE
-     *
-     * @param channel - The channel or channels that are being configured.
-     *                  Example:  AD5668_ADDR_DAC_A,
-     *                            AD5668_ADDR_DAC_B,
-     *                            ...
-     *                            AD5668_ADDR_DAC_ALL
+     * @param pwrMode power mode of the device.
+     * @param channel the channel or channels that are being configured.
      */
     void AD5668_PowerMode(unsigned char pwrMode, unsigned char channel);
 
@@ -157,48 +150,62 @@
     /**
      * Write a data word to a channel.
      *
-     * @param channel - The channel or channels that are being configured.
-     * @param data - The DAC data word.
+     * @param channel the channel or channels that are being configured.
+     * @param data the DAC data word.
      */
     void AD5668_WRITE_INPUT_N(uint8_t channel, uint16_t data);
 
     /**
      * Latch a data word to a channel.
      *
-     * @param channel - The channel or channels that are being configured.
-     * @param data - The DAC data word.
+     * @param channel the channel or channels that are being configured.
+     * @param data the DAC data word.
      */
     void AD5668_UPDATE_DAC_N(uint8_t channel, uint16_t data);
 
     /**
      * Write a data word to a channel and latch all channels.
      *
-     * @param channel - The channel or channels that are being configured.
-     * @param data - The DAC data word.
+     * @param channel the channel or channels that are being configured.
+     * @param data the DAC data word.
      */
     void AD5668_WRITE_INPUT_N_UPDATE_ALL(uint8_t channel, uint16_t data);
 
     /**
      * Write a data word to a channel and latch the same channel.
      *
-     * @param channel - The channel or channels that are being configured.
-     * @param data - The DAC data word.
+     * @param channel the channel or channels that are being configured.
+     * @param data the DAC data word.
      */
     void AD5668_WRITE_INPUT_N_UPDATE_N(uint8_t channel, uint16_t data);
 
+    /**
+     * Set the internal voltage reference on or off.
+     *
+     * @param val set internal voltage reference.
+     */
+    void AD5668_InternalReference(uint8_t val);
+
+    /**
+     * Set the internal voltage reference on or off.
+     *
+     * @param val clear mode of the device.
+     */
+    void AD5668_ClearCode(uint8_t val);
+
 private:
 
     /**
      * Writes a 32-bit data-word to the Input Register of the device.
      *
-     * @param registerValue - Value of the register.
+     * @param registerValue value of the register.
      */
     void AD5668_SetInputRegister(unsigned int registerValue);
 
     /**
      * Write array values to the SPI.
      *
-     * @param pointer to the array
+     * @param reg pointer to the array
      */
     void SPI_Write(unsigned char *reg);