151-0153 Rabbit Semiconductor, 151-0153 Datasheet - Page 89
151-0153
Manufacturer Part Number
151-0153
Description
ASSEMBLY - RABBITFLEX CABLES
Manufacturer
Rabbit Semiconductor
Series
RabbitFLEX™r
Datasheet
1.20-151-0178.pdf
(162 pages)
Specifications of 151-0153
Accessory Type
Cable Assembly
For Use With/related Products
BL300F
Lead Free Status / RoHS Status
Vendor undefined / Vendor undefined
- Current page: 89 of 162
- Download datasheet (4Mb)
Note that as we iterate through the loop, we keep track of the switch, LED, and switch number that we are
on. Incrementing the switch_pressed and led pointers will make them point to the next member in
the respective group.
Now we begin switch debouncing. We wait 50 ms, and then check if the switch has been pressed again.
Note that switch_pressed indicates which pin has been pressed—this is one of the results from the
loop above. However, switch_pressed is a double pointer (Flex_IOPin **), whereas
flexDigIn() expects a single pointer (Flex_IOPin *). Therefore, we need to dereference
switch_pressed in the call to flexDigIn().
At this point, the code here is very similar to the debouncing code in the previous section. The only differ-
ences are the references to switch_pressed and led. Because those variables are now both double
pointers, we must dereference them when making calls to flexDigIn() and flexDigOut().
This section demonstrated how to use the grouping functionality in the RabbitFLEX API. The techniques
described in this chapter should now have given you a running start to implementing your own Rabbit-
FLEX applications.
RabbitFLEX User’s Manual
}
}
// Wait 50 ms to make sure the switch stays pressed (debouncing)
waitfor(DelayMs(50));
// Check if the switch is still pressed
if (flexDigIn(*switch_pressed) == 1) {
}
//
flexDigOut(*led, 0);
//
flexToneLoad(tones[switchnum], tone_len[switchnum], REPEAT_TONE);
while (1) {
} // end of while loop
Light the corresponding output LED
Play the tone
// 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
83
Related parts for 151-0153
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
CONN ADAPTER BOARD 2MM TO .100"
Manufacturer:
Rabbit Semiconductor
Datasheet:
Part Number:
Description:
IC CPU RABBIT2000 30MHZ 100PQFP
Manufacturer:
Rabbit Semiconductor
Datasheet:
Part Number:
Description:
IC CPU RABBIT4000 128-LQFP
Manufacturer:
Rabbit Semiconductor
Datasheet:
Part Number:
Description:
IC MPU RABIT3000A 55.5MHZ128LQFP
Manufacturer:
Rabbit Semiconductor
Datasheet:
Part Number:
Description:
MODULE RABBITCORE RCM4010
Manufacturer:
Rabbit Semiconductor
Datasheet:
Part Number:
Description:
RCM4110 RABBITCORE
Manufacturer:
Rabbit Semiconductor
Datasheet:
Part Number:
Description:
MODULE RABBITCORE RCM2000
Manufacturer:
Rabbit Semiconductor
Datasheet:
Part Number:
Description:
MODULE RABBITCORE RCM3000
Manufacturer:
Rabbit Semiconductor
Datasheet:
Part Number:
Description:
MCU RCM4000 RABBITCORE
Manufacturer:
Rabbit Semiconductor
Datasheet:
Part Number:
Description:
MODULE RCM4210 RABBITCORE
Manufacturer:
Rabbit Semiconductor
Datasheet:
Part Number:
Description:
MODULE RCM4200 RABBITCORE
Manufacturer:
Rabbit Semiconductor
Datasheet:
Part Number:
Description:
MODULE RABBITCORE RCM2020
Manufacturer:
Rabbit Semiconductor
Datasheet: