Wiki

The most recent version of this page is a draft.DiffThis version is outdated by a newer approved version.DiffThis version (11 Aug 2017 15:47) was approved by amiclaus.The Previously approved version (21 Jun 2017 12:34) is available.Diff

This is an old revision of the document!


Scopy Pattern Generator

General Description

The pattern generator instrument can be used to generate output from the M2K with user configurable parameters. It consists of 3 parts:

  • Channel manager
  • Signals Plot
  • Control Panel

{{ :university:tools:m2k:scopy:pg_3.png?300 | The Run button starts the pattern generation. The Single button should start a single shot generation, but it is not currently implemented. The gearwheel button activates the general settings menu in the control panel. The sliders button activates the pattern settings menu in the control panel. The plot shows a preview of the generated signals by the pattern generator. For the enabled channels, the generated waveform is shown. For channel groups (groups of one or more channels) a “decoder” is displayed and has the purpose to graphically represent the binary value of the channel group. The channel manager panel lists all available channels on the device, and allows the user to create custom channel configurations.

The user can enable channels by clicking the button, setting the channel as an output. The channel name is shown in the second column of the channel manager. This name can be changed from the control panel The channel number is in the third column. This is the actual DIO number of the device. The select button is used to merge multiple channels together into a channel group. Channel groups are used to generate more complex patterns that span over multiple channels.

In order to create a channel group, select multiple channels and click the button.

The buttons can be used to remove a channel from the channel group or to dissolve the channel group (if the button next to the channel group is clicked). The channel group can also be dissolved if the user selects the channel group and clicks the button. Channel groups can be merged with other channels or channel groups by applying the same procedure as before, select channels and channel groups and group them. An alternative to the select/group mechanism is to drag and drop elements in the channel manager like this: An advantage dragging and dropping elements over using select/group mechanism is that it allows the user to reorder the elements in an intuitive way.

The button hides elements that are not enabled, showing only the enabled elements in the channel manager and plot. Whenever an element in the channel manager is clicked, it becomes highlighted. The highlighted element has a darker tint in the channel manager and the associated waveform in the plot is enclosed within two vertical white lines. The highlighted element indicates that settings in the control panel apply to this element.

The control panel allows the user to set the parameters of the waveform to be generated. The buttons allow navigation through the channel manager. The Pattern combobox allows the user to select one of the currently implemented patterns.
The currently implemented patterns are:

  • Clock – generates a clock signal having user selectable frequency, phase and duty cycle.
  • Random – generates random values at a user selectable frequency.
  • Binary Counter – generates a binary counter on the channels in the channel group.
  • UART – generates a UART message.

The Name editbox changes the name of the channel/channelgroup.




Use cases

Enable & run one channel

Click to display ⇲

Click to hide ⇱

1. Enable channel 0 - by default channel 0 will generate a 5khz clock signal

2. Start pattern generator

3. Connect channel 0 to the oscilloscope

4. Stop pattern generator

5. Modify parameters - set frequency to 1MHz, 70% duty cycle


6. Run pattern generator

Create a 4 channel binary counter

Click to display ⇲

Click to hide ⇱

3.1 Select multiple channels Select multiple channels by clicking the empty rectangle next to the channels

3.2 Create group Click the “group with selected” button

3.3 Make sure channel group is enabled It should look something like this. If it’s not enabled, enable it by clicking the left enable button.

3.4 Select Binary Counter pattern From the right menu, select

3.5 The plot should resemble a binary counter

3.6 Start pattern generation 3.7 Using the scope verify channels 0 and 1

3.8 Using the Scopy's logic analyzer (or an external tool) verify channels 0,1,2,3

Channel group shuffling

Click to display ⇲

Click to hide ⇱

4.1 Make sure the state of the instrument is the one at step (1 channelgroup with channels 0,1,2,3, binary counter, 5kHz, stopped) Create a 4 channel binary counter

4.2 Drag and drop Channel 6 in between channels 1 and 2 inside the channel group like in gif

4.3 Drag and drop channel 3 from the channel group inbetween channels 0 and 1 like in gif “pg-2.gif”

4.4 The instrument should look like this

4.5 Select the channel group and channels 4 and 5 and click group with selected

4.6 Using the logic analyzer verify channels 0-6

Using drag and drop to create channel groups

Click to display ⇲

Click to hide ⇱

1. Drag and drop channel 12 onto channel 9 like in gif “pg-3”. You should let go of the mouse button when the blue highlight shows up.

2. Select the newly created channel groups with channel 10 and 11 and group them (like in the previous steps)

3. Enable the channel group

4. Select channel group by clicking on it in the channel manager

5. Select random pattern in the settings

6. Start pattern generation

7. Using logic analyzer verify lines 9,10,11,12. They pattern generated should be the same as in Scopy

Hide inactive & colors & other UI

Click to display ⇲

Click to hide ⇱

1. Select a channel group by clicking it in the channel manager. Set name in the channel group settings to “BinCntGrp”

2. Select a channel inside the channel manager. Change name to “DIOZERO” in the channel settings.

3. Select LOW color as white, select HIGH color as orange from channel settings.

4. Select “Hide Inactive” Scopy should look similar to this:

5. Start pattern generation The signals should be generated the same way even though the inactive channels are missing.

6. Show all Show all channels. Signals are generated in the same fashion

Change settings while running

Click to display ⇲

Click to hide ⇱

1. Channels can be modified/enabled/disabled while running. The pattern generator will reconfigure and resume running the patterns. While reconfiguring, all pins of the M2K will be taken high impedance in the meantime.

Single-shot generation

Click to display ⇲

Click to hide ⇱

1. Select single

Clicking single shot will generate a single buffer and then switch all pins to high impedance.

Special patterns

Click to display ⇲

Click to hide ⇱

1. Enable a channel and set UART pattern

2. Set parameters 9600, 8 bits, 1 stop bit, no parity, text “HELLO”

3. Select channel 15 only and group with selected ( this will create a one-channel group with decoder) The UART decoder should pop up over channel 15

4. Monitor the channel in the logic analyzer. Use UART decoder. Alternatively use a serial terminal connected to the channel.

5. Create a 3-channel group and select SPI pattern. Set SPI parameters at will, but make sure you send some data.

6. Monitor the channels and use a SPI decoder

7. The channels should resemble the SPI pattern.

Reset Instrument

Click to display ⇲

Click to hide ⇱

1. Go to instrument settings in the pattern generator

2. Click the Reset Instrument button

3. The pattern generator should return to it’s initial state.

?500

Return to Scopy Main Page

university/tools/m2k/scopy/pattgen.1502459251.txt.gz · Last modified: 11 Aug 2017 15:47 by amiclaus