Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

AD9833BRMZ Help to generate Sine wave with SPI interface code

Status
Not open for further replies.

rineesh

Junior Member level 1
Joined
Dec 30, 2010
Messages
16
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,414
Dear all
Please help me to generate 300kHz sine from AD9833BRMZ.
Here I have configured as per datasheet & evaluation board.
But the output is not satisfying the design .I have probed the SPI lines the function code is below.

Fmclk=5Mhz, ExpectedFout=3Mhz.

SetPinValue(FSYNC,0); //Chip select=0
usTemp = usSPITranceiveData(SPICHN2,0x2100);// Controll reg
usTemp = usSPITranceiveData(SPICHN2,0x7525);// Freq Reg LSB
usTemp = usSPITranceiveData(SPICHN2,0x4002);// Freq Reg MSB
usTemp = usSPITranceiveData(SPICHN2,0xC000);// Phase Reg=0
usTemp = usSPITranceiveData(SPICHN2,0x2000);// Exit Reset
vDelay(1);//32Mhz processor clock// 7.2uS delay
vSetPinValue(FSYNC,1); //Chip select=1;

Also we have tried with refernce a code from net & modified as follows

vSetPinValue(FSYNC,0);
usTemp = usSPITranceiveData(SPICHN2,0x2108);
usTemp = usSPITranceiveData(SPICHN2,0x7333);
usTemp = usSPITranceiveData(SPICHN2,0x4CCC);
usTemp = usSPITranceiveData(SPICHN2,0xB333);
usTemp = usSPITranceiveData(SPICHN2,0x8CCC);
usTemp = usSPITranceiveData(SPICHN2,0xC000);
usTemp = usSPITranceiveData(SPICHN2,0xE000);
usTemp = usSPITranceiveData(SPICHN2,0x2008);
vDelay(1);
vSetPinValue(FSYNC,1);


What is the wrong thing in this code?????
 

Dear poorchava

We are using STM32F103VCT6
 

Do you have a digital osciloscope? I mean can you record the transmission and check for any fault conditions?
 

Re: poorchava digital osciloscope?

We have all ready checked by logic analyzer and confirmed that the signal status of chip select data & clock.Everything working fine
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top