参数资料
型号: 101-0478
厂商: Rabbit Semiconductor
文件页数: 16/90页
文件大小: 0K
描述: KIT DEV RABBIT RCM2200 INTL
标准包装: 1
系列: RabbitCore 2000
类型: MPU 模块
适用于相关产品: RCM2200
所含物品: RabbitCore 模块,开发板,缆线和 Dynamic C? CD-Rom
User’s Manual
17
3.1.4.2 FLASHLEDS.C
In addition to Dynamic C’s implementation of C-language programming for embedded
systems, it supports assembly-language programming for very efficient processor-level
control of the module hardware and program flow. This application is similar to
FLASHLED.C
and TOGGLELED.C, but uses assembly language for the low-level port con-
trol within cofunctions, another powerful multitasking tool.
Dynamic C permits the use of assembly language statements within C code. This program
creates three functions using assembly language statements, then creates a C cofunction to
call two of them. That cofunction is then called within main().
Within each of the C-like functions, the #asm and #endasm directives are used to indicate
the beginning and end of the assembly language statements.
In the function initialize_ports( ), port A is initialized to be all outputs while bit 0
of port E is initialized to be an output.
In the function ledon(), a 0 is written to the port A bit corresponding to the desired LED
(0, which equals DS3, or 1 which equals DS4), turning that LED on. The ledoff( )
function works exactly the same way except that a 1 is written to the bit, turning the
selected LED off.
Finally, in the cofunction flashled(), the LED to be flashed, the on time in millisec-
onds, and the off time in milliseconds are passed as arguments. This function uses an end-
less for(;;) loop to call the ledon() and ledoff() functions, separated by calls to
the wait function DelayMs(). This sequence will make the indicated LED flash on and
off.
As is proper in C program design, the contents of main() are almost trivial. The program
first calls initialize_ports(), then begins an endless for(;;) loop. Within this
loop, the program:
1. Calls the library function hitwd(), which resets the microprocessor’s watchdog timer.
(If the watchdog timer is not reset every so often, it will force a hard reset of the sys-
tem. The purpose is to keep an intermittent program or hardware fault from locking up
the system. Normally, this function is taken care of by the virtual driver, but it is called
explicitly here).
2. Sets up a costatement which calls two instances of the flashled() function, one for
each LED. Note that one LED is flashed one second on, one-half second (500 ms) off,
while the other is flashed in the reverse pattern.
Note also the wfd keyword in the costatement. This keyword (an abbreviation for wait-
fordone
, which can also be used) must be used when calling cofunctions. For a complete
explanation, see Section 5 and 6 in the Dynamic C User’s Manual.
More Information
See the entries for the hitwd() and DelayMs() functions in the Dynamic C User’s
Manual, as well as those for the directives #asm and #endasm. For a complete explana-
相关PDF资料
PDF描述
RBC20DRXH CONN EDGECARD 40POS DIP .100 SLD
N001-005-BK-R CABLE PATCH CAT5E BLACK 5'
SDR-BK SCOTCH CODE REFILL BLACK
94SVPD186X0035F8 CAP ALUM 18UF 35V 20% SMD
GCC18DCMT-S288 CONN EDGECARD 36POS .100 EXTEND
相关代理商/技术参数
参数描述
101048 制造商:Jacob 功能描述:Bulk
10-1-048 制造商:IGUS 功能描述:SERIES 10 ENERGY CHAIN
101-0480 功能描述:开发板和工具包 - 其他处理器 RCM2300 DEV KIT RoHS:否 制造商:Freescale Semiconductor 产品:Development Systems 工具用于评估:P3041 核心:e500mc 接口类型:I2C, SPI, USB 工作电源电压:
101-048-033 制造商:PANCON CONNECTORS 功能描述:Conn Shrouded Header HDR 48 POS 5.08mm Solder RA Thru-Hole 制造商:ITW Pancon 功能描述:Conn Shrouded Header HDR 48 POS 5.08mm Solder RA Thru-Hole
101-0481 功能描述:KIT DEV RABBIT RCM2300 INTL RoHS:否 类别:编程器,开发系统 >> 通用嵌入式开发板和套件(MCU、DSP、FPGA、CPLD等) 系列:RabbitCore 2000 产品培训模块:Blackfin® Processor Core Architecture Overview Blackfin® Device Drivers Blackfin® Optimizations for Performance and Power Consumption Blackfin® System Services 特色产品:Blackfin? BF50x Series Processors 标准包装:1 系列:Blackfin® 类型:DSP 适用于相关产品:ADSP-BF548 所含物品:板,软件,4x4 键盘,光学拨轮,QVGA 触摸屏 LCD 和 40G 硬盘 配用:ADZS-BFBLUET-EZEXT-ND - EZ-EXTENDER DAUGHTERBOARDADZS-BFLLCD-EZEXT-ND - BOARD EXT LANDSCAP LCD INTERFACE 相关产品:ADSP-BF542BBCZ-4A-ND - IC DSP 16BIT 400MHZ 400CSBGAADSP-BF544MBBCZ-5M-ND - IC DSP 16BIT 533MHZ MDDR 400CBGAADSP-BF542MBBCZ-5M-ND - IC DSP 16BIT 533MHZ MDDR 400CBGAADSP-BF542KBCZ-6A-ND - IC DSP 16BIT 600MHZ 400CSBGAADSP-BF547MBBCZ-5M-ND - IC DSP 16BIT 533MHZ MDDR 400CBGAADSP-BF548BBCZ-5A-ND - IC DSP 16BIT 533MHZ 400CSBGAADSP-BF547BBCZ-5A-ND - IC DSP 16BIT 533MHZ 400CSBGAADSP-BF544BBCZ-5A-ND - IC DSP 16BIT 533MHZ 400CSBGAADSP-BF542BBCZ-5A-ND - IC DSP 16BIT 533MHZ 400CSBGA