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.

MSPS and new fast microcontroller from microchip question

Status
Not open for further replies.

TheMartian

Junior Member level 3
Joined
Jul 6, 2018
Messages
28
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
322
I am looking at the datasheet of PIC32MZ DA family
https://www.microchip.com/wwwproducts/en/PIC32MZ2064DAH176
**broken link removed**
it says the CPU is clocked at 200MHz and has
"18 Msps with up to six ADC circuits (five dedicated and one
shared)"
of 12 bit ADC.
It also has 640KB RAM (If I understood correctly)
I speak about LQFP version.

18Msps = 18MHz, the law of sampling says that sampling frequency should be 2x higher at least than sampled signal, so, does it mean that I can use this PIC to sample 4MHz signal?

18Msps signal is 18 000 000 samples per second, assuming ADC is 12 bit, then it is 12*18 000 000 bits per second, 216 000 000 bits per second ==> 27 000 000 bytes per second, 27 000KB! It is way higher than the CPU RAM...

Can anyone experienced here clarify what I wrote above? Is PIC32MZ DA really able to sample 4MHz signal, and if yes, does it mean that I can't store even a second of this signal in memory, I have to somehow get it out of the chip if I want to store it?
 

Hi,

Sampling frequency needs to be HIGHER than 2 x the highest (sine) frequency within a signal.
--> you can´t sample a 9MHz sinewave with a 18MHz sampling frequency.

18MHz sampling frequency and 4MHz signal.
Yes, possible. But only if the 4MHz signal is pure undistorted sine.
Every distortion means overtones. Overtones are multiples of your fundamental frequency.
Thus: 4MHz fundamental: overtones: 8MHz, 12MHz, 16MHz ...
Most overtones ar uneven multiples: 3x, 5x....
But the lowest uneven overtone = 12MHz is beyond nyquist rule.

Sine: yes. Other waveforms like triangle, square wave, random = NO.

18Msps signal is 18 000 000 samples per second, assuming ADC is 12 bit, then it is 12*18 000 000 bits per second, 216 000 000 bits per second ==> 27 000 000 bytes per second, 27 000KB!
Sadly even worse.
12 bit means 2 bytes per sample. (don´t calculate with bits)
--> 36 000 kBytes/s

It is way higher than the CPU RAM...
No. One unit is "byte/s" the other is "bytes". You can´t compare different units (like apples and oranges)

It just says: you can not store a complete second of sampled data.
640kBytes / 36,000kBytes/s = 0,01778s = 17,8ms

*****
Why do you want to store a complete second?
This are 4 million full waves. Usually it makes no sense to store 4 million full waves of the same signal.

But maybe yo can add external SRAM or DRAM to store expand the memory. Read the datasheet.
Even with an ethernet interface I doubt you can transmit all data without loss of data.
Any additional traffic on the ethernet may cause your dataflow to stall. ... 17ms are enough to fill your complete buffer .. and after those 17ms there will be loss of data.


Klaus
 
Sadly even worse.
12 bit means 2 bytes per sample. (don´t calculate with bits)
--> 36 000 kBytes/s
Right, forgot about it, altought maybe it would be possible to pack it to bits in the buffer with bitwise operations

Even with an ethernet interface I doubt you can transmit all data without loss of data.
I tought USB 2.0 is at least 20MB/s but I am not sure how is it related to PIC usb module.


Why do you want to store a complete second?
This are 4 million full waves. Usually it makes no sense to store 4 million full waves of the same signal.

Right now I am only doing considerations, but in general I am interested in 3.5MHz - 4MHz signal range. I wanted to capture the signal, save it to PC, to file and later do two things:
- try plotting spectrum and detect strong radio stations in 3.5MHz - 4MHz range
- try processing signal with DSP, try to receive SSB (voice) or CW (morse signal)
Both goals right now are under assumptions that I capture signal on PIC and then I have many hours to play with it on PC with Matlab or C++ libraries (not realtime, at least for now!)

Do you think those goals are at least partially achievable? In worst case I can change assumptions from 3.5-4MHz to 1.8-2MHz range.
 

Better solutions are to down-mix to near DC using a stable local oscillator. That relaxes the need for such high speed sampling with sacrificing spectrum quality. You might be able to divide the MCU clock source to derive a suitable oscillator frequency.

It would be useful for you to look at using an oscillator with quadrature output ( I & Q ) then doing math on the two resulting streams, it's mathematically easier than one stream.

Brian.
 

Better solutions are to down-mix to near DC using a stable local oscillator. That relaxes the need for such high speed sampling with sacrificing spectrum quality.
If I understand correctly then I have been thinking about such solution. In worst case I wanted to use simple Mixer chip like SA612, feed it with antenna signal at one input, and some constant frequency like 3.5MHz in second input. Then the IF would be in 0-0.5MHz range.

The question is, is my IF selection here correct? It is getting suspiciously similiar to simple homodyne receiver. Also, would such 0-0.5MHz captured data with SA612 mixer be precise enough to first draw a spectrum and then maybe try decoding CW/SSB?

The second option might be using a DDS chip like AD9850 and take advantage of frequency changing, but I'd like to avoid that....

It would be useful for you to look at using an oscillator with quadrature output ( I & Q ) then doing math on the two resulting streams, it's mathematically easier than one stream.
Can you recommend some online reading or a practical example of that?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top