EEVblog Electronics Community Forum

Electronics => Projects, Designs, and Technical Stuff => Topic started by: ebastler on April 16, 2021, 07:22:33 am

Title: Cheap digital pattern (signal) generator?
Post by: ebastler on April 16, 2021, 07:22:33 am
From time to time I need digital test signals on more than the two channels which my function generator provides. Say to test an SPI slave device I am developing and which needs clock, data and a select line.

I have cobbled ad-hoc test signals together by programming a microcontroller or a GAL in such situations, but was wondering whether there is some cheap-and-cheerful solution available off the shelf which would make this a bit quicker. Rough idea of the functionality:

- 8 output channels
- Support at least 5V, 3.3V, 1.8V output levels. Probably best to have drivers which take their output voltage from the target.
- No hard-and-fast target for the max. clock rate. 100 MHz?
- USB input to configure from PC. The whole thing could be just a little USB dongle, like the mini logic analyzers?
- Programmable by uploading a CSV data table or such, and/or by a graphical UI on the PC.
 
Does such a gadget exist? I'd buy a cheap one right away, or make one if open-source designs are around. If nothing is available, this might be a nice little project at some future time...
Title: Re: Cheap digital pattern (signal) generator?
Post by: artag on April 16, 2021, 11:32:16 am
I have an idea some of the cheap USB logic analysers (EZ-USB) have output capabilty. But if not, that might be a good way to achieve it - perhaps start with sigrok's fx2lafw firmware.

The raspberry pi 2040's PIO, the teensy DMA used for multichannel WS2812 drivers, or the Parallax propellor could also be a simple way to get a fast parallel vector output.

For what it's worth though, I have a 16500 logic analyser with the digital output card. It's fairly good, allows simple state-machine signal generation etc. but it takes a lot of setting up. I think I only did that once - for most relatively slow jobs a quick bit of C on an arduino is easier to write and more flexible.

 
Title: Re: Cheap digital pattern (signal) generator?
Post by: Wolfram on April 16, 2021, 11:45:44 am
The Digilent Analog Discovery looks like a potential candidate. Outputs are 3.3V only, but that could easily be worked around with external level-shifting buffers. I don't know how good the the bundled PC-side software is, but you could try it out before buying the hardware if you consider using this platform.
Title: Re: Cheap digital pattern (signal) generator?
Post by: ebastler on April 16, 2021, 01:26:23 pm
Thank you both!

I did have a look at the very cheap USB logic analyzers (my own no-name thing and some available online), but did not find any output capabilities mentioned. If you come across any specific candidate, I would appreciate a pointer!

Building something based on a microcontroller board could be an option. But if I embark on (software) development, I would probably prefer to also make a custom board, complete with multi-level output drivers. Maybe next winter...

Off the shelf, the Digilent Analog Discovery (or the Digital Discovery?) come closest to what I am looking for. A bit more expensive than I had hoped, and they both are limited to 3.3V and 1.8V only.
Title: Re: Cheap digital pattern (signal) generator?
Post by: DTJ on April 16, 2021, 01:34:17 pm
Have you looked at the Bus Pirate?

Title: Re: Cheap digital pattern (signal) generator?
Post by: ebastler on April 16, 2021, 03:38:58 pm
Have you looked at the Bus Pirate?

I had not -- but for the various serial interfaces, it checks a lot of the boxes on my wishlist! And it is certainly in the price range I was hoping for.  :)

I will read the documentation a bit further to try and get my head around what it does and how it is controlled, but will probably get one to play with it. Many thanks for the suggestion!
Title: Re: Cheap digital pattern (signal) generator?
Post by: Bassman59 on April 16, 2021, 07:31:50 pm
Surely an FPGA eval board, like for a Lattice MachXO2, which has enough header pins connected to the chip, is a good platform for this?

Design any pattern you want, at any width (subject to number of pins) and depth you want!