参数资料
型号: 101-0814
厂商: Rabbit Semiconductor
文件页数: 49/94页
文件大小: 0K
描述: COMPUTER SNG BD BL1810 512K SRAM
标准包装: 10
系列: SBC
模块/板类型: 单板计算机模块
适用于相关产品: BL1810
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
相关PDF资料
PDF描述
101-1007 MODULE POWERCORE FLEX 3810
101-1028 MODULE RABBITCORE RCM3750
101-1087 MODULE RABBITCORE RCM 3365
1B31AN IC SIGNAL COND STRAIN GAGE 28DIP
1B32AN IC SIGNAL COND HYBRID 28-DIP
相关代理商/技术参数
参数描述
101-0815 功能描述:单板计算机 SR9100 512K SRAM 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
101-0816 功能描述:KIT DEV RABBITCORE TCP/IP 2000 RoHS:否 类别:编程器,开发系统 >> 过时/停产零件编号 系列:* 标准包装:1 系列:- 类型:MCU 适用于相关产品:Freescale MC68HC908LJ/LK(80-QFP ZIF 插口) 所含物品:面板、缆线、软件、数据表和用户手册 其它名称:520-1035
101-0817 功能描述:单板计算机 BL2030 512K SRAM 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
101-0818 功能描述:单板计算机 BL2100 Fric Lk 512K 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
101-0820 功能描述:COMPUTER SGL-BD BL2000 SRAM/FLSH RoHS:否 类别:集成电路 (IC) >> 嵌入式 - 微控制器或微处理器模块 系列:SBC 产品目录绘图:DLP-245SY-G 标准包装:1 系列:USB 模块/板类型:开发板 适用于相关产品:USB 其它名称:813-1006