Embedded Target for Texas Instruments C6000 DSPs | ![]() ![]() |
Simulate or read the user-defined DIP switches on the C6711 DSK
Library
c6711dsklib in Embedded Target for TI C6000 DSP
Description
Added to your model, this block behaves differently in simulation than in code generation and targeting.
Simulation--the options USER_SW1, USER_SW2, and USER_SW3 generate output to simulate the settings of the user-defined dual inline pin (DIP) switches on your C6711 DSK. 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 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.
Selecting the Integer data type results in the switch settings generating integers 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 USER_SW1 status represented by the least significant bit (LSB) and the status of USER_SW3 represented by the most significant bit (MSB).
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-8. Your process uses the result in the same way whether in simulation or in code generation. In code generation and when running your application, the block code ignores the settings for USER_SW1, USER_SW2, and USER_SW3 in favor of reading the hardware switch settings. When the block reads the DIP switches, it reports the results as either a Boolean string or an integer value as Table 6-8, Output Values From The User DIP Switches on the C6711 DSK shows
Dialog Box
![]() | C6711 DSK DAC | C6711 DSK LED | ![]() |