Creating/Editing File Stimulus

15.3.1 Creating/Editing File Stimulus

Select Debugger>Stimulus Controller and then click the File Stimulus tab. A File Stimulus file is composed of one or more Synchronous Stimulus files. A Synchronous Stimulus file contains information on triggers used for applying stimulus to either a pin or register. Register stimulus is specified in a Register Stimulus file.

MyStimulus.fsti

SyncStimulus1.ssti SyncStimulus2.ssti

TRISBStimulus.rsti SyncStimulus3.ssti TRISBStimulus.rsti T1CONStimulus.rsti

• Creating/Editing a File Stimulus File (.fsti) • Creating/Editing a Synchronous Stimulus File (.ssti) • Creating/Editing a Register Stimulus File (.rsti)

DS51519A-page 200

 2005 Microchip Technology Inc.

Using Stimulus – PIC17 Devices

15.3.1.1 CREATING/EDITING A FILE STIMULUS FILE (.FSTI)

A file stimulus file consists of one or more synchronous stimulus files (*.ssti) that will be applied to the simulator.

To create a file stimulus file:

1. Create or open one or more synchronous stimulus files in the file list (below the tab).

2. Click Save Setup under File Stimulus. To edit an existing file stimulus file:

1. Click Load Setup under File Stimulus to open an existing file stimulus file.

2. Use the file list and “Input Files” buttons Add and Remove to edit the list.

15.3.1.2 CREATING/EDITING A SYNCHRONOUS STIMULUS FILE (.SSTI)

1. If there are no stimulus files listed in the file list (below the tab), click Add under “Input Files” to open the Open file dialog. Browse to a location to create a new file or to edit an existing file. To create a new stimulus file, enter a name and click Open. To open an existing stimulus file for editing, click on it to select it and click Open. The stimulus file location and name should now appear in the file list.

2. Click on the stimulus file in the list to select it for editing. Then click Edit. If you realize you have selected the wrong file, click Cancel and then select another file.

3. For a new file, click Add Row to create a new row for entering data.

4. Click in the “Trigger On” column of the table row for which you wish to add or change data. Select or change the type of trigger (Cycles and PC). Depending on the trigger type, each cell gets an appropriate control which allows you to specify the value of that cell.

Cycles Setup

a) Click on “Trig Value” to set the cycle count at which the trigger fires.

b) From “Pin/Register”, choose the pin to which the value in the next column will

be applied when the trigger fires. The actual pin names available depend on the device selected.

Note: Do not choose a register. It will not work with cycle stimulus.

c) Click on “Value” and enter or change a value to be applied when the trigger occurs. For a Pin, either 0 or 1. These values will be applied in turn, one at each trigger event.

d) For setting up additional pins, click Add Column to add “Pin/Register” and

“Value” columns.

e) Click on “Comments” to enter or change a text string which will be saved and

restored in the file.

 2005 Microchip Technology Inc.

DS51519A-page 201

MPLAB ® IDE User’s Guide

PC Setup

a) Click on “Trig Value” to set the PC address at which the trigger fires.

b) From “Pin/Register”, choose the register to which the value in the next column will be applied when the trigger fires. The actual register names available depend on the device selected.

Note: Do not choose a pin. It will not work with PC stimulus.

Note: You cannot inject file values into port registers, e.g., PORTB. Use pin values. Also, you cannot inject file values into the W register.

c) Click on “Value” and enter or change a value to be applied when the trigger occurs. For a Register, the name of a file ( *.rsti) which contains a sequence of values. These values will be applied in turn, one at each trigger event.

d) Click on “Comments” to enter or change a text string which will be saved and

restored in the file.

e) For register stimulus, you may only have one stimulus file attached to one register and vice versa. If you add additional rows/columns, only the last occurrence will be executed.

f) If you wish to remove a row, click on a cell in the row to select the row and

then click Delete Row.

5. When you are done, click Save to save the synchronous stimulus file.

15.3.1.3 CREATING/EDITING A REGISTER STIMULUS FILE (.RSTI)

A register stimulus file contains register stimulus information in hexadecimal, return-delimited format. Any text editor or spreadsheet application may be used to create or edit this file. The default extension is .rsti, but any extension may be used. Assign a register stimulus file to a register in the Value column of a Synchronous Stimulus file (*.ssti).

Note: You may only have one register stimulus file assigned to one register at a

time.

EXAMPLE 15-1:

REGISTER STIMULUS FILE