Code Monkey home page Code Monkey logo

ad9850-library-arduino's Introduction

AD9850-Library-Arduino

Arduino library to control the AD9850 DDS module

-------------CODE IS IN WORK------------

From Analog Devices data sheet: (http://www.analog.com/media/en/technical-documentation/data-sheets/AD9850.pdf)

"The AD9850 is a highly integrated device that uses advanced DDS technology coupled with an internal high speed, high performance D/A converter and comparator to form a complete, digitally programmable frequency synthesizer and clock generator function. When referenced to an accurate clock source, the AD9850 generates a spectrally pure, frequency/phase programmable, analog output sine wave. This sine wave can be used directly as a frequency source, or it can be converted to a square wave for agile-clock generator applications."

"The AD9850’s innovative high speed DDS core provides a 32-bit frequency tuning word, which results in an output tuning resolution of 0.0291 Hz for a 125 MHz reference clock input. The AD9850’s circuit architecture allows the generation of output frequencies of up to one-half the reference clock frequency (or 62.5 MHz), and the output frequency can be digitally changed (asynchronously) at a rate of up to 23 million new frequencies per second. The device also provides five bits of digitally controlled phase modulation, which enables phase shifting of its output in increments of 180°, 90°, 45°, 22.5°, 11.25°, and any combination thereof. The AD9850 also contains a high speed comparator that can be configured to accept the (externally) filtered output of the DAC to generate a low jitter square wave output. This facilitates the device’s use as an agile clock generator function."

Synopsis

Sine Wave outputs at 20MHz alt tag

Square Wave outputs. Duty cycle adjusted to 50% alt tag

API

//The API is in work.

// Define AD9850 using Serial mode loading.
AD9850 ( uint8_t freqUpdate, uint8_t wordClk, uint8_t reset,
	uint8_t powerDownPin, uint8_t dataPin );

// Define AD9850 using predefined pins.
// Uses Direct Port writes for maximum speed.
// See AD9850.h files for pin definitions
AD9850 ( bool useSerialLoad, uint8_t reset );

// Define AD9850 using Parallel mode loading.
// This will require 8 separate digitalWrites for each pin.
AD9850 ( uint8_t freqUpdate, uint8_t wordClk, uint8_t reset,
	uint8_t data7, uint8_t data6, uint8_t data5, uint8_t data4,
	uint8_t data3, uint8_t data2, uint8_t data1, uint8_t data0 );

void ApplySignal ( float frequencyInHz, float phaseInDeg );

void SetFrequency ( float frequencyInHz );

void IncrementFrequency ( float frequencyInHz );

void SetPhase ( float phaseInDeg );

void IncrementPhase ( float phaseInDeg );

void Reset ( void );

void PowerDown ( bool enable );

float GetFreqResolution ( void ) { return RESOLUTION_HZ; }

float GetPhaseResolution ( void ) { return RESOLUTION_DEG; }

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

ad9850-library-arduino's People

Contributors

billwilliams1952 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ad9850-library-arduino's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.