This version (06 Jun 2018 13:44) was approved by Alexandra.The Previously approved version (11 Aug 2017 15:47) is available.Diff

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 buttons on top of the pattern generator are:

  • The Run button starts the pattern generation.
  • The Single button starts a single shot generation.
  • 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.
  • Number - generates a user selectable number
  • 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
  • SPI - generates a SPI message
  • I2C - generates an I2C message
  • Gray Counter - generates a gray counter on the channels in the channel group
  • Import - imports a CSV file and outputs it's content

The output combobox allows output drive selection between

  • PP - pushpull
  • OD - opendrain

The Name editbox changes the name of the channel/channelgroup. The thickness editbox changes the size of the channel/channelgroup in the plot The colors editboxes change the colors of the channel/channelgroup in the plot

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.

Return to Scopy Main Page

university/tools/m2k/scopy/pattgen.txt · Last modified: 16 May 2018 14:16 by ASuciu