First, open " />
參數(shù)資料
型號: 101-0558
廠商: Rabbit Semiconductor
文件頁數(shù): 39/94頁
文件大?。?/td> 0K
描述: COMPUTER SNG BD BL1800 512K SRAM
標(biāo)準(zhǔn)包裝: 10
系列: SBC
模塊/板類型: 單板計(jì)算機(jī)模塊
適用于相關(guān)產(chǎn)品: BL1800
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描述
396-036-526-204 CARD EDGE 36POS DL .125X.250 BLK
396-036-526-202 CARD EDGE 36POS DL .125X.250 BLK
101-0411 INTERFACE 12KEYDISP ETHNT OP6700
AT24C02A-10PI-2.7 IC EEPROM 2KBIT 400KHZ 8DIP
AT24C02A-10PI-1.8 IC EEPROM 2KBIT 400KHZ 8DIP
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
10105584 制造商:Amphenol Corporation 功能描述:10-341374-222 - Bulk
101055OO 制造商:TE Connectivity 功能描述:
101056084S 制造商:Amphenol Aerospace 功能描述:CONNECTOR
101-0561 功能描述:模塊化系統(tǒng) - SOM RCM3400 RABBITCORE RoHS:否 制造商:Digi International 外觀尺寸:ConnectCore 9P 處理器類型:ARM926EJ-S 頻率:150 MHz 存儲容量:8 MB, 16 MB 存儲類型:NOR Flash, SDRAM 接口類型:I2C, SPI, UART 工作電源電壓:3.3 V 最大工作溫度:+ 85 C 尺寸:1.97 in x 1.97 in x 6.1 in
10-105610-02S 制造商:Amphenol Aerospace 功能描述:PLUG