4
\$\begingroup\$

It's becoming quite frequent to me having a new digital subsystem which I want to test in isolation before trying to make a prototype circuit. I've been using the digital analyzer by Saleae for inputs, which is quite handy, but I'm wondering if I could find or build its counterpart. Ideally it would be a device to plug in an USB port, would have many digital outputs (let's say 20 or more) and would come with software that would enable me to do a playback from a prerecorded file, or generate the output with a program or script.

Does anyone know about such a product, or have guidelines to build on my own?

\$\endgroup\$

3 Answers 3

3
\$\begingroup\$

The product you're looking for is a digital pattern generator. While this one is overkill for your specification, it's the one that I'm most familiar with. It'll probably set you back about $12-20k for a full setup.

Basically their setup is a FPGA hooked up to a bunch of RAM driving 16 logic outputs. It's really fancy because you can set the frequency and output voltage of the module. Cheaper, slower, and less-flexible modules should be available from someone else.

\$\endgroup\$
3
  • 1
    \$\begingroup\$ Thanks, that's what I was looking for. Although the model you mentioned is quite expensive, I found more affordable one (obviously with less features/capacity) at byteparadigm.com/product-gp-22050-14.html - knowing the exact denomination for the product helped a lot. \$\endgroup\$
    – fceconel
    Commented Dec 17, 2010 at 16:10
  • 1
    \$\begingroup\$ I want one. No, two -- I want two! \$\endgroup\$
    – tyblu
    Commented Dec 17, 2010 at 16:17
  • \$\begingroup\$ Another one recently found linkinstruments.com/logana32.htm \$\endgroup\$
    – fceconel
    Commented Aug 3, 2011 at 21:47
1
\$\begingroup\$

This sounds like a crude definition of a microcontroller. It has GPIOs and can fetch instructions from memory. Hardware requirements are based on the following:

  • memory: How much playback do you need? The Salae uses 10bit samples at up to 24MHz, or 30MB/s (also the single channel USB 2.0 limit). You may require external memory modules to support long traces. This can be done directly from USB, with minimal on-board memory, and would depend on your computer's USB bandwidth, like the Salae does. If you're using both at once your computer's USB controller may reach its limit. I wouldn't want to depend on this.

  • IO speed: Producing multiple 10-bit 24MHz patterns is no small feat. Look for chips with many hardware PWM modules. You may need to use multiple slave PWM chips. How much greater the clock speed must be than the PWM frequency depends on the chip family.

  • noise: On a 5V digital system, an 8-bit LSB is about 20mV and a 10-bit LSB is about 5mV. For these bits to be effective your noise level must be below that. This will be important when running so many parallel conductors, all with 24MHz digital* signals. Although this speed is not high, it can have >20mV crosstalk if traces are coupled. I don't think special drivers (bipolar, etc.) or EMI protection is required - just space them out.

  • USB: Look for hardware USB support, or go with an external FDTI chip. It can be done in software as well, and is an option at least for M3s and XMOS, but keep in mind it reduces thread slices for your PWM memory fetching, etc., especially if it is being used to fetch PWM data from USB (limited on-board memory).

Possibilities include the PIC24 family, XMOS, and many of the ARM family. There are some great parametric tables out there: RS, Microchip. It would be worth getting to know the differences between ARM implementations to see if one will do everything.

Note that you may also want to drop to 8-bit PWM, as you could then lower your hardware requirements. *Yes, they are analog, but they're also a recording of a digital signal. Hopefully they appear so.

\$\endgroup\$
2
  • \$\begingroup\$ Yes, I supposed that designing a circuit for that would involve a microcontroller, but I'm looking for a finished solution - either a product that does that or an open source project that has it. Otherwise it would be "building a car from scratch because I need one". I assumed my need would be very common, so there should be products and/or projects doing that. \$\endgroup\$
    – fceconel
    Commented Dec 17, 2010 at 15:04
  • \$\begingroup\$ As for the sample rate, the more the better. Ideally at least the same achieved by the Saleae product. \$\endgroup\$
    – fceconel
    Commented Dec 17, 2010 at 15:06
1
\$\begingroup\$

You could program an Arduino with a pretty basic sketch to give you this capability... and you could write a fancy little C# application to do the pattern definition... that would be the easiest imo. That should cost you not more than $30 and a couple hours of free time :). Maybe someone's already done it...

\$\endgroup\$
6
  • \$\begingroup\$ What would be the maximum sample rate in this approach? \$\endgroup\$
    – fceconel
    Commented Dec 17, 2010 at 16:06
  • 2
    \$\begingroup\$ @fceconel well the Arduino runs at 16MHz, there's going to be some overhead for the program that "executes the pattern" but if you implemented the code running on the Arduino intelligently making use of hardware peripherals, I would think you could achieve something approaching 16MHz. \$\endgroup\$
    – vicatcu
    Commented Dec 17, 2010 at 16:48
  • \$\begingroup\$ Thanks, sounds like a good candidate for a basic solution when you need just the basic functionality at a low clock. But I wouldn't be so optimistic about the maximum sample rate. To give an example, I am currently experimenting with a BeagleBoard C3, which runs at 600 MHz, and the maximum I was able to get at its GPIO was about 4 MHz - and in that case just flipping a bit in a tight loop. \$\endgroup\$
    – fceconel
    Commented Dec 17, 2010 at 17:38
  • \$\begingroup\$ The Arduino will be very limited. Even using the most powerful one, the ATmega2560, its 12 hardware PWM modules can only do about 60kHz ("fast PWM"; f_clk/256 max). Some AVRs can do 200kHz, which still doesn't come close to your 24MHz. Bit-banging IO's won't do faster PWM, but you can get up to f_clk/2 on a single IO if that is all the chip does. I think the Netduino uses an ARM - maybe it could do something more? \$\endgroup\$
    – tyblu
    Commented Dec 17, 2010 at 18:00
  • \$\begingroup\$ @fceonel Sure to approach the maximum rate, you'd probably have to use timer/PWM capability and maybe some optimized interrupt service routines (probably compare/match interrupts)... 4MHz out of a 600MHz CPU strikes me as something not quite right there... \$\endgroup\$
    – vicatcu
    Commented Dec 17, 2010 at 18:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.