Jump to content
  • 0

Acquiring data until an event occurs


BobA

Question

Hi. I have a Digital Discovery debugging an old microprocessor, so I have 16 address lines in a bus and 8 data line in a bus. What I would like to know is what the microprocessor is doing when it decides to access a particular address. So I'd like to like to click Run, start acquiring data, and then have it stop when the bad address is accessed, so that I have the data leading up to that event. It's sort of like a trigger that stops acquisition instead of starting acquisition.

Is there a way to do this?

Thank you,
   Bob

 

Link to comment
Share on other sites

10 answers to this question

Recommended Posts

Thanks for the response. I've been reading the manual in the hopes that I won't ask a stupid question. However, either I'm missing something, or the manual is pretty sparse, to put it mildly.

If I understand correctly, acquiring data just fills up the Discovery's internal memory, then starts overwriting it. If I turn on Record, the acquired data is sent to the PC, where it's stored in a buffer. The Buffer can be set from 1 to 10. I haven't found any explanation of what that setting means. How much data can be buffered?

I might run my system overnight. If it triggers on my event but keeps acquiring data, won't the data leading up to my event quickly be lost from a finite buffer?

Then there's logging. My notion of logging has historically been "everything gets written to a file", so I don't really understand why there's a script associated with logging. Logging looks like it might solve my problem, but if I want to have a test running for hours, I don't see how to use Logging. Setting Execute to Manual means I need to keep clicking the Save button to run the script that saves the data. Setting Execute to Each Acquisition sounds like the script will run for every data sample, which makes no sense given the script. Meanwhile, when I try logging, it looks like it only save 32768 samples. I thought the idea of logging was to save everything, no matter how many samples there are.

Another thought was that I could write a script that looks at each captured data and decides when to stop acquisition. Is it possible to write such a script? Is there an example anywhere?

On a recent test run of my system, I saw another event I might want to trigger on: an address value in a given range. There doesn't seem to be a built-in way to define such a complex trigger, but I saw something in the manual about using a script to generate a signal. So can I have a script that reads the pins on my address bus and outputs a 0 or 1 based on whether it meets a condition, and then use that output as a trigger? Where is something like this documented?

I apologize for my sizable display of ignorance and my slew of questions. Am I missing places in the manual where all this stuff is explained, or is it just not possible?

Thank you,
   Bob

 

Link to comment
Share on other sites

Hi @BobA

Usually there are more events happening that could be transferred to the PC, the needed sample rate is higher than the USB bandwidth.
Depending on the analyzed protocol you can use Enable and Clock for the Bus like a CS and WR signal.
You can configure the trigger for the odd address and you will have the pre-trigger data to see what happened before the trigger.
In case you need more samples with Digital Discovery you can use the Record mode.

image.thumb.png.c014d51a185bbd5ec6d453055fd27907.png

image.png.7875a81264747856b30e941d34802f77.png

image.png.38059b925277bacac8d95a7648592d7b.png

 

Link to comment
Share on other sites

Hi @BobA

From the Help-Manual:
Buffer: The performed acquisitions are stored in the PC buffer in time order. This makes it easy to review a series of repeated acquisitions. The new acquisitions are stored after the currently selected buffer position. If you change the position in the buffer and start a new acquisition, the positions after the selected one will be lost.

Link to comment
Share on other sites

OK, so the buffer number is selecting an active buffer to view and acquire into. I had been assuming it was allocating a buffer size.

It appears that each buffer holds 32768 samples. A Single acquisition fills a buffer, stops, and advances to the next one. A Repeated acquisition fills each buffer up to number 10, and then what happens? Does it overwrite buffer 10, or scroll buffer 10, or shift all the buffers down and create a new one?

If they're on the PC, why are there only 10 buffers? (Ah ... I just discovered a settings dialog that lets me increase the number of buffers. Is that documented anywhere?)

In an acquisition I just did with no trigger, I see timestamps ranging from -144us to 18us, for a total of 162us. If there's no trigger, what's so special about timestamp zero? I would've expected the last sample to be time zero, and all the previous samples to have a negative timestamp. Is there a dialog similar to the Recording dialog in the snapshot you posted above that sets a percentage of each buffer before and after timestamp zero?

And speaking of that Recording dialog, is it documented anywhere? What does the Noise checkbox do?

I realize my questions are all over the place, and I'll be duly embarrassed if all this is in the manual (I did read it - I really did). But I'm feeling a bit of bewilderment.

- Bob

Link to comment
Share on other sites

Hi Attila,

Another, more pressing question: I'm changing the Samples value at the top right of the window. I assume this specifies the size, in samples, of each buffer. If I select 50k, no trigger, Repeated mode, and click Run, the acquisition runs continuously.

But if I change Samples to 50M and click Run (still in Repeated mode) it appears that WaveForms fills one buffer and stops. Why is that?

Thanks,
   Bob

 

Link to comment
Share on other sites

Hi @BobA,

I don't necessarily know all the answers to your questions, but I'll answer what I can.

If they're on the PC, why are there only 10 buffers? (Ah ... I just discovered a settings dialog that lets me increase the number of buffers. Is that documented anywhere?) -- yes, this is within the WaveForms software itself. Inside the GUI, click on the Help tab at the top, then Browse. The WaveForms documentation stored on your local machine from when WaveForms was initially installed will be brought up and you can find the details about the Buffers in the gear menu in the "Logic -> Control" section.

In an acquisition I just did with no trigger, I see timestamps ranging from -144us to 18us, for a total of 162us. If there's no trigger, what's so special about timestamp zero? I would've expected the last sample to be time zero, and all the previous samples to have a negative timestamp. Is there a dialog similar to the Recording dialog in the snapshot you posted above that sets a percentage of each buffer before and after timestamp zero? -- I believe the timestamp zero essentially sets the center point for the acquisition; @attila will be better able to comment on setting a percentage of the acquisition around the zero timestamp.

And speaking of that Recording dialog, is it documented anywhere? What does the Noise checkbox do? -- I can't personally find direct documentation on the Recording Dialog, but I believe the noise button will acquire the detected noise samples in half the buffer, presuming it works the same way as described in the Scope section.

I don't know the answers to your other two questions on the what happens to the previous buffers and the setting of the sample size, so I will defer to Attila for those questions (and any corrections that he makes on my previous answers as well).

Thanks,
JColvin

 

Link to comment
Share on other sites

James hinted at this but just to be clear there are two areas where you can find reference material for Digital Discovery.

The Digital Discover reference center focuses on the Digital Discovery hardware and links to the  Digital Discovery hardware reference manual.

Since the WaveForms software works with many Digilent products it is documented separate from the hardware in the WaveForms reference center and it links to the WaveForms reference manual.

 

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...