參數(shù)資料
型號: 20-101-0356
廠商: Rabbit Semiconductor
文件頁數(shù): 49/94頁
文件大小: 0K
描述: COMPUTER SINGLE-BOARD BL1800
標(biāo)準(zhǔn)包裝: 1
系列: Jackrabbit
模塊/板類型: 單板計算機模塊
適用于相關(guān)產(chǎn)品: BL1800
產(chǎn)品目錄頁面: 618 (CN2011-ZH PDF)
其它名稱: 316-1079
User’s Manual
49
The numbers in the left margin are reference indicators and are not a part of the code.
Load and run the program. Note that LED DS4 flashes once per second. Push button S1
several times and note how LED DS1 is toggled.
The flashing of LED DS4 is performed by the costatement starting at the line marked (2).
Costatements need to be executed regularly, often at least every 25 ms. To accomplish
this, the costatements are enclosed in a while loop. The term while loop is used as a handy
way to describe a style of real-time programming in which most operations are done in
one loop. The while loop starts at (1) and ends at (7). The function BigLoopTop() is
int vswitch;
// state of virtual switch controlled by button
S1
main(){
// begin main program
// set up parallel port A as output
WrPortI(SPCR,NULL,0x84);
WrPortI(PADR,&PADRShadow,0xff);
// turn off all LEDs
vswitch=0;
// initialize virtual switch off
(1) while (1) {
// Endless loop
BigLoopTop();
// Begin a big endless loop
// first task flash LED DS4 every second for 200 milliseconds
(2)
costate {
// begin a costatement
BitWrPortI(PADR,&PADRShadow,0,3);
// LED DS4 on
(3)
waitfor(DelayMs(200));
// light on for 200 ms
BitWrPortI(PADR,&PADRShadow,1,3);
// LED DS4 off
waitfor(DelayMs(800));
// light off for 800 ms
(4)
}
// end of costatement
// second task - debounce switch #1 and toggle virtual switch vswitch
// check button 1 and toggle vswitch on or off
costate {
(5)
if(BitRdPortI(PBDR,2)) abort;
// if button not down skip out
waitfor(DelayMs(50));
// wait 50 ms
if(BitRdPortI(PBDR,2)) abort;
// if button not still down skip
out
vswitch=!vswitch;
// toggle virtual switch- button was down 50
ms
while (1) {
// wait for button to be off 200 ms
waitfor(BitRdPortI(PBDR,2));
// wait for button to go up
waitfor(DelayMs(200));
// wait for 200 milliseconds
if(BitRdPortI(PBDR,2)) break;
// if button up break
}
// end of while(1)
}
// end of costatement
// make LED agree with vswitch if vswitch has changed
(6)
if( (PADRShadow & 1) == vswitch) {
BitWrPortI(PADR,&PADRShadow,!vswitch,0);
)
(7) }
// end of while loop, go back to start
}
// end of main, never come here
相關(guān)PDF資料
PDF描述
AT28C010-15JI IC EEPROM 1MBIT 150NS 32PLCC
AT28C010-15JC IC EEPROM 1MBIT 150NS 32PLCC
20-101-0436 MODULE RABBITCORE RCM2120
20-101-0404 MODULE RABBITCORE RCM2000
345-030-540-204 CARDEDGE 30POS DUAL .100 GREEN
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
20-101-0357 功能描述:單板計算機 BL1810 SINGLE BOARD COMPUTER RoHS:否 制造商:Ampro By ADLINK 外觀尺寸:EPIC 處理器類型:Intel Atom D510 頻率:1.66 GHz 存儲容量:2 GB (max) 存儲類型:DDR2, L2 Cache 接口類型:Ethernet, PS/2, SATA, Serial, USB 工作電源電壓:5 V, 12 V 功耗:13 W 最大工作溫度:+ 70 C 尺寸:165.1 mm x 114.3 mm
20-101-0358 功能描述:單板計算機 BL1820 RoHS:否 制造商:Ampro By ADLINK 外觀尺寸:EPIC 處理器類型:Intel Atom D510 頻率:1.66 GHz 存儲容量:2 GB (max) 存儲類型:DDR2, L2 Cache 接口類型:Ethernet, PS/2, SATA, Serial, USB 工作電源電壓:5 V, 12 V 功耗:13 W 最大工作溫度:+ 70 C 尺寸:165.1 mm x 114.3 mm
20-101-0383 功能描述:模塊化系統(tǒng) - SOM RCM2020 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
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