-
question2
Q1 Create a program that will initialise Port2 bits 0 - 7 to outputs. Then in an endless loop perform the sequence of bit manipulations shown below. Your program should use bit masking operations. Here is an outline of the program in pseudo-code and with the first two bit manipulations done for you.
//initialise port 2 for output
//set all outputs to 0
while(1)
{
FIO2PIN |= 0x04 // set bit 2 on (0x04 = 00000100)
FIO2PIN &= ~0x04 // set bit 2 off
//set port2 bit 1 on
//set port2 bit 1 off
//set port2 bit 4 on
//set port2 bit 6 and bit 7 on
//set port2 bit 4 off
//set port2 bit 6 and bit 7 off
- 2010-03-09 01:40:03下载
- 积分:1
-
XML学习
public Turntable() { InitializeComponent(); int angle = 5029; for (int i = 0; i < 16; i ) { angle = 22; _ListAngle.Add(angle); } } /// /// 保存八个角度 /// List _ListAngle = new List(); /// /// 产生随机数 /// Random _Random = new Random(); int _Index = 0; int _OldAngle = 0; private void btnStartTurntable_Click(object sender, RoutedEventArgs e) { btnStartTurntable.IsEnabled = false; _Index = _Random.Next(0, 16); //_Index = 2; Storyboard sb = (Storyboard)this.FindResource("zhuandong"); sb.Completed -= this.sb_Completed; sb.Completed = new EventHandler(sb_Completed); ((SplineDoubleKeyFrame)((DoubleAnimationUsingKeyFrames)sb.Children[0]).KeyFrames[0]).Value = _OldAngle; ((SplineDoubleKeyFrame)((DoubleAnimationUsingKeyFrames)sb.Children[0]).KeyFrames[3]).Value = _ListAngle[_Index]; //((SplineDoubleKeyFrame)((DoubleAnimationUsingKeyFrames)sb.Children[0]).KeyFrames[3]).Value = 5218; sb.Begin(); } void sb_Completed(object sender, EventArgs e) { DispatcherTimer dt = new DispatcherTimer(); dt.Interval = TimeSpan.FromSeconds(0.3); dt.Tick = delegate { dt.Stop(); _OldAngle = (_ListAngle[_Index] % 360); btnStartTurntable.IsEnabled = true; AwardProcess(GetAward(_ListAngle[_Index])); }; dt.Start(); } public delegate void AwardDelegate(Award award); /// /// 返回转到的奖项信息 /// public event AwardDelegate AwardProcess; private Award GetAward(int angle) {
- 2014-08-01下载
- 积分:1
-
print
说明: 一个简单的绘图程序,直接拖放产生圆形,矩形,正四边形,等多边形(print program)
- 2010-03-26 15:47:49下载
- 积分:1
-
TKDE2012ABNORMALDETECTION
TKDE2012 时间序列分析的异常检测综述 论文(TKDE2012 time series analysis of anomaly detection reviewed papers)
- 2015-02-10 09:33:38下载
- 积分:1
-
iir
这是IIR数字滤波器的设计及滤波程序,IIR滤波器用matlab实现,滤波数据用C生成,主程序实现数字滤波(This is the IIR digital filter design and filtering procedures, IIR filter using matlab, using C to generate filtered data, the main program to achieve digital filtering)
- 2013-09-15 21:23:30下载
- 积分:1
-
MATLAB-c
msk的调制解调MATLAB源代码,很不错,值得看看(msk modulation and demodulation MATLAB source code, very good, worth a look)
- 2013-11-15 16:35:31下载
- 积分:1
-
07996175
【中文版】目录下的源代码是实现中文版的,其程序必须在UCDOS等中文环境中运行,才可以 看到中文,否则是乱码, 与本说明文件同()
- 2018-03-21 08:33:42下载
- 积分:1
-
AN41908A DataSheet
AN41908A芯片资料,对AN41908A芯片的详细介绍,提供给相关人员参考(AN41908A chip information, detailed introduction to AN41908A chip, provided to relevant personnel for reference.)
- 2020-08-23 14:48:20下载
- 积分:1
-
Licenseplaterecognitionprogram
说明: 车牌识别的MATLAB程序 含多个M文件及图片 运行有图片演示(License plate recognition program MATLAB language)
- 2010-04-11 17:55:41下载
- 积分:1
-
How-to-design-a-test-case
对软件测试用例的设计方法进行了介绍,综合了多个文档,系统研究了软件测试用例的设计方法,及软件测试用例的设计技巧。对软件测试工程师理论的提高,很有帮助。(Software test case design method, a combination of multiple documents, and system software test case design, test case design techniques and software. Improve software test engineer theory, very helpful.)
- 2013-03-21 21:00:42下载
- 积分:1