Jump to content
  • 0

Simultaneous Pattern and Data Capture


stever

Question

13 answers to this question

Recommended Posts

Hi JColvin,

Thanks for the link.

My task is a little different (boundary scan chain testing). I want to output a digital pattern, once and only once. I don't find a way to stop it repeating except to set the time to match the number of samples in the sequence with the frequency. Not very convenient as I have multiple patterns of different length and may also need to experiment with the frequency.

At the same time, I need to synchronously capture digital data using the LA (unless you think the scope would be a better choice) on different pins. I don't need to do any protocol analysis as I will send the pattern data from a file and export the captured data to another file for offline checking.

Cheers

stever

Link to comment
Share on other sites

Hi @stever

Select Repeat 1 and check the "Auto Run" option in Patterns. This will adjust the Run length according the longest period from the configured signals. Like here to 20us for a custom patter of 20 samples at 1MHz.
Configure the Logic Analyzer for Normal trigger on Patterns.

image.png.4d258e17c24fecd28ccaff8fa040f654.png

Link to comment
Share on other sites

Hi Attila,

Thanks for the settings. I now get the correct single pattern. I have pattern frequency of 10MHz but not sure how that matches the LA sampling rate. The inputs selection seems to be at minimum 200MHz. How can I ensure the LA samples the data using the same clock as the PG ?

 

Cheers

stever

LA.thumb.png.e95497ba6083ee30180217d97156cfb7.png

Link to comment
Share on other sites

Hi again,

I am now trying to drive this with python scripting, referring the SDK and examples.

I have managed to get my pattern output but I cannot control it to only send it once.

I have run an example generating  pulse and analog acquisition and can set the number of repetitions in that but cannot get it to work with my custom pattern

for pin in range (0, 4):

      dwf.FDwfDigitalOutRepeatSet(hdwf, c_int(1))

      dwf.FDwfDigitalOutEnableSet(hdwf, c_int(pin_no), 1)

     dwf.FDwfDigitalOutEnableSet(hdwf, c_int(pin_no), 1)

     dwf.FDwfDigitalOutTypeSet(hdwf, c_int(pin_no), DwfDigitalOutTypeCustom)

     dwf.FDwfDigitalOutDividerSet(hdwf, c_int(pin_no),  c_uint(100000000))

    dwf.FDwfDigitalOutDataSet(hdwf, c_int(pin_no), pattern, c_int(8 * len(pattern)))

    dwf.FDwfDigitalOutConfigure(hdwf, c_int(1))

Link to comment
Share on other sites

Hi @stever

pattern = (4*c_byte)(*[0x10,0x32,0x54,0x76])
hzBase = c_double()
dwf.FDwfDigitalOutInternalClockInfo(hdwf, byref(hzBase)) # 100MHz
hzSampleRate = 1e8
divider = int(hzBase.value/hzSampleRate)
for pin in range (0, 4):
    dwf.FDwfDigitalOutEnableSet(hdwf, c_int(pin), 1)
    dwf.FDwfDigitalOutIdleSet(hdwf, c_int(pin), DwfDigitalOutIdleLow)
    dwf.FDwfDigitalOutTypeSet(hdwf, c_int(pin), DwfDigitalOutTypeCustom)
    dwf.FDwfDigitalOutOutputSet(hdwf, c_int(pin), DwfDigitalOutOutputPushPull)
    dwf.FDwfDigitalOutDividerSet(hdwf, c_int(pin),  c_uint(divider))
    dwf.FDwfDigitalOutDataSet(hdwf, c_int(pin), pattern, c_int(8* len(pattern)))# same pattern for each pin
# the following apply globally to each pin:
dwf.FDwfDigitalOutRepeatSet(hdwf, c_int(1))
dwf.FDwfDigitalOutRunSet(hdwf, c_double(8.0*len(pattern)*divider/hzBase.value))
dwf.FDwfDigitalOutConfigure(hdwf, c_int(1))

 

Link to comment
Share on other sites

Hi Attila,

I am finding the daya capture difficult.

I tried the DigitalIn_record and DigitalIn_Acquisition examples but I get a flat zero plot line.

It seems the sampled data is all zeros.

My understanding is that all the data lines are automatically sampled and there is no need to configure pins as inputs.

I have connected two of the output (counter) signals to other inputs to try but still get all zeros.

Thanks

stever

Link to comment
Share on other sites

I connected four LSBs of the configured output pins to the high speed inputs pins [3:0] and now get a graph that looks a bit like a counter but not uniform staeps 0 to 15 as epected.

Any comments ?

 

Output Plot.png

Link to comment
Share on other sites

More Information:

I had changed the duty cycle settings so that may have caused some odd behaviour.

I reset it to 50% and get a counter plot but with some glitches indicating the outputs do not all change at the same time.

I tried changing the input divider (set to '4' and saw some improvement.

How can I use the slower DIO pins to capture the data instead of the high speed pins and how can I synchronise the sampling clock with the output clock ?

Thanks

stever

Output Plot2.png

Output with divider=4.png

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...