20-151-0178 Rabbit Semiconductor, 20-151-0178 Datasheet - Page 85
![CABLE CONVERTER RS-232 TO USB](/photos/8/97/89711/20-151-0178_sml.jpg)
20-151-0178
Manufacturer Part Number
20-151-0178
Description
CABLE CONVERTER RS-232 TO USB
Manufacturer
Rabbit Semiconductor
Datasheet
1.20-151-0178.pdf
(162 pages)
Specifications of 20-151-0178
Accessory Type
USB to RS232 Adapter
Product
Microcontroller Accessories
For Use With/related Products
Rabbit-based Boards
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Other names
20-151-0178
316-1181
316-1181
- Current page: 85 of 162
- Download datasheet (4Mb)
Since we have accepted the switch press and turned on the corresponding LED, then we might as well play
the tone. We use the switchnum variable that we saved earlier to choose the tone to play.
This last section implements debouncing on switch release. We wait until the switch is released, and then
check the switch again 200 ms later. If the switch is still released, then we turn off the corresponding LED
and we break out of the while loop. The costatement starts over again, which means that we again monitor
all of the switches.
This concludes the main while() loop. With these changes, we can now use the switches on the demo
board to play a tone and light a corresponding LED.
6.4.3 Extending speaker_tone.c with I/O Grouping
In this section, we will make further changes to speaker_tone.c to use RabbitFLEX I/O grouping.
This will make the resulting code somewhat more flexible, and will demonstrate how to use I/O groups.
First, we need to declare some variables.
Note that switch_pressed and led are now double pointers (Flex_IOPin **). This is because
we will be using these variables to iterate through a group (or array) of Flex_IOPin* pointers. This will
become more apparent as we walk through this sample.
We have also created switch_values and value variables, which we will explain later.
RabbitFLEX User’s Manual
}
Flex_IOPin **switch_pressed;
Flex_IOPin **led;
int switchnum;
unsigned int switch_values;
unsigned int value;
static const Flex_IOPin *switches[] = {
};
}
&flex_digin31,
&flex_digin33,
&flex_digin35,
&flex_digin37,
FLEX_GROUP_END
}
while (1) {
}
// Wait for the switch to be released
waitfor(flexDigIn(switch_pressed) == 0);
// Wait additional 200 ms
waitfor(DelayMs(200));
// If the switch is still released, then break out of the while loop
if (flexDigIn(switch_pressed) == 0) {
}
// Turn the LED back off
flexDigOut(led, 1);
break;
www.rabbit.com
79
Related parts for 20-151-0178
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
![20-151-0101](/images/no-image3.png)
Part Number:
Description:
Microcontroller Modules & Accessories Assy Download 1.27MM and 2MM Pitch Cbles
Manufacturer:
Rabbit Semiconductor
![3057P-1-203](/photos/16/51/165126/3057_tmb.jpg)
Part Number:
Description:
Trimmer Resistors - Multi Turn 20Kohms 5% 1 1/4 PC Mount
Manufacturer:
Bourns Inc.
Datasheet:
![PCF8576CH/1](/images/manufacturer_photos/0/4/487/nxp_semiconductors_tmb.jpg)
Part Number:
Description:
LCD Drivers 160 SEGMENT LCD SEGMENT DRIVER
Manufacturer:
NXP Semiconductors
![350218-1](/photos/30/72/307284/pr350218-1_l_tmb.jpg)
Part Number:
Description:
20-24 awg TIN PIN REEL M-N-L
Manufacturer:
TE Connectivity
Datasheet:
![PCF2127AT/1,512](/images/manufacturer_photos/0/4/487/nxp_semiconductors_tmb.jpg)
Part Number:
Description:
IC REAL TIME CLK/CALENDAR 20SOIC
Manufacturer:
NXP Semiconductors
Datasheet:
![PCF2129AT/1,512](/images/manufacturer_photos/0/4/487/nxp_semiconductors_tmb.jpg)
Part Number:
Description:
IC REAL TIME CLK/CALENDAR 20SOIC
Manufacturer:
NXP Semiconductors
Datasheet:
![PCF2127AT/1,518](/images/manufacturer_photos/0/4/487/nxp_semiconductors_tmb.jpg)
Part Number:
Description:
IC RTC/CALENDAR TCXO QTZ 20SOIC
Manufacturer:
NXP Semiconductors
Datasheet:
![NTD3055L104-1](/images/manufacturer_photos/0/4/495/on_semiconductor_tmb.jpg)
Part Number:
Description:
Manufacturer:
ON Semiconductor
Datasheet:
![SC3306Q-1](/images/manufacturer_photos/0/0/43/amcc__applied_micro_circuits_corp__tmb.jpg)
Part Number:
Description:
20-OUTPUT LVTTL CLOCK DRIVER
Manufacturer:
AMCC (Applied Micro Circuits Corp)
![SC3308Q-1](/images/manufacturer_photos/0/0/43/amcc__applied_micro_circuits_corp__tmb.jpg)
Part Number:
Description:
20-OUTPUT LVTTL CLOCK DRIVER
Manufacturer:
AMCC (Applied Micro Circuits Corp)
![SC3506Q-1](/images/manufacturer_photos/0/0/43/amcc__applied_micro_circuits_corp__tmb.jpg)
Part Number:
Description:
20-OUTPUT CLOCK DRIVER
Manufacturer:
AMCC (Applied Micro Circuits Corp)