This program sets up EVA Timer 1, EVA Timer 2, EVB Timer 3 and EVB Timer 4 to fire an interrupt on a period overflow. A COUNT is kept each time each interrupt passes through the interrupt service routine.
上传时间: 2017-04-25
上传用户:fandeshun
HashTable实例 public class HashTable_msg { public HashTable_msg() { String sum_sql="select mobilenum,COUNT(*) from SJSJ_Msg where (left(in_date,6)=(select left(CONVERT(varchar(12) , getdate(), 112 ),6)))group by mobilenum" Hashtable<String,Integer> ht = new Hashtable<String,Integer>() try{ ResultSet rs= DBAccess.getInstance().select(sum_sql) while(rs!=null) { ht.put(rs.getString(1),rs.getInt(2)) rs.next() } } catch (Exception e) { Logs.printError(e) } } }
标签: HashTable_msg public HashTable sum_sql
上传时间: 2014-12-07
上传用户:a6697238
This experiment uses the Blackfi n BF533/BF537 EZ-KIT to run a simple FIR fi lter on stereo channels at a sampling frequency of 48 kHz. The CYCLE register is embedded in the main program ( process_data.c) to benchmark the time needed to process two FIR fi lters. A background telemetry channel (BTC) is set up to display the cycle COUNT.
标签: experiment Blackfi EZ-KIT channe
上传时间: 2013-12-27
上传用户:baiom
This example uses a timer to generate interrupt at a specific period. The timer event handler increments the event COUNT and prints in stdout.
标签: timer interrupt generate specific
上传时间: 2014-06-25
上传用户:h886166
1、用feng模块将选手按下按键信号输出高电平给锁存模块lockb,进行锁存的同时发出aim信号实现声音提示,并使COUNT模块进行答题时间的倒计时,在计满100妙后送出声音提示; 2、用ch41a模块将抢答结果转换为二进制数; 3、用sel模块产生数码管片选信号; 4、用ch42a模块将对应数码管片选信号,送出需要的显示信号; 5、用七段译码器dispa模块进行译码。
上传时间: 2013-12-21
上传用户:
Most satellite dish actuators send a series of pulses to indicate their position. By COUNTing pulses the positioner knows where the dish is pointing. It is possible to use a serial port and Linux with RTAI patches in order to COUNT these pulses, thus minimising the external hardware required for a positioner. The zip contains instructions, circuit diagrams and example code.
标签: satellite actuators COUNTing indicate
上传时间: 2014-12-03
上传用户:netwolf
已知数据文件IN.dat中存有200个四位数,并已调用读函数rData()把这些数存入数组a中,请编写函数spellNum(),其功能是:把个位数字和千位数字重新组成一个新的二位数(新二位数的十位数字是原四位数的个位数字,新二位数的个位数字是原四位数的千位数字),以及把百位数字和十位数字组成另一个新的二位数(新二位数的十位数字是原四位数的百位数字,新二位数的个位数字是原四位数的十位数字),如果新组成的两个二位数一个是奇数,另一个为偶数,并且两个二位数中至少有一个数能被17整除,同时两个新数的十位数字均不为0,则将满足此条件的四位数按从大到小的顺序存入数组b中,并要计算满足上述条件的四位数的个数COUNT。最后main()函数调用写函数wData(),把结果COUNT以及数组b中符合条件的四位数输出到OUT.dat文件中。
上传时间: 2014-10-29
上传用户:李彦东
Collection of key-value pairs. TDictionary represents a generic collection of key-value pairs. This class provides a mapping from a collection of keys to a collection of values. When you create a TDictionary object, you can specify various combinations of initial capacity, equality operation, and initial content. You can add a key that is associated with a corresponding value with the Add or AddOrSetValue methods. You can remove entries with Remove or Clear, which removes all key-value pairs. Adding or removing a key-value pair and looking up a key are efficient, close to O(1), because keys are hashed. A key must not be nil (though a value may be nil) and there must be an equality comparison operation for keys. You can test for the presence or keys and values with the TryGetValue, ContainsKey and ContainsValue methods. The Items property lists all COUNT dictionary entries. You can also set and get values by indexing the Items property. Setting the value this way overwrites any existing value. The class TObjectDictionary inherits from TDictionary and provides an automatic mechanism for freeing objects removed from dictionary entries.
标签: Delphi 泛型
上传时间: 2015-07-01
上传用户:mirage
/**************************************************************** 外部晶振8M PA0~3:四位数码管的位选 PB0~7:数码管的8位段选 外部中断0用于计数 定时器0溢出中断的定时为1ms 说明 :检测到水流较小时,继电器延时1秒关闭 ******************************************************************/ #include<iom16v.h> #include<macros.h> #define uchar unsigned char #define uint unsigned int char led_7[10]={0x3F,0x06,0x5B,0x4F,0x66,0x6D,0x7D,0x07,0x7F,0x6F}; //数码管段选 char position[4]={0xfe,0xfd,0xfb,0xf7};//数码管位选 uint sumnum=0; //用于记录1000ms内进入中断的次数 uint time=0; //记录进入比较定时器0的次数 uint num=0; //记录1ms内进入中断的次数 uint COUNT=0; //进入外部中断0的次数 uchar flag; uint sumnum1; //记录100ms内的数目 /***************************函数声明***************************/ void delay(); void display(uint m ); void init(); void init_0(); void init_2(); void _delay_us(uint l) { unsigned int i; for(i=0;i<l;i++) { asm("nop"); } } /**************************主函数***********************************/ void main() { init(); init_0(); init_2(); while(sumnum<5) { PORTD=0XBF; segdisplay(sumnum1); } while(1) { segdisplay(sumnum1); } } /*************************扫描数码管时的延时函数*********************/ void delay() { uchar i,j; for(i=6;i>0;i--) for(j=225;j>0;j--); } /************************数码管显示函数*****************************/ void segdisplay( int temp) { int seg[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f}; int temp1,temp2,temp3,temp4; temp1=temp/1000; temp2=(temp/100)%10; temp3=(temp/10)%10; temp4=temp%10; DDRB=0xff; DDRA|=0x0f; PORTA=~BIT(3); PORTB=seg[temp1]; _delay_us(100); PORTA=~BIT(2); PORTB=seg[temp2]; _delay_us(100); PORTA=~BIT(1); PORTB=seg[temp3]; _delay_us(100); PORTA=~BIT(0); PORTB=seg[temp4]; _delay_us(100); } /***********************管脚初始化函数*********************/ void init() { DDRD|=0X40; //PD4 设置为输出 PORTD=0XBF; DDRA=0XFF; DDRB=0XFF; PORTA=0XFF; PORTB=0XFF; } /***********************外部中断0初始化*********************/ void init_0() { MCUCR=0X02; //INT0为下降沿触发 GICR=0X40; //使能INT0中断 SREG=0X80; //使能总中断 } /**********************定时器2初始化***********************/ void init_2() { TCCR0=0x03; // 内部时钟,64 分频(8M/64=125KHz) TCNT0=0x83; //装初值 TIMSK=0x01; // 允许 T/C0溢出中断中断 } /***********************外部中断0子函数********************/ #pragma interrupt_handler int0_isr:2 void int0_isr(void) { COUNT++; } /*********************定时计数器0溢出中断子函数*****************/ #pragma interrupt_handler int0_over:10 void int0_over(void) { TCNT0=0x83; //重装初值 if((time%100) == 0) sumnum1 = num; if(time == 1000) { sumnum=num; if(sumnum<10) { if((flag==1)&&(sumnum<10)) { PORTD=0XFF; flag=0; } flag++; } else PORTD=0XBF; num=0; time=0; } num+=COUNT; COUNT=0; ++time; }
标签: C语言
上传时间: 2016-03-09
上传用户:彦 yan
# include < reg52.h > # include < 24C02.h> # define uint unsigned int # define uchar unsigned char sbit rs = P3^5; //定义lcd1602的rs端 sbit lcden = P3^4;//定义lcd1602的lcden端口 sbit s1 = P3^0;//定义功能键s1 sbit s2 = P3^1;//定义功能键s2 sbit s3 = P3^2;//定义功能键s3 sbit beep = P2^3;//定义蜂鸣器 uchar COUNT, s1num; char miao,fen,shi; uchar code table[] = "Designer:X_ZL ";//定义初始上电时液晶默认显示状态 void delay_ms( xms ) //定义延时函数 { uint i,j; for( i = xms ; i > 0 ; i --) for( j = 110 ; j > 0 ; j --); }
上传时间: 2016-07-28
上传用户:游戏好吗