Electronic – Microcontroller with ADC and capable of SPI communication

adcmicrocontrollerpicspiusb

I am designing a system where

Analog Signal —> (ADC- Digital Data )—> UWB chip mostly WSR601 or AL6301/AL5100 Chipset

Note (1): UWB is an abbrieviation for Ultra Wide Band wireless communication technology. Wireless USB chips which are being used here make use of this technology. So, in short the data is transmitted at 5 Mbps to the UWB (wireless usb) chips using SPI or USB 2.0. These wireless chips then transmit data to the receiver.

Note (2): The data sampled through the ADC just directly needs to be passed on to the UWB chip through whatever interface (USB , SPI etc). Data does not need to be processed in any manner.

I am looking for a microcontroller to perform the function of ADC and interface with the UWB chip. Both (WSR601 and AL6301/AL5100) support various options like USB 2.0 , SPI, SDIO 2.0 , UART etc.

1) The ADC that I need is 10 bit and the data rate resulting from that which I need to transmit to the UWB chip is around 5 Mb/sec. ADC sampling rate required would be around 5 * 10^5 times per second.

2) It needs to be as low power as possible

3) Would SPI be the best choice for this considering the data rate and the low power or do you think some other communication interface would be better?

4) Any uC suggestions having sufficient processing power for the ADC and SPI to work simultaneously?

I was suggested PIC32MX250F128D by someone who claimed that it consumes 14.5mA at 40MHz, 3.3V. But again this uC has a LOT of interfacing options available which I think is unnecessary and also this uC doesn't seem to be available on the microchip website.

So I hope someone can suggest uC with a little lesser functionality and hopefully lower power consumption than one under consideration.

Best Answer

I don't know what you mean by "UWB" (use standard or common abbreviations, no I'm not going to look it up, it's your job to explain), but many many micros have 10 bit A/Ds and SPI hardware. Even without the SPI hardware, SPI is simple to do in firmware by controlling the I/O lines directly.

In the Microchip line, there is a wide spectrum that meet these requirements. A low end PIC 16 can be small, cheap, and very low power. A fast dsPIC33 can run up to 40 MIPS but of course will use more power. There are various PIC 18 and PIC 24 in between.

What you need to explain is how fast you need to sample the 10 bit A/D and what the micro needs to do to these 10 bit values before passing them on via SPI.

This "answer" is more of a comment because too much important information is lacking. It can be turned into a answer if you cooperate and answer the specific questions asked, not what you feel like answering or or you think is important. As it stands, this question is too vague to be reasonably answered and should be closed. People will come by and close it as they encounter it. When 5 close votes are cast, it's over. The clock is ticking. You may have only minutes to a few hours. Do what I said exactly as I said quickly and you may get your answer. Ignore it and not cooperate and you'll be sent home without a cookie.

Added:

You have now added that the A/D sample rate is 500 kHz and that this raw A/D data is to be passed on via SPI. Since the A/D is 10 bits, this is apparently where you got the 5 Mb/s SPI data requirement from.

This is doable, but will require a reasonably high end micro. The limiting factor is the 10 bit A/D at 500 kHz sample rate. That's quite fast for a micro, so that limits the available options. Another thing to consider is that there is more to SPI than just sending the bits. Bytes may need to be transferred in chunks with chip select asserted and de-asserted per chunk. For example, how will this 10 bit data be packed into 8 bit bytes, or will it at all?

The main operating loop of the firmware will be quite simple. You probably set up the A/D to do automatic periodic conversions and interrupt every 2µs with a new value. Now you've got most of 2µs to send it out the SPI. If the device really can just accept a stream of bits, then it might be easier to do the SPI in firmware. Most SPI hardware wants to send 8 or 16 bits at a time. You'd have to buffer bits and send a 16 bit word 5 out of every 8 interrupts. It might be easier to just send 10 bits each interrupt in firmware.

Sending SPI bits in firmware if you only need to control clock and data out is pretty easy. Per bit, you have to:

  1. Write bit value to data line.

  2. Raise clock

  3. Lower clock

It would make sense to unroll this loop with preprocessor logic or something. A PIC 24H can run at up to 40 MIPS, so you have 80 instructions per interrupt. Obviously you can't use 8 instructions to send each bit. If you can do it in 6 it should work. There is some overhead to get into and out of each interrupt, so you might make the whole thing a polling loop waiting for the A/D, but then the processor can't do anything else. I'd probably try to cram this into the A/D interrupt routine using every possible trick so that at least a few forground cycles are left over for background tasks like knowing when to stop, etc.

Check out the Microchip PIC 24H line. I think most if not all have A/Ds that can do 500 kbit/s, and they can all run at least up to 40 MIPS. The new E series is even faster, but I'm not sure how real that is yet.

Related Topic