Yes.Have you worked with one of these chips in the past?
I've used 4 or 5 of these, not had that problem.
What has happened on a couple though was on power up I had to do a reset using the reset pin, otherwise nothing happened, they are sposed to reset themselves on power up, but for some reason these didnt or messed up again afterwards.
Yes.
I have a simple RF signal source which uses one, and I have an old radio transceiver or two which requires crystals for transmit and receive, I have used a 9850 as a replacement for multiple crystals. Works reasonably well but there can be problems with phase noise when the signal is multiplied up to VHF.
I use PICs to load the 40 databits into the 9850.
JimB
Hey MrAI, I have been wanting to use one of the devices for awhile as I thought it might make a good function Gen. Let us know how it goes, and give a review would be cool.
Hi Jim,
Would be interested to hear how your sequence goes too, if you can, thanks.
;*****************************************************************************
Initialise_DDS
bsf DDS_port, DDS_W_Clk
bcf DDS_port, DDS_W_Clk
bsf DDS_port, DDS_FQ_UD
bcf DDS_port, DDS_FQ_UD ;set the DDS into serial load mode
return
;*****************************************************************************
;******************************************************************************
;Update DDS
;Write 40 bits of serial data to the DDS chip
UpdateDDS
movf DDS_data+0, W
call send_a_byte
movf DDS_data+1, W
call send_a_byte
movf DDS_data+2, W
call send_a_byte
movf DDS_data+3, W
call send_a_byte
movf DDS_data+4, W
call send_a_byte
bsf DDS_port, DDS_FQ_UD ;pulse the FQ_UD line
bcf DDS_port, DDS_FQ_UD
return
send_a_byte ;the byte to send should be in the W reg already
movwf Scratch
movlw 8 ;set 8 data bits
movwf DDS_temp_1
tx_next
rrf Scratch, F
btfsc STATUS, C ;test the bit to send
bsf DDS_port, DDS_Data ;it is a 1
btfss STATUS, C ;test the bit to send
bcf DDS_port, DDS_Data ;it is a 0
bsf DDS_port, DDS_W_Clk ;pulse the W_Clk line
bcf DDS_port, DDS_W_Clk
decfsz DDS_temp_1, F ;if count is zero send a stop bit
goto tx_next ;send next bit
return
;*******************************************************************************
It gets a bit more complicated than that, when you look with a spectrum analyser you will see harmonics of the intended frequency, as you would expect.Oh yeah one small detail. If you get one make sure you get one with a 125MHz crystal. If you get something lower it will limit the top end frequency. The top end frequency is half of the crystal frequency, but from what i have read the closer you get near the top end the more harmonics show up. I dont know how bad it is because i cant test that high with my old scope.
2 bits are off limits (Internal test) per the datasheet. Is the Endianness (Big/Little Endian) right?
Here is my AD9850 initialisation routine, the appropriate bits are hard wired to 0v and +5v as discussed before.
Code:;***************************************************************************** Initialise_DDS bsf DDS_port, DDS_W_Clk bcf DDS_port, DDS_W_Clk bsf DDS_port, DDS_FQ_UD bcf DDS_port, DDS_FQ_UD ;set the DDS into serial load mode return ;*****************************************************************************
To set the output frequency of the AD9850, The 32 frequency setting bits are in registers DDS_data+0 through to DDS_data+3, DDS_data+4 is set to 0.
DDS_data+0 contains the least significant frequency bits and DDS_data+3 contains the most significant frequency bits.
Code:;****************************************************************************** ;Update DDS ;Write 40 bits of serial data to the DDS chip UpdateDDS movf DDS_data+0, W call send_a_byte movf DDS_data+1, W call send_a_byte movf DDS_data+2, W call send_a_byte movf DDS_data+3, W call send_a_byte movf DDS_data+4, W call send_a_byte bsf DDS_port, DDS_FQ_UD ;pulse the FQ_UD line bcf DDS_port, DDS_FQ_UD return send_a_byte ;the byte to send should be in the W reg already movwf Scratch movlw 8 ;set 8 data bits movwf DDS_temp_1 tx_next rrf Scratch, F btfsc STATUS, C ;test the bit to send bsf DDS_port, DDS_Data ;it is a 1 btfss STATUS, C ;test the bit to send bcf DDS_port, DDS_Data ;it is a 0 bsf DDS_port, DDS_W_Clk ;pulse the W_Clk line bcf DDS_port, DDS_W_Clk decfsz DDS_temp_1, F ;if count is zero send a stop bit goto tx_next ;send next bit return ;*******************************************************************************
It gets a bit more complicated than that, when you look with a spectrum analyser you will see harmonics of the intended frequency, as you would expect.
But the real pain comes from the aliases, byproducts of the sampling process which is used to generate the fundamental waveform. The aliases do some funny things, some of them go down in frequency as the fundamental goes up in frequency, if you go up far enough they will become the same frequency as the fundamental and then cross over each other.
Note that there are also AD9851 modules available, these are fitted with a 30MHz oscillator, but, the AD9851 has a clock multiplier built-in and when this is enabled, the effective clock frequency is 180MHz, allowing a higher output frequency to be used before the aliases come and get you!
JimB
yet there appears to be nothing sent out after the last bit. Are you sending something later or is this just a remnant from a different project? The data sheet does not mention anything about a stop bit.
Just one question though. In your code near the end where the counter reaches zero, you have a rem statement:
";if count is zero send a stop bit"
yet there appears to be nothing sent out after the last bit. Are you sending something later or is this just a remnant from a different project?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?