SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By alexanders
#9727
can somebody help me, im really confuse. I want a PIC that can sample 1MHz, 33 times. So that means i need a PIC that can handle 33Msps right? does this PIC exist?

messages can be forwarded to glenn.fetalvero@gmail.com

thanks and more power to this site :D
By Kuroi Kenjin
#9729
Sample as in A/D sampling? A PIC is not going to do it. Even the PIC18's can't sample faster than 200Ksps. You're going to need an external A/D chip probably with a PIC18 clocked at 40MHz (10MIPS), or a USB PIC18 clocked at 4MHz (24xPLL -> 96MHz internal or 24MIPS) into keep up. And I'm not quite sure on the PIC24 (which are not available yet). And if you really need speed dsPIC family which clocks up to 120Mhz (using a 16xPLL for 40MIPS), but the A/D I don't think is any faster.

May I ask what is this for? Sampling a 1MHz signal requires at least a 2Msps A/D (Nyquist theorem). I'm slightly confused as to the 33 times and how that makes 33Msps. I would think you'd need a 2Msps A/D and just let it run 33 times. This is starting to sound like an oscilloscope.
By alexanders
#11204
your right~! your great man! hehe now im impressed!!!!

Im gonna use that to make a TV based oscilloscope which has a maximum input frequency of 1MHz
By Kuroi Kenjin
#11211
I've tried to throw a few designs on paper to make one of my own (one day), and I haven't found a way to do it nicely without resorting to some beast of a chip such as Coldfire or other DSP. Let me know what your solution is, I'm rather curious.
By Philba
#11212
I don't think this is doable with a PIC, even with an external DAC. You don't say how you want to display the results so that has a lot of bearing on what is possible. A uC with DMA and an SRAM interface might be more appropriate

I'd think an FPGA would work better for this. Run a fast DAC into SRAM. Again, how you access the SRAM to generate the display is crucial.
By Kuroi Kenjin
#11213
Yeah, the only solution I could think of was an FPGA... It would have to be a nice one, since one would need to configure the FPGA to also do the display. Although a fast micrcontroller/processor (>75-100MIPs?) could do the display, if it was dual port SRAM (one side writes, the other reads). Then this begs the issue of synchronization (Is the bufer the processor is displaying, being overwritten as it displays?) Then you get into all different choices of burst reading, double (ping-pong) buffering the data, multi-sampling points...etc. *sigh*

Although alexanders is planning on a TV display, which opens a whole different can of worms, in terms of speed issues. A PIC18 maybe fast enough for a black/white semi-low resolution, but would have to be spoon-fed data read to be displayed. Although this doesn't answer the question of who's taking the measurements? Also have you given any thought as to signal conditioning? (i.e. range detection...etc.)
User avatar
By leon_heller
#11221
alexanders wrote:can somebody help me, im really confuse. I want a PIC that can sample 1MHz, 33 times. So that means i need a PIC that can handle 33Msps right? does this PIC exist?

messages can be forwarded to glenn.fetalvero@gmail.com

thanks and more power to this site :D
A dsPIC33F with a suitable ADC could sample at that rate, but you won't have any time to do any processing of the data. You really need a proper DSP.

Leon
By Philba
#11223
Kuroi Kenjin wrote:Yeah, the only solution I could think of was an FPGA... It would have to be a nice one, since one would need to configure the FPGA to also do the display. Although a fast micrcontroller/processor (>75-100MIPs?) could do the display, if it was dual port SRAM (one side writes, the other reads). Then this begs the issue of synchronization (Is the bufer the processor is displaying, being overwritten as it displays?) Then you get into all different choices of burst reading, double (ping-pong) buffering the data, multi-sampling points...etc. *sigh*

Although alexanders is planning on a TV display, which opens a whole different can of worms, in terms of speed issues. A PIC18 maybe fast enough for a black/white semi-low resolution, but would have to be spoon-fed data read to be displayed. Although this doesn't answer the question of who's taking the measurements? Also have you given any thought as to signal conditioning? (i.e. range detection...etc.)
you could make your own dual port memory with a fast sram and 2 address/data buffers. interleave read and write. fpga could do this with ease. the display portion is still utterly vague (beyond "on a TV").

I supposed one wouldn't need to make it a storage scope but that seems kind of silly to do 90% of the engineering and skip the good stuff.
By beebop
#11233
I somehow think this will be of some use to you:
http://www.bitscope.net/design/manual/capture/
The Bitscope PLD (Spock) is the data capture chip.

Spock implements the high speed data capture logic that captures both analog and digital data to the dual paged SRAM buffers.
As for an A-D:
Mototola MC10319 ADC in the BitScope kits which has a maximum sample rate of 25 MS/S
The details are at:
http://www.elby-designs.com/bitscope/me ... module.htm

Finding out how to order is a bit tougher, but perhaps this will give you some ideas.
Best wishes,
Robert