Embedded Target for Texas Instruments C6000 DSPs    
C6701 EVM DIP Switch

Simulate or read the user-defined DIP switches on the C6701 EVM

Library

c6701evmlib in Embedded Target for TI C6000 DSP

Description

Added to your model, this block behaves differently in simulation than in code generation and targeting.

In simulation--the options USER0, USER1, and USER2 generate output to simulate the settings of the user-defined dual inline pin (DIP) switches on your C6701 EVM. Each option turns the associated DIP switch on when you select it. The switches are independent of one another.

By defining the switches to represent actions on your target, DIP switches let you modify the operation of your simulated process by reconfiguring the switch settings.

Use the Data type to specify whether the DIP switch options output an integer or a logical string of bits to represent the status of the switches. The table that follows presents all the option setting combinations with the result of your Data type selection.

Table 6-4: Option Settings to Simulate the User DIP Switches on the C6701 EVM
USER0 (LSB)
USER1
USER2 (MSB)
Boolean Output
Integer Output
Cleared
Cleared
Cleared
000
0
Selected
Cleared
Cleared
001
1
Cleared
Selected
Cleared
010
2
Selected
Selected
Cleared
011
3
Cleared
Cleared
Selected
100
4
Selected
Cleared
Selected
101
5
Cleared
Selected
Selected
110
6
Selected
Selected
Selected
111
7

Selecting the Integer data type results in the switch settings generating an integer in the range from 0 to 7 (uint8), corresponding to converting the string of individual switch settings to a decimal value. In the Boolean data type, the output string presents the separate switch setting for each switch, with the status of USER0 represented by the least significant bit (LSB) and the USER2 status represented by the most significant bit (MSB).

In code generation and targeting--the code generated by the block reads the physical switch settings of the user switches on the board and reports them as shown in Table 6-5. Your process uses the result in the same way whether simulating a process or generating code. In code generation and when running your application, the block code ignores the settings for USER0, USER1, and USER2 in favor of the hardware switch settings. When the block reads the switch settings, it reports the status as shown in Table 6-5, Output Values From the User DIP Switches on the C6701 EVM.

Table 6-5: Output Values From the User DIP Switches on the C6701 EVM
USER0 (LSB)
USER1
USER2 (MSB)
Boolean Output
Integer Output
Off
Off
Off
000
0
On
Off
Off
001
1
Off
On
Off
010
2
On
On
Off
011
3
Off
Off
On
100
4
On
Off
On
101
5
Off
On
On
110
6
On
On
On
111
7

Dialog Box

a

USER0
Simulate the status of the user-defined DIP switch on the board.
USER1
Simulate the status of the user-defined DIP switch on the board.
USER2
Simulate the status of the user-defined DIP switch on the board.
Data type
Determines how the block reports the status of the user-defined DIP switches. Boolean is the default, indicating that the output is a logical string of three bits.
Each bit represents the status of one DIP switch; the LSB is switch USER0 and the MSB is switch USER2. The other data type, Integer, converts the logical string to an equivalent unsigned 8-bit (uint8) decimal value. For example, if the logical string is 101, the decimal conversion yields 5.
Sample time
Specifies the time between samples of the signal. The default is 1 second between samples, for a sample rate of one sample per second (1/Sample time).

For further information about the user-defined DIP switches on the board, refer to your Texas Instruments TMS320C6201/6701 Evaluation Module Technical Reference.


  C6701 EVM DAC C6701 EVM LED