Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some problem when reading the register #1

Open
chen1011 opened this issue Feb 23, 2016 · 0 comments
Open

some problem when reading the register #1

chen1011 opened this issue Feb 23, 2016 · 0 comments

Comments

@chen1011
Copy link

I'm a newbie in programming AD9954 with arduino
here is my code

include <SPI.h>

include <AD9954.h>

AD9954 DDS( 10, 6, 5, 8, 9, 7);

void setup(){
SPI.begin();
Serial.begin(9600);
SPI.setClockDivider(4);
SPI.setDataMode(SPI_MODE0);
delay(500); // let things get set up...
DDS.initialize(400000000);

}

void loop(){

DDS.setFreq(25000000);
digitalWrite(10,LOW);
SPI.transfer(0x80);
Serial.print(SPI.transfer(0x00));
digitalWrite(10,HIGH);
delay(1000);
}

but the only thing I can get from the serial monitor is 0

is there any problem with my code?
thank you : )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant