Variable Frequency Oscillator (VFO) Project Design

I have a project in mind and as a NETMF newbie I need some advice.

My project is to build initially a Gadgeteer (Spider) controlled Variable Frequency Oscillator (VFO).

At the core of the project is the AD9850 DDS chip from Analog Devices. There are breakout boards for this chip
on eBay for $10 or so. These devices can generate square waves up to about 1MHz and sine waves up to 30MHz.

To control the VFO I have in mind the rotary encoder modules from SolderMonkey. These are better than the GHI
rotaryH1 offering since it has the integrated pushbutton. I will use two: one to control the Frequency and the other
to cycle thru Frequency Memories. The button on the Frequency Encoder will to used to control a multiplier - sometimes
you want the frequency to change quickly with each turn, other times you want to increment the frequency
slowly.

The button on the memory select encoder will be used to set the current frequency to the frequency stored in the currently
selected memory. The memory itself will be an EEPROM from SolderMonkey, although it could be an SD card or EWR
(if I can figure out how). There will be a third standalone button to SET a memory from the current VFO frequency.

Frequency display will be done using a 1602 character module or my N18 device.

What does everyone think of the project plan so far?

I think I know how to maintain the frequency value with the encoders and buttons. I plan to have a timer
interrupt every 100ms to allow me to read the encoders to maintain the current frequency. Button Press interrupts will be
used to read/update memories and maintain the multiplier.

Where I get lost is in communicating with the AD9850. The frequency can be set in parallel mode (8 bits at a time)
or serial mode (1 bit at a time). Since I just want to use just one X or Y socket, I think serial mode it the best way
for a Spider. But reading the data sheet, it appears that there are very exact timing requirements for toggling the three
digital output lines. It is not enough to just set a port high and then immediately low. It needs to stay high for at least a minimum time
(I think). If I was only calling this from my main program, I could do Thread.Sleep to wait it out. But I want to be able to call my
AD9850.SetFrequency method from inside the timer interrupt Sub, and I know sleeping in an interrupt is a no-no.

So how can this be done?

Note that I am a VB.Net, ASM, and COBOL guy. I can read C# but not so great at writing it.

If I can succeed at this project, the next plan would be to do a plain NETMF version using the G30HDR I have on order at Mouser.

Any and all advice welcomed.

John

Hi and welcome to the forum.

Sounds like an interesting project you have there.

I’ve only had a quick look at the datasheet but I don’t think you will have any problem with the timings and no need to use Thread.Sleep as all of the timings appear to be minimum values and in the low nano seconds. I have been playing around with an ADS1256 which initially had me worried about timing issues but it was just bad coding that was causing my issues. :-[