First, open " />
參數(shù)資料
型號(hào): 20-101-0358
廠商: Rabbit Semiconductor
文件頁數(shù): 39/94頁
文件大?。?/td> 0K
描述: COMPUTER SINGLE-BOARD BL1820
標(biāo)準(zhǔn)包裝: 1
系列: Jackrabbit
模塊/板類型: 單板計(jì)算機(jī)模塊
適用于相關(guān)產(chǎn)品: BL1820
產(chǎn)品目錄頁面: 618 (CN2011-ZH PDF)
其它名稱: 316-1081
40
Jackrabbit (BL1800)
4.2.1 DEMOJR1.C
This sample program can be used to illustrate some of the functions of Dynamic C.
First, open the file DEMOJR1.C, which is in the SAMPLES/JACKRAB folder. The program
will appear in a window, as shown in Figure 15 below (minus some comments). Use the
mouse to place the cursor on the function name WrPortI in the program and type <Ctrl-H>.
This will bring up a documentation box for the function WrPortI. In general, you can do
this with all functions in Dynamic C libraries, including libraries that you write yourself—
the Dynamic C User’s Manual provides more information. Close the documentation box
and continue.
Figure 15. Sample Program DEMOJR1.C
To run the program DEMOJR1.C, load it with the File > Open menu, then compile and run it
by pressing F9 or by selecting Run in the Run menu. The LED on the Prototyping Board
should start flashing if everything went well. If this doesn’t work review the following points.
The target should be ready, which is indicated by the message “BIOS successfully com-
piled...” If you did not receive this message or you get a communication error, recom-
pile the BIOS by typing <Ctrl-Y> or select Recompile BIOS from the Compile menu.
A message reports that “No Rabbit processor detected” in cases where the Jackrabbit
and Prototyping Board are not connected together, the wall transformer is not con-
nected, or is not plugged in. (The red power LED lights whenever power is connected.)
main(){
WrPortI(SPCR,NULL,0x84);
WrPortI(PADR,&PADRShadow,0xff);
while(1) {
BitWrPortI(PADR,&PADRShadow,1,2);
for(j=0; j<25000; j++);
BitWrPortI(PADR,&PADRShadow,0,2);
for(j=0; j<1000; j++);
} // end while(1)
} //
end of main
C programs begin with main
write to SPCR register to
initialize parallel port A
to turn off all LEDs
Start a loop
Set bit 2 to a “1”
LED DS3 off.
Time delay by counting
to 25,000.
Set bit 2 to a “0”
turning LED DS3 on
Count to 1000 for a shorter
time delay
End of the endless loop
Note: See Rabbit 2000 Microprocessor User’s Manual
(Software Chapter) for details on the routines that read and
write I/O ports.
NULL is a macro for a zero pointer
Write all 1’s to port A
相關(guān)PDF資料
PDF描述
20-101-0446 MODULE RABBITCORE RCM2130
AT25256-10PI-2.7 IC EEPROM 256KBIT 3MHZ 8DIP
345-030-524-801 CARDEDGE 30POS DUAL .100 GREEN
345-030-524-204 CARDEDGE 30POS DUAL .100 GREEN
345-030-524-202 CARDEDGE 30POS DUAL .100 GREEN
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
20-101-0383 功能描述:模塊化系統(tǒng) - SOM RCM2020 RabbitCore RoHS:否 制造商:Digi International 外觀尺寸:ConnectCore 9P 處理器類型:ARM926EJ-S 頻率:150 MHz 存儲(chǔ)容量:8 MB, 16 MB 存儲(chǔ)類型:NOR Flash, SDRAM 接口類型:I2C, SPI, UART 工作電源電壓:3.3 V 最大工作溫度:+ 85 C 尺寸:1.97 in x 1.97 in x 6.1 in
20-101-0389 功能描述:子卡和OEM板 SR9200 16IN/8OUT RoHS:否 制造商:BeagleBoard by CircuitCo 產(chǎn)品:BeagleBone LCD4 Boards 用于:BeagleBone - BB-Bone - Open Source Development Kit
20-101-0390 功能描述:子卡和OEM板 SR9210 8 in/ 16 out RoHS:否 制造商:BeagleBoard by CircuitCo 產(chǎn)品:BeagleBone LCD4 Boards 用于:BeagleBone - BB-Bone - Open Source Development Kit
20-101-0391 功能描述:子卡和OEM板 SR9220 DIG I/O 8IN 8OUT RoHS:否 制造商:BeagleBoard by CircuitCo 產(chǎn)品:BeagleBone LCD4 Boards 用于:BeagleBone - BB-Bone - Open Source Development Kit
20-101-0392 功能描述:子卡和OEM板 SR9300 A/D 0-10V RoHS:否 制造商:BeagleBoard by CircuitCo 產(chǎn)品:BeagleBone LCD4 Boards 用于:BeagleBone - BB-Bone - Open Source Development Kit