Turn a logic analyzer into a signal generator using only software

One thing we learned by watching [Alton Brown] on all of those Good Eats episodes is that a multitasker is way better than a unitasker. [Joost] is thinking along the same lines by taking a fantastic tool and adding a useful function to it. His software project turns a USB Saleae Logic Analyzer into a signal generator.

There are already a multitude of reasons to own one of these fantastic tools. But the ability to use it to generate up to 8 channels of PWM signals is a welcome addition. It is capable of producing frequencies from 1Hz up to 1MHz at a sample rate of 4 MHz. It uses the original SDK and doesn’t require any changes to the hardware (we would’ve thought new firmware was necessary, but happily that’s not the case). The one caveat is that right now this only works with Windows machines running the .NET version 3.5 or higher. It looks like an MSI installer package is all that’s available for download so the thoughts of easily porting this to other operating systems have been dashed unless [Joost] decides to share his source code.

18 thoughts on “Turn a logic analyzer into a signal generator using only software

  1. Very interesting indeed… How does he turns an input pin into output w/o modding the firmware?

    I don’t have one so I can’t tell.

  2. Really cool to see my project featured on this website:) Thanks everyone for all the nice emails! This really encourages me to continue on improving PWM Logic!!

    To answer a few questions which I’m receiving emails about:
    -> I’ll release the code as open source in due time. I’m still working on the project myself, and don’t want to release it into the wild before it’s finished.
    -> The code is all C#, so it might work under Mono as well as M$ .NET. You might have to write a new wrapper for the Saleae SDK library though.


    Joost

  3. The use of .NET is not a caveat, it’s a *huge* drawback: all the bloat of a Java-like environment plus all the problems that come from using proprietary technologies.
    Being closed source it also cannot be used to get the knowledge useful to build a better software using native languages, other than of course being untrustworthy so that the author itself cannot guarantee the absence of malware.

    Form the download page:
    “I really hate it when applications install all sorts of unwanted bloat-, ad-, or spyware, so PwmLogic won’t! I checked it using an up-to-date major brand virus scanner prior to uploading and did my best to make sure it’s safe. However, as you might expect, I can’t give you any guarantees.”

    Dear author, thanks for the effort and I’m sure your intentions are the best, but beside the mere fact that .NET *is* bloatware, we already have a weapon against bloat and viruses/virii. They’re called respectively native language programming and publishing the source code.
    If you don’t want or cannot write that app in C or C++, at least give away a subset of your source code in order to allow the creation of a better app.

  4. @HackerK: The Saleae hardware has already been hacked and cloned multiple times, so there are some people out there who know its internals.
    It probably already contained that function.

    http://www.aliexpress.com, in hardware.
    /product-gs/374389967-C19-CY7C68013A-development-board-SALEAE-USBee-AX-PRO-clone-logic-analyzer-Oscilloscope-wholesalers.html

  5. Dear Qwerty,

    As you could have read on the site, I’ve initially made this application only for my own use. I thought it would be nice to share it with others, so I cleaned it up, added a proper GUI and put it on a simple website. That’s it. no more, no less.

    As far as Native v.s. Managed programming… I work with both, on various platforms and personally think that they both have their strong and weak points. For this project I chose C# on a Microsoft platform. If you don’t like it, don’t use it.

    Your kind of post doesn’t encourage me to help you in any way. You could have just asked me for info…

  6. qwerty, don’t hate .NET framework and the author’s development choices.

    if the author ever releases the source code you go ahead and port it to your ‘better’ native language and support operating systems that the original author probably didn’t feel the need to support. otherwise shut up.

  7. Dang, I got really excited then depressed when I saw it was (as of right now) PC only. I look forward to the source code!

  8. Just ignore the above criticisms Joost; I’m sure you realise that forums like this do not always bring out the best in people.

    In any case, congratulations on some nice work and thanks for sharing.

  9. this is awesome. it also means that there is some hope to have the logic split 4/4 or 2/6, etc., pwm/capture to be able to capture a response based on the pwm signal.

  10. I bought one, I like it.
    … he who dies with THE MOST TOYS wins!!!

    “I really hate it when applications install all sorts of unwanted bloat-, ad-, or spyware, so PwmLogic won’t! I checked it using an up-to-date major brand virus scanner prior to uploading and did my best to make sure it’s safe. However, as you might expect, I can’t give you any guarantees”

    … but, you wroted it, and posted it, and hosted it… how could anything sneak in???

    I’ve been asking (read:bugging) joe to write one of these since I bought it. He’s a busy guy.

    Thankyou, enjoy the zah!!

  11. For the people who are wondering about how it is done:
    I use the the official Saleae SDK which provides the possibility to write to the pins.
    As far as I know it is not possible to read the outputs while writing to others. I agree that this would be a nice thing to have;)

    For the people who are really eager to see the code;
    I strongly advice you to wait a few weeks. The current version isn’t as good as I want it to be and needs some serious cleaning up. It just doesn’t feel right to release it in its current state.
    When it is finished, I’ll release the PWM generator part as a library (.NET dll) and as source code, so you can port it to other platforms.

    About the part on spam-, bloat- and spyware on my site:
    It’s just there as some sort of disclaimer;) I really do my best to ensure that the installer doesn’t contain viruses or other stuff that my pc might have become infected with. But using MS Windows, this is never a certainty;)

    Thanks again for the great idea’s, support and emails! Please don’t hesitate to contact me if you have any questions or remarks.


    Joost

  12. If he wrote it in C# and used Windows Forms instead of WPF, just decompile it and recompile with Mono. Should work with minor tweaking.

  13. @Sam:
    I indeed used C# and Windows Forms, so that part should be compatible with mono. People who want to port it should implement their own wrapper for the Saleae library though. (Or use the wrapper that is provided by Saleae, but I doubt that it works with Mono out of the box)

    Again, for people who want to port PwmLogic:
    Save yourself the trouble with decompilers, because I’ll release the Generator’s nicely documented source code within a few weeks. (I’m still working on some features and bugs, thats why I don’t release it right away)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s