SSブログ

Arduino で AD9850 を動かす (その2) [Arduino]

 Arduino で AD9850 を動かしてみました。

Arduino と AD9850 を接続します。
DSC04281.JPG
ブレッドボード用の配線材で直接つなげました。

スケッチを書き込んで出力を USB オシロスコープで確認します。
AD9850.jpg
そこそこの波形が出ています。

ついでに FFT して
AD9850_fft.jpg
確認して見ると
スプリアスフリーダイナミックレンジは平均 -53.47dbc でした。

スケッチはこちらにある物を修正して使いました。
http://rockingdlabs.dunmire.org/exercises-experiments/ad-9850-dds-synthesizer

/*
* Control the AD-9850 DDS daughter card by NJQRP
*/

/*
Name Description
VCC +5V
GND Ground
SINB Signal output
W_CLK Write Clock, used to signal that the data bit should be read.
FQ_UD Frequency Update, used to signal that the data has been written into
the AD9850 registers and that the frequency should be updated.
DATA Data bit, the actual serial data bit being written.
RESET Reset, used to reset the AD9850 to a default state.
*/

#include "EF_AD9850.h"

int LED = 13; //
int load = 8; // D_FQUP
int clock = 9; // D_CLK
int data = 10; // D_BitData
int dds_reset = 11; // D_REST
int delay_ms = 1000;

EF_AD9850 AD9850(clock, load, 11, data);

void setup() {
AD9850.init();
AD9850.wr_serial(0x00,7000900);
pinMode(LED, OUTPUT);
}

void loop() {
digitalWrite(LED, HIGH);
AD9850.wr_serial(0x00,7101000);
delay(delay_ms);
AD9850.wr_serial(0x00,7101000);
digitalWrite(LED, LOW);
delay(delay_ms);
}

nice!(2)  コメント(0)  トラックバック(0) 

nice! 2

コメント 0

コメントを書く

お名前:[必須]
URL:
コメント:
画像認証:
下の画像に表示されている文字を入力してください。

トラックバック 0