# Recommendation for a USB digital simulator

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?

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. • 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. – fceconel Dec 17 '10 at 16:10 • I want one. No, two -- I want two! – tyblu Dec 17 '10 at 16:17 • Another one recently found linkinstruments.com/logana32.htm – fceconel Aug 3 '11 at 21:47 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. • 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. – fceconel Dec 17 '10 at 15:04 • As for the sample rate, the more the better. Ideally at least the same achieved by the Saleae product. – fceconel Dec 17 '10 at 15:06 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...