20-151-0178 Rabbit Semiconductor, 20-151-0178 Datasheet - Page 83
![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: 83 of 162
- Download datasheet (4Mb)
Now we will go through each part of the while loop step-by-step.
Note that we are using a costate in this sample. The costate will allow us to more easily delay for imple-
menting switch debouncing. Also note that we set switch_pressed to NULL. Recall that
switch_pressed is of the type Flex_IOPin*. It will be used to point to a switch (or digital input)
that has been engaged. We initialize this to NULL, and will remain in the loop until a switch has been
pressed.
We have already seen that flexDigOut() manipulates digital outputs. Therefore, it is not surprising
that flexDigIn() manipulates digital inputs. In this case, flex_digin31 indicates the digital input
that the program is reading. Always remember that you must pass a pointer to the RabbitFLEX I/O struc-
tures, and not the structure itself.
If flexDigIn() indicates that flex_digin31 has been pressed, then we save off the switch that has
been pressed, the LED that we should turn on, and the number of the switch that has been pressed.
RabbitFLEX User’s Manual
} // end main while loop
while (1) {
} // end costate
costate {
} // end if statement
switch_pressed = NULL;
while (!switch_pressed) {
while (1) {
} // end while loop
if (flexDigIn(&flex_digin31)) {
}
else if (flexDigIn(&flex_digin33)) {
}
// 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) {
} // end if statement
switch_pressed = &flex_digin31;
led = &flex_digout32;
switchnum = 1;
switch_pressed = &flex_digin33;
led = &flex_digout34;
switchnum = 2;
// Turn the LED back off
flexDigOut(led, 1);
break;
www.rabbit.com
77
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)