Microcontroller, FPGA or CPLD?

  • Thread starter Jdo300
  • Start date
  • #26
554
5
Hi Warren,

Ok, here is what I ultimately want to do. The goal is to produce a PC programmable 3-channel function generator that can put out short pulses of variable width. The phase shift and frequency both have to be programmable from a program on a PC. The output pulses would be fed to line drivers like the mic4427 or a UCC27321P.

Also later on, I want to incorporate the ability to take voltage measurements (like a data logger) but I’m not too concerned with that right now since I could use an external programmable DMM to do that.

The microcontroller that I need would not really have to do any processing on its on. Its job would mainly be to communicate the frequency, phase shift, and amplitude settings from my PC program to the four channels of the AD9959 IC. I would simply come up with a basic command set that I can send the microcontroller from my PC using the serial port, which I will program using the MSCOMM control in Visual Basic.

I heard that there are a number of options for programming the micro; anywhere from assembly to C, to Basic. I don’t mind programming the thing directly in assembly but I figured that it may be easier to do it in C or basic since I’m only swapping data through registers and not doing any real processing.

As for some constraints, I would be doing all I can do with the AD9959, so I would get the 500MHz crystal to run the IC so I can generate output frequencies up to 100MHz. Since the output would drive a logic gate to make the pulses, I’m not too concerned about how pretty the sine wave output looks but I will have an option to have the IC output sine waves for lower frequencies where the sine waveform looks nicer (like 50MHz and below).

So the microcontroller would have to be able to handle the 32-bit frequency input for all four channels, as well as the 14-bit phase shift input and the 10-but amplitude input. Since the AD9959 supports serial input, I would most likely go serial so I won’t need to have a ton of I/O pins on the PIC.

That’s all I can think of for now. Thank you very much for your guidance on this :smile:.

- Jason O
 
Last edited:
  • #27
chroot
Staff Emeritus
Science Advisor
Gold Member
10,239
39
You might be able to just use your parallel port and an RS-232 reciever to control the digital inputs on your AD9959 directly; no need to program a microcontroller at all.

- Warren
 
  • #28
554
5
WOW that would be simple.... I don't know much about serial communications (from the hardware end) so I'm trying to read up more on it. From what I can tell from reading the datasheet on the AD9959, the serial data can be input into the chip asynchronously which I guess is a good thing :smile:. Would I need any other special chips to do this? I remember seeing a lot of references to the MAX232 chip which is supposed to be an RS232 receiver.

- Jason O
 
  • #29
chroot
Staff Emeritus
Science Advisor
Gold Member
10,239
39
Sorry, I goofed up my previous post. I meant to say "your parallel port or a serial port and an RS-232 receiver".

The MAX232 is a perfectly fine RS-232 receiver, as far as I know. You might be able to wire the MAX232 directly to the AD9959, but I admittedly have not read the datasheets of either device.

Serial port communication is dirt simple on the PC, by the way. If you can go the serial port route, I would definitely use it.

- Warren
 
  • #30
554
5
HI Warren,

The more I read about this the more I like it. for the PC end, I will DEFINITELY be using the serial port to program out from. As for communications with the AD9959, apparently it uses an SPI interface to communicate through so I found this other nifty chip, MAX3110E, which is supposed to convert the RS232 signals into the SPI ones. Now I'm just trying to figure out how to set this all up so I can select which one of the four channels on the AD9959 to program and then out of those four channels, which of the three inputs to program (frequency, phase shift, and amplitude). It all seems simple enough and maybe I can implement it with some multiplexers and shift registers or something??? I'm trying to read more on the SPI and RS232 interfaces to figure out how to even start setting this up. But whatever the ultimate solution, it will definitely be simpler then programming a microcontroller to do the job. Maybe I need to make up some kind of primitive command setup to tell the circuit how to route the bits??

- Jason O
 
  • #31
554
5
I'm studying the datasheet for the IC now. It looks like they actually implements some kind of serial command structure for this IC (Man it's practically a microcontroller on it's on). Here's a link to the datasheet. The I/O info starts on page 30:

http://www.ortodoxism.ro/datasheets2/2/049iw670xf1p0dyxsaoplk09ss3y.pdf

Man this just keeps getting better :smile: I'm glad I didn't add a microcontroller to control the microcontroller :redface:

- Jason O
 
Last edited:

Related Threads on Microcontroller, FPGA or CPLD?

  • Last Post
Replies
17
Views
2K
  • Last Post
Replies
16
Views
7K
  • Last Post
Replies
13
Views
4K
  • Last Post
Replies
10
Views
3K
  • Last Post
Replies
5
Views
3K
  • Last Post
Replies
11
Views
10K
  • Last Post
Replies
1
Views
5K
  • Last Post
Replies
3
Views
888
R
Replies
5
Views
2K
  • Last Post
Replies
5
Views
1K
Top