20-151-0178 Rabbit Semiconductor, 20-151-0178 Datasheet - Page 80
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: 80 of 162
- Download datasheet (4Mb)
This function simply activiates the tone driver. Once enabled, it consumes about 10-20% of the system’s
processor time while running. Therefore, in a real program, you might want to activate and shutdown
(using flexToneShutdown()) the tone driver when needed.
The next section of code simply builds the waveforms for the five different tones and then displays a menu
of choices to the user. We will skip down to the next RabbitFLEX-related section of code.
This section of code begins with a while loop that checks for user input. Note in particular the
flexToneLoad() call—this loads the given tone and begins playing it. The “repeat” parameter is used
to indicate how many times the tone will be repeated ( 128 means to repeat indefinitely). Following the
above section are a number of other “case” statements that load other tones and implement other com-
mands. We will skip them.
Finally, after the user has chosen to exit the program, the
called. This disables the tone driver and frees the processor for handling other tasks.
6.4.2 Extending speaker_tone.c
speaker_tone.c shows how to use the tone driver, but can we combine it with some of the other Rab-
bitFLEX I/O functionality? In this section, we will add the ability to select the tone to play via a digital
input switch, and light up a corresponding digital output LED when we select a tone.
To implement this sample, we need appropriate digital inputs and outputs. We will use the demo board
from the RabbitFLEX toolkit. We will use each of the four switches and LEDs. We will connect the
switches directly to 1.4V TTL Threshold digital inputs, and the LEDs directly to 100mA sinking driver,
40V max digital outputs.
74
// Activate the tone system
flexToneActivate();
// Continue until the user requests to exit the program
while (!request_exit) {
// Turns off the tone system. This frees up the processor for other
// tasks, but in this case, we're just exiting the program.
flexToneShutdown();
ch = getchar();
// Perform the user command
switch (ch) {
case '0':
// Play the raspy tone
flexToneLoad(tones[0], tone_len[0], repeat);
break;
www.rabbit.com
flexToneShutdown()
Applications Programming
function is
Related parts for 20-151-0178
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
Microcontroller Modules & Accessories Assy Download 1.27MM and 2MM Pitch Cbles
Manufacturer:
Rabbit Semiconductor
Part Number:
Description:
Trimmer Resistors - Multi Turn 20Kohms 5% 1 1/4 PC Mount
Manufacturer:
Bourns Inc.
Datasheet:
Part Number:
Description:
LCD Drivers 160 SEGMENT LCD SEGMENT DRIVER
Manufacturer:
NXP Semiconductors
Part Number:
Description:
20-24 awg TIN PIN REEL M-N-L
Manufacturer:
TE Connectivity
Datasheet:
Part Number:
Description:
IC REAL TIME CLK/CALENDAR 20SOIC
Manufacturer:
NXP Semiconductors
Datasheet:
Part Number:
Description:
IC REAL TIME CLK/CALENDAR 20SOIC
Manufacturer:
NXP Semiconductors
Datasheet:
Part Number:
Description:
IC RTC/CALENDAR TCXO QTZ 20SOIC
Manufacturer:
NXP Semiconductors
Datasheet:
Part Number:
Description:
Manufacturer:
ON Semiconductor
Datasheet:
Part Number:
Description:
20-OUTPUT LVTTL CLOCK DRIVER
Manufacturer:
AMCC (Applied Micro Circuits Corp)
Part Number:
Description:
20-OUTPUT LVTTL CLOCK DRIVER
Manufacturer:
AMCC (Applied Micro Circuits Corp)
Part Number:
Description:
20-OUTPUT CLOCK DRIVER
Manufacturer:
AMCC (Applied Micro Circuits Corp)