151-0153 Rabbit Semiconductor, 151-0153 Datasheet - Page 85
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: 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 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: