参数资料
型号: 20-151-0178
厂商: Rabbit Semiconductor
文件页数: 80/162页
文件大小: 0K
描述: CABLE CONVERTER RS-232 TO USB
标准包装: 1
附件类型: USB 至 RS232 适配器
适用于相关产品: 基于 Rabbit 的板
产品目录页面: 619 (CN2011-ZH PDF)
其它名称: 20-151-0178-ND
316-1181
// Activate the tone system
flexToneActivate();
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.
// Continue until the user requests to exit the program
while (!request_exit) {
ch = getchar();
// Perform the user command
switch (ch) {
case '0':
// Play the raspy tone
flexToneLoad(tones[0], tone_len[0], repeat);
break;
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.
// Turns off the tone system. This frees up the processor for other
// tasks, but in this case, we're just exiting the program.
flexToneShutdown();
Finally, after the user has chosen to exit the program, the flexToneShutdown() function is
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
Applications Programming
相关PDF资料
PDF描述
MAX11200EVKIT+ KIT EVALUATION FOR MAX11200
HCC06DRTF-S13 CONN EDGECARD 12POS .100 EXTEND
HK1608R47J-T INDUCTOR HI FREQ 470NH 5% 0603
PCM16XD0 PROCESSOR MODULE FOR MPLAB-ICE
SDR1006-681KL INDUCTOR POWER 680UH 0.28A SMD
相关代理商/技术参数
参数描述
20-151-0183 功能描述:处理器配件 UNIVL PWRSUPLY 12VDC 1A/W MOLEX MICROFIT3 RoHS:否 制造商:Olimex Ltd. 产品:Cable 用于:
2015103-1 制造商:TE CONNECTIVITY 功能描述:RF C/A, RT ANG QMA/DIN 1.0/2.3 CONN
2015-104 制造商:The Bergquist Company 功能描述:THERMAL PAD TO-3P PK5 制造商:The Bergquist Company 功能描述:THERMAL PAD, TO-3P, PK5 制造商:The Bergquist Company 功能描述:THERMAL PAD, TO-3P, PK5; Insulator Body Material:Silicone Elastomer; Thermal Conductivity:3.5W/m.K; Breakdown Voltage Vbr:4kV; Thickness:0.508mm; Volume Resistivity:100000Mohm-m; SVHC:No SVHC (19-Dec-2012); Electrical Property Ins /
2015-104 制造商:The Bergquist Company 功能描述:THERMAL PAD TO-3P 制造商:The Bergquist Company 功能描述:THERMAL PAD, TO-3P
201511 制造商:Phoenix Contact 功能描述:Misc Products