Tuesday, January 1, 2019

Digilent Discovery Quick Howto

When I haven't used my Digilent Digital Discovery logic analyzer for a while, I kinda forget how to use it.  This logic analyzer is really nice because it's relatively cheap but can capture 32 channels (!!) and has some pretty decent software to help me visualize my data.  The only real downside that I've found is that it doesn't stream so you can't have arbitrarily large samples.  This is the one killer feature of the Saleae which prevents me from saying that the Digital Discovery wins in every category.  However, it does have a decent buffer size especially for 'slower' capture speeds like 1 MHz which is usually plenty for the old tech that I like to study.

Without further ado, here are my notes (to myself) for how to set up the software to make the logic analyzer do what I want.  And a bonus youtube video at the end illustrating all of it.

----------------------

Click "Logic"

Change mode to "Record"

Click + to add channels
If adding multiple lines, choose Bus, otherwise Signal

If using trigger, change trigger dropdown to 'normal'.
Else, set it to 'none'.

Click "Config"

Choose Rate (I like 1 MHz minimum)
Uncheck 'noise'
Set 'base' to how much time you want to capture. 'Samples' will be auto computed.  Note, streaming doesn't seem to be supported, so the higher the sample rate, the smaller the sample size.

If using trigger,
Set trigger to 10% or less.  10% will capture 10% of data before the trigger happened which is often the most useful for me.


Important notes about triggers:

Triggers can be confusing.  I spent several minutes being horribly confused by this situation:




I wanted to trigger when the data lines had a value of 0x10 and when M1 was low (a Z80 instruction).  It appeared to me that what was happening was not a valid place to trigger.  However, upon closer inspection, it actually is valid because for a brief snapshot in time, my trigger criteria had been properly met.  To fix the problem, I needed to change the M1 trigger to be a rising edge instead of simply a value of 0.

My advice is to try to use falling/rising clock edges as part of your triggers.

When capturing Z80


If capturing data lines to try to find an instruction, capture on M1 (or RD) going high in addition to isolating the data bus.

If capturing address lines to try to find an instruction, capture on RD going low in addition to isolating the address bus.