<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>LeafLabs Garden &#187; Topic: AD9835 lib port help</title>
		<link>http://forums.leaflabs.com/topic.php?id=996</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:17:26 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://forums.leaflabs.com/search.php</link>
		</textInput>
		<atom:link href="http://forums.leaflabs.com/rss.php?topic=996" rel="self" type="application/rss+xml" />

		<item>
			<title>house91320 on "AD9835 lib port help"</title>
			<link>http://forums.leaflabs.com/topic.php?id=996#post-6059</link>
			<pubDate>Tue, 23 Aug 2011 13:37:51 +0000</pubDate>
			<dc:creator>house91320</dc:creator>
			<guid isPermaLink="false">6059@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;thanks sorry about the long post here is the link &#60;a href=&#34;https://github.com/LachlanGunn/Synthesis&#34; rel=&#34;nofollow&#34;&#62;https://github.com/LachlanGunn/Synthesis&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>robodude666 on "AD9835 lib port help"</title>
			<link>http://forums.leaflabs.com/topic.php?id=996#post-6057</link>
			<pubDate>Tue, 23 Aug 2011 13:19:20 +0000</pubDate>
			<dc:creator>robodude666</dc:creator>
			<guid isPermaLink="false">6057@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Please refer to the &#60;a href=&#34;http://forums.leaflabs.com/topic.php?id=994&#34;&#62;Guidelines for Posting&#60;/a&#62;. When posting large amounts of code, upload it to a code sharing service like &#60;a href=&#34;https://gist.github.com/&#34;&#62;gist&#60;/a&#62;, or better yet for libraries just link to the library in question. It's incredibly annoying to have to scroll through a wall of unformatted code.&#60;/p&#62;
&#60;p&#62;If you are using it without hardware SPI, the library should work as-is more or less. You'll simply have to adjust the included headers to include wirish instead of WProgram, and remove the SPI include as well as remove all hardware spi related code.&#60;/p&#62;
&#60;p&#62;If you want to use hardware SPI, you'll need to include HardwareSPI.h, define a HardwareSPI instance (you can call it SPI to reduce the amount of edits required). I'd personally modify the library to accept a reference to a HardwareSPI class and store a pointer to it.&#60;/p&#62;
&#60;p&#62;-robodude666
&#60;/p&#62;</description>
		</item>
		<item>
			<title>house91320 on "AD9835 lib port help"</title>
			<link>http://forums.leaflabs.com/topic.php?id=996#post-6055</link>
			<pubDate>Tue, 23 Aug 2011 13:01:29 +0000</pubDate>
			<dc:creator>house91320</dc:creator>
			<guid isPermaLink="false">6055@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;so i am working on a project that needs a function gen and i fount the perfect chip with an added bonus of a arduino library. I just need some help porting it to the maple.&#60;br /&#62;
cpp file&#60;/p&#62;
&#60;p&#62;/*!&#60;br /&#62;
 * \mainpage Frequency Synthesis Library for Arduino&#60;br /&#62;
 * \author   Lachlan Gunn&#60;br /&#62;
 *&#60;br /&#62;
 * \section Introduction&#60;br /&#62;
 * The Synthesis library is intended initially to provide an&#60;br /&#62;
 * interface to the %AD9835 Direct Digital Synthesis (DDS) IC,&#60;br /&#62;
 * with an eye towards eventually incorporating other methods&#60;br /&#62;
 * of synthesis.  This could mean interfaces to the rest of the&#60;br /&#62;
 * Analog Devices DDS family, or perhaps even to SCPI-enabled&#60;br /&#62;
 * signal generators.&#60;br /&#62;
 *&#60;br /&#62;
 * \section Hardware&#60;br /&#62;
 *&#60;br /&#62;
 * One will first require an %AD9835 IC.  This is available from&#60;br /&#62;
 * Digikey and Farnell slightly below the US/AU$15 mark, however&#60;br /&#62;
 * this is a needlessly difficult route if one is merely experimenting.&#60;br /&#62;
 * An alternative (taken by the author) is the breakout board sold by&#60;br /&#62;
 * Sparkfun:&#60;br /&#62;
 *&#60;br /&#62;
 *   - Sparkfun BOB-09169, US$32.57&#60;br /&#62;
 *                         AU$34.95 (from Little Bird Electronics)&#60;br /&#62;
 *&#60;br /&#62;
 * This is the easiest option for experimentation, as one need&#60;br /&#62;
 * not provide their own oscillator or power supplies, nor&#60;br /&#62;
 * solder the TSSOP package of the AD9835.  Note that this board requires&#60;br /&#62;
 * a 6--9V supply.&#60;br /&#62;
 *&#60;br /&#62;
 * Having acquired this device, one must connect it to their Arduino&#60;br /&#62;
 * board.  In order to use the samples provided, one must connect:&#60;br /&#62;
 *&#60;br /&#62;
 *    - FSYNC -&#38;gt; Digital 8&#60;br /&#62;
 *    - FSEL  -&#38;gt; Digital 7&#60;br /&#62;
 *    - PSEL1 -&#38;gt; Digital 6&#60;br /&#62;
 *    - PSEL0 -&#38;gt; Digital 5&#60;br /&#62;
 *    - SCLK  -&#38;gt; Digital 4&#60;br /&#62;
 *    - SDATA -&#38;gt; Digital 3&#60;br /&#62;
 *&#60;br /&#62;
 * This particular arrangement allows the board to be connected directly with&#60;br /&#62;
 * the aid of 0.1&#34; header.&#60;br /&#62;
 *&#60;br /&#62;
 * Having connected the hardware, one would do well to examine the examples&#60;br /&#62;
 * provided.&#60;br /&#62;
 */&#60;/p&#62;
&#60;p&#62;#include &#34;WProgram.h&#34;&#60;br /&#62;
#include &#34;AD9835.h&#34;&#60;br /&#62;
#include &#34;SPI.h&#34;&#60;/p&#62;
&#60;p&#62;#define HARDWARE_SPI 0&#60;/p&#62;
&#60;p&#62;/**&#60;br /&#62;
 * Constructor for the AD9835 class.&#60;br /&#62;
 *&#60;br /&#62;
 * This constructor records the pin assignments used in preparation for their&#60;br /&#62;
 * setup in begin().&#60;br /&#62;
 *&#60;br /&#62;
 * \param pinFSYNC The IO pin connected to the FSYNC pin of the AD9835.&#60;br /&#62;
 * \param pinSCLK  The IO pin connected to the SPI clock of the AD9835.&#60;br /&#62;
 * \param pinSDATA The IO pin connected to the SPI data pin of the AD9835.&#60;br /&#62;
 *&#60;br /&#62;
 * \param pinFSEL  The IO pin connected to the frequency select pin&#60;br /&#62;
 *                 of the AD9835.&#60;br /&#62;
 *&#60;br /&#62;
 * \param pinPSEL1 The IO pin connected to phase select pin one of the AD9835.&#60;br /&#62;
 * \param pinPSEL0 The IO pin connected to phase select pin zero of the AD9835.&#60;br /&#62;
 *&#60;br /&#62;
 * \param hzMasterClockFrequency The frequency of the&#60;br /&#62;
 *                               AD9835 master clock in Hz.&#60;br /&#62;
 *&#60;br /&#62;
 * \see AD9835::begin&#60;br /&#62;
 */&#60;br /&#62;
AD9835::AD9835(const int pinFSYNC, const int pinSCLK, const int pinSDATA,&#60;br /&#62;
    const int pinFSEL, const int pinPSEL1, const int pinPSEL0,&#60;br /&#62;
    const unsigned long hzMasterClockFrequency)&#60;br /&#62;
{&#60;br /&#62;
    // First we initialise our class.&#60;br /&#62;
    this-&#38;gt;pinSCLK  = pinSCLK;&#60;br /&#62;
    this-&#38;gt;pinSDATA = pinSDATA;&#60;br /&#62;
    this-&#38;gt;pinFSYNC = pinFSYNC;&#60;br /&#62;
    this-&#38;gt;pinFSEL  = pinFSEL;&#60;br /&#62;
    this-&#38;gt;pinPSEL1 = pinPSEL1;&#60;br /&#62;
    this-&#38;gt;pinPSEL0 = pinPSEL0;&#60;/p&#62;
&#60;p&#62;    this-&#38;gt;hzMasterClockFrequency = hzMasterClockFrequency;&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;/**&#60;br /&#62;
 * Initialise the AD9835.&#60;br /&#62;
 *&#60;br /&#62;
 * The AD9835::begin method sets pin modes and clears the state of the AD9835.&#60;br /&#62;
 */&#60;br /&#62;
void AD9835::begin()&#60;br /&#62;
{&#60;/p&#62;
&#60;p&#62;  // We then set up our outputs.  In this case, the device is of type (0,1) with FSYNC idle-high,&#60;br /&#62;
    // so FSYNC must start high and SCLK low.&#60;br /&#62;
    digitalWrite(pinFSYNC, HIGH);&#60;br /&#62;
    digitalWrite(pinFSEL,  LOW);&#60;br /&#62;
    digitalWrite(pinPSEL0, LOW);&#60;br /&#62;
    digitalWrite(pinPSEL1, LOW);&#60;/p&#62;
&#60;p&#62;    // We also set everything as an output pin.&#60;br /&#62;
    if (!HARDWARE_SPI)&#60;br /&#62;
    {&#60;br /&#62;
      pinMode(pinSCLK,  OUTPUT);&#60;br /&#62;
      pinMode(pinSDATA, OUTPUT);&#60;br /&#62;
    }&#60;br /&#62;
    pinMode(pinFSYNC, OUTPUT);&#60;br /&#62;
    pinMode(pinFSEL,  OUTPUT);&#60;br /&#62;
    pinMode(pinPSEL0, OUTPUT);&#60;br /&#62;
    pinMode(pinPSEL1, OUTPUT);&#60;/p&#62;
&#60;p&#62;    if (HARDWARE_SPI)&#60;br /&#62;
    {&#60;br /&#62;
        // We then set our SPI settings (&#60;br /&#62;
        SPI.setDataMode(SPI_MODE1);&#60;br /&#62;
        SPI.setBitOrder(MSBFIRST);&#60;br /&#62;
        SPI.setClockDivider(SPI_CLOCK_DIV2);&#60;br /&#62;
        SPI.begin();&#60;br /&#62;
    }&#60;/p&#62;
&#60;p&#62;    // Sleep, reset, clear.&#60;br /&#62;
    //  Sleep - device powers down.&#60;br /&#62;
    //  Reset - phase accumulator is set to 0.&#60;br /&#62;
    //  Clear - SYNC and SELSRC registers are set to zero.&#60;br /&#62;
    writeSPI(0xF8, 0x00);&#60;br /&#62;
    delay(1);&#60;/p&#62;
&#60;p&#62;    // Device configuration.&#60;br /&#62;
    //   SYNC   - FSEL, PSELx are sampled asynchronously.&#60;br /&#62;
    //   SELSRC - FSEL, PSELx are read from the FSEL, PSELx pins.&#60;br /&#62;
    writeSPI(0x80, 0x00);&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;/**&#60;br /&#62;
 * Disables the AD9835.&#60;br /&#62;
 */&#60;br /&#62;
void AD9835::end()&#60;br /&#62;
{&#60;br /&#62;
  disable();&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;/**&#60;br /&#62;
 * Enables the output of the AD9835.&#60;br /&#62;
 */&#60;br /&#62;
void AD9835::enable()&#60;br /&#62;
{&#60;br /&#62;
  writeSPI(0xC0, 0x00);&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;/**&#60;br /&#62;
 * Disables the output of the AD9835.&#60;br /&#62;
 */&#60;br /&#62;
void AD9835::disable()&#60;br /&#62;
{&#60;br /&#62;
    // Set the device to sleep.&#60;br /&#62;
    writeSPI(0xE0, 0x00);&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;/**&#60;br /&#62;
 * Sets a frequency register of the AD9835 to some frequency code.&#60;br /&#62;
 *&#60;br /&#62;
 * \param frequencyRegister The register to be set (can be zero or one).&#60;br /&#62;
 * \param fcodeFrequency    The frequency code to be placed in the register.&#60;br /&#62;
 */&#60;br /&#62;
void AD9835::setFrequencyCode(byte      frequencyRegister,&#60;br /&#62;
			      unsigned long fcodeFrequency)&#60;br /&#62;
{&#60;br /&#62;
    word overlayRegister = (frequencyRegister &#38;amp; 0x01) &#38;lt;&#38;lt; 2;&#60;/p&#62;
&#60;p&#62;    writeSPI(0x33 &#124; overlayRegister, (fcodeFrequency &#38;amp; 0xFF000000) &#38;gt;&#38;gt; 24);&#60;br /&#62;
    writeSPI(0x22 &#124; overlayRegister, (fcodeFrequency &#38;amp; 0x00FF0000) &#38;gt;&#38;gt; 16);&#60;br /&#62;
    writeSPI(0x31 &#124; overlayRegister, (fcodeFrequency &#38;amp; 0x0000FF00) &#38;gt;&#38;gt;  8);&#60;br /&#62;
    writeSPI(0x20 &#124; overlayRegister, (fcodeFrequency &#38;amp; 0x000000FF)      );&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;/**&#60;br /&#62;
 * Wrapper for setFrequencyCode.&#60;br /&#62;
 *&#60;br /&#62;
 * The setFrequencyHz calculates the frequency code corresponding to the&#60;br /&#62;
 * frequency given (in Hertz) before calling setFrequencyCode.&#60;br /&#62;
 *&#60;br /&#62;
 * Calculating the code is relatively slow, and so it is better to call&#60;br /&#62;
 * calculateFrequencyCodeHz directly and cache the result where possible.&#60;br /&#62;
 *&#60;br /&#62;
 * \param frequencyRegister The register to be set (can be zero or one).&#60;br /&#62;
 *&#60;br /&#62;
 * \param HzFrequency The frequency (in Hertz) to be placed in the register.&#60;br /&#62;
 *&#60;br /&#62;
 * \see setFrequencyCode&#60;br /&#62;
 * \see calculateFrequencyCodeHz&#60;br /&#62;
 */&#60;br /&#62;
void AD9835::setFrequencyHz(byte frequencyRegister, unsigned long hzFrequency)&#60;br /&#62;
{&#60;br /&#62;
    setFrequencyCode(frequencyRegister, calculateFrequencyCodeHz(hzFrequency));&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;/**&#60;br /&#62;
 * Select the frequency register to be used.&#60;br /&#62;
 *&#60;br /&#62;
 * The selectFrequencyRegister sets the FSEL pin to the desired value,&#60;br /&#62;
 * thereby setting the output frequency to that set via setFrequencyCode.&#60;br /&#62;
 *&#60;br /&#62;
 * \see setFrequencyCode&#60;br /&#62;
 */&#60;br /&#62;
void AD9835::selectFrequencyRegister(byte frequencyRegister)&#60;br /&#62;
{&#60;br /&#62;
    digitalWrite(pinFSEL, frequencyRegister &#38;amp; 0x01);&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;/**&#60;br /&#62;
 * Sets a phase register of the AD9835 to some phase code.&#60;br /&#62;
 *&#60;br /&#62;
 * \param phaseRegister  The register to be set (can be 0,1,2,3).&#60;br /&#62;
 * \param pcodePhase     The phase code to be placed in the register.&#60;br /&#62;
 */&#60;br /&#62;
void AD9835::setPhaseCode(byte phaseRegister, unsigned long pcodePhase)&#60;br /&#62;
{&#60;br /&#62;
    word overlayRegister = (phaseRegister &#38;amp; 0x03) &#38;lt;&#38;lt; 1;&#60;/p&#62;
&#60;p&#62;    writeSPI(0x19 &#124; overlayRegister, (pcodePhase &#38;amp; 0x0F00) &#38;gt;&#38;gt; 8);&#60;br /&#62;
    writeSPI(0x08 &#124; overlayRegister, (pcodePhase &#38;amp; 0x00FF)     );&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;/**&#60;br /&#62;
 * Wrapper for setPhaseCode.&#60;br /&#62;
 *&#60;br /&#62;
 * setPhaseDeg sets a phase register of the AD9835 to an angle given in degrees.&#60;br /&#62;
 * This is slower than setPhaseCode, so using calculatePhaseCodeDeg directly and&#60;br /&#62;
 * caching the result is desirable.&#60;br /&#62;
 *&#60;br /&#62;
 * \param phaseRegister  The register to be set (can be 0,1,2,3).&#60;br /&#62;
 * \param pcodePhase     The phase (in degrees) to be placed in the register.&#60;br /&#62;
 *&#60;br /&#62;
 * \see setPhaseCode&#60;br /&#62;
 * \see setPhaseDeg&#60;br /&#62;
 */&#60;br /&#62;
void AD9835::setPhaseDeg(byte phaseRegister, int degPhase)&#60;br /&#62;
{&#60;br /&#62;
    setPhaseCode(phaseRegister, calculatePhaseCodeDeg(degPhase));&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;/**&#60;br /&#62;
 * Select the phase register to be activated.&#60;br /&#62;
 *&#60;br /&#62;
 * The selectPhaseRegister drives the PSEL0 and PSEL1 pins of the AD9835,&#60;br /&#62;
 * thereby setting the output phase to that set via setPhaseCode.&#60;br /&#62;
 *&#60;br /&#62;
 * \see setPhaseCode&#60;br /&#62;
 */&#60;br /&#62;
void AD9835::selectPhaseRegister(byte phaseRegister)&#60;br /&#62;
{&#60;br /&#62;
    digitalWrite(pinPSEL0, phaseRegister &#38;amp; 0x01);&#60;br /&#62;
    digitalWrite(pinPSEL1, phaseRegister &#38;amp; 0x02);&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;/**&#60;br /&#62;
 * Converts a frequency in Hertz to a frequency code.&#60;br /&#62;
 *&#60;br /&#62;
 * \param hzFrequency  The frequency to be converted.&#60;br /&#62;
 *&#60;br /&#62;
 * \return The frequency code of the desired frequency.&#60;br /&#62;
 *&#60;br /&#62;
 * \todo There is an off-by-one error here as we have rounded&#60;br /&#62;
 *       the frequency code down, rather than selecting the nearest.&#60;br /&#62;
*/&#60;br /&#62;
unsigned long AD9835::calculateFrequencyCodeHz(unsigned long hzFrequency)&#60;br /&#62;
{&#60;br /&#62;
    unsigned long fcodeFrequency = 0;&#60;br /&#62;
    const int bitsChunk = 4;&#60;/p&#62;
&#60;p&#62;    for (int i = 0; i &#38;lt;= 32/bitsChunk; i++) {&#60;br /&#62;
      fcodeFrequency &#38;lt;&#38;lt;= bitsChunk;&#60;br /&#62;
      fcodeFrequency  &#124;= hzFrequency / hzMasterClockFrequency;&#60;br /&#62;
      hzFrequency      = hzFrequency % hzMasterClockFrequency;&#60;br /&#62;
      hzFrequency    &#38;lt;&#38;lt;= bitsChunk;&#60;br /&#62;
    }&#60;/p&#62;
&#60;p&#62;    return fcodeFrequency;&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;/**&#60;br /&#62;
 * Converts a phase in degrees to a phase code.&#60;br /&#62;
 *&#60;br /&#62;
 * \param degPhase  The phase to be converted.&#60;br /&#62;
 *&#60;br /&#62;
 * \return The phase code of the desired phase.&#60;br /&#62;
 *&#60;br /&#62;
 * \todo There is an off-by-one error here as we have rounded&#60;br /&#62;
 *       the frequency code down, rather than selecting the nearest.&#60;br /&#62;
 */&#60;br /&#62;
unsigned long AD9835::calculatePhaseCodeDeg(unsigned long degPhase)&#60;br /&#62;
{&#60;br /&#62;
    unsigned long pcodePhase = 0;&#60;br /&#62;
    const int bitsChunk = 4;&#60;/p&#62;
&#60;p&#62;    for (int i = 0; i &#38;lt;= 12/bitsChunk; i++) {&#60;br /&#62;
        unsigned long divisor     = degPhase / 360;&#60;br /&#62;
        unsigned long hzRemainder = degPhase % 360;&#60;/p&#62;
&#60;p&#62;        pcodePhase &#38;lt;&#38;lt;= bitsChunk;&#60;br /&#62;
        pcodePhase  &#124;= divisor;&#60;br /&#62;
        degPhase     = hzRemainder;&#60;br /&#62;
        degPhase   &#38;lt;&#38;lt;= bitsChunk;&#60;br /&#62;
    }&#60;/p&#62;
&#60;p&#62;    return pcodePhase;&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;void AD9835::writeSPI(byte msb, byte lsb)&#60;br /&#62;
{&#60;br /&#62;
    digitalWrite(pinSCLK, LOW);&#60;br /&#62;
    // Deassert FSYNC to select the chip.&#60;br /&#62;
    digitalWrite(pinFSYNC, LOW);&#60;/p&#62;
&#60;p&#62;    if (HARDWARE_SPI)&#60;br /&#62;
    {&#60;br /&#62;
      SPI.transfer(msb);&#60;br /&#62;
      SPI.transfer(lsb);&#60;br /&#62;
    }&#60;br /&#62;
    else&#60;br /&#62;
    {&#60;br /&#62;
      shiftOut(pinSDATA, pinSCLK, MSBFIRST, msb);&#60;br /&#62;
      shiftOut(pinSDATA, pinSCLK, MSBFIRST, lsb);&#60;br /&#62;
    }&#60;/p&#62;
&#60;p&#62;    // Reassert FSYNC now that the transfer is complete.&#60;br /&#62;
    digitalWrite(pinFSYNC, HIGH);&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;h file -----------------------------------------------------&#60;/p&#62;
&#60;p&#62;#ifndef __AD9835_H&#60;br /&#62;
#define __AD9835_H&#60;/p&#62;
&#60;p&#62;#include &#34;WProgram.h&#34;&#60;/p&#62;
&#60;p&#62;/**&#60;br /&#62;
 * Interface class for the %AD9835.&#60;br /&#62;
 */&#60;br /&#62;
class AD9835&#60;br /&#62;
{&#60;br /&#62;
public:&#60;br /&#62;
    AD9835(const int pinFSYNC, const int pinSCLK, const int pinSDATA,&#60;br /&#62;
           const int pinFSEL, const int pinPSEL1, const int pinPSEL0,&#60;br /&#62;
           const unsigned long hzMasterClockFrequency);&#60;/p&#62;
&#60;p&#62;    void begin();&#60;br /&#62;
    void end();&#60;/p&#62;
&#60;p&#62;    void enable();&#60;br /&#62;
    void disable();&#60;/p&#62;
&#60;p&#62;    void setFrequencyCode(byte frequencyRegister,&#60;br /&#62;
                          unsigned long fcodeFrequency);&#60;br /&#62;
    void setFrequencyHz(byte frequencyRegister, unsigned long hzFrequency);&#60;br /&#62;
    void selectFrequencyRegister(byte frequencyRegister);&#60;br /&#62;
    unsigned long calculateFrequencyCodeHz(unsigned long hzFrequency);&#60;/p&#62;
&#60;p&#62;    void setPhaseCode(byte phaseRegister, unsigned long pcodePhase);&#60;br /&#62;
    void setPhaseDeg(byte phaseRegister, int degPhase);&#60;br /&#62;
    void selectPhaseRegister(byte phaseRegister);&#60;br /&#62;
    unsigned long calculatePhaseCodeDeg(unsigned long degPhase);&#60;/p&#62;
&#60;p&#62;private:&#60;br /&#62;
    void writeSPI(byte msb, byte lsb);&#60;/p&#62;
&#60;p&#62;private:&#60;br /&#62;
    int pinSCLK;&#60;br /&#62;
    int pinSDATA;&#60;br /&#62;
    int pinFSYNC;&#60;br /&#62;
    int pinFSEL;&#60;br /&#62;
    int pinPSEL1;&#60;br /&#62;
    int pinPSEL0;&#60;/p&#62;
&#60;p&#62;    unsigned long hzMasterClockFrequency;&#60;br /&#62;
};&#60;/p&#62;
&#60;p&#62;#endif
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
