用MDK 生成bin 文件1用MDK 生成bin 文件Embest 徐良平在RV MDK 中,默认情况下生成*.hex 的可执行文件,但是当我们要生成*.bin 的可执行文件时怎么办呢?答案是可以使用RVCT 的fromelf.exe 工具进行转换。也就是说首先将源文件编译链接成*.axf 的文件,然后使用fromelf.exe 工具将*.axf 格式的文件转换成*.bin格式的文件。下面将具体说明这个操作步骤:1. 打开Axf_To_Bin 文件中的Axf_To_Bin.uv2 工程文件;2. 打开Options for Target ‘Axf_To_Bin’对话框,选择User 标签页;3. 构选Run User Programs After Build/Rebuild 框中的Run #1 多选框,在后边的文本框中输入C:\Keil\ARM\BIN31\fromelf.exe --bin -o ./output/Axf_To_Bin.bin ./output/Axf_To_Bin.axf 命令行;4. 重新编译文件,在./output/文件夹下生成了Axf_To_Bin.bin 文件。在上面的步骤中,有几点值得注意的是:1. C:\Keil\ARM\BIN31\表示RV MDK 的安装目录;2. fromelf.exe 命令的具体语法格式如下:命令的格式为:fromelf [options] input_file命令选项如下:--help 显示帮助信息--vsn 显示版本信息--output file 输出文件(默认的输出为文本格式)--nodebug 在生成的映象中不包含调试信息--nolinkview 在生成的映象中不包含段的信息二进制输出格式:--bin 生成Plain Binary 格式的文件--m32 生成Motorola 32 位十六进制格式的文件--i32 生成Intel 32 位十六进制格式的文件--vhx 面向字节的位十六进制格式的文件t--base addr 设置m32,i32 格式文件的基地址--text 显示文本信息文本信息的标志-v 打印详细信息-a 打印数据地址(针对带调试信息的映象)-d 打印数据段的内容-e 打印表达式表print exception tables-f 打印消除虚函数的信息-g 打印调试表print debug tables-r 打印重定位信息-s 打印字符表-t 打印字符串表-y 打印动态段的内容-z 打印代码和数据大小的信息
上传时间: 2013-12-17
上传用户:AbuGe
Abstract: This application note helps system designers choose the correct external components for use with the MAX16948 dualremote antenna LDO/switch, thus ensuring that automobile-regulated phantom antenna supply and output-current-monitoring circuitrymeet performance objectives. An electronic calculator is provided that helps specify the critical external components for theMAX16948, thus reducing design time. The calculator also determines the device's analog output voltage, output current-limitthreshold, and output current-sensing accuracies. The calculator includes new automatic Step By Step feature that assists designerswith component choice. To use the new automatic feature, click on the Step By Step button relative to the desired section.
上传时间: 2013-11-04
上传用户:lhll918
The LTC®3207/LTC3207-1 is a 600mA LED/Camera driverwhich illuminates 12 Universal LEDs (ULEDs) and onecamera fl ash LED. The ULEDs are considered universalbecause they may be individually turned on or off, setin general purpose output (GPO) mode, set to blink at aselected on-time and period, or gradate on and off at aselected gradation rate. This device also has an externalenable (ENU) pin that may be used to blink, gradate, orturn on/off the LEDs without using the I2C bus. This may beuseful if the microprocessor is in sleep or standby mode. Ifused properly, these features may save valuable memoryspace, programming time, and reduce the I2C traffi c.
上传时间: 2014-01-04
上传用户:LANCE
The RT9005A/B is a dual-output Linear regulator for DDR-SDRAM VDDQ supply and termination voltage VTT supply.
上传时间: 2013-11-13
上传用户:lmq0059
The RT9018A/B is a high performance positive voltage regulator designed for use in applications requining very low Input voltage and very low dropout voltage at up to 3A(peak).
上传时间: 2013-10-10
上传用户:geshaowei
本软件是关于MAX338, MAX339的英文数据手册:MAX338, MAX339 8通道/双4通道、低泄漏、CMOS模拟多路复用器 The MAX338/MAX339 are monolithic, CMOS analog multiplexers (muxes). The 8-channel MAX338 is designed to connect one of eight inputs to a common output by control of a 3-bit binary address. The dual, 4-channel MAX339 is designed to connect one of four inputs to a common output by control of a 2-bit binary address. Both devices can be used as either a mux or a demux. On-resistance is 400Ω max, and the devices conduct current equally well in both directions. These muxes feature extremely low off leakages (less than 20pA at +25°C), and extremely low on-channel leakages (less than 50pA at +25°C). The new design offers guaranteed low charge injection (1.5pC typ) and electrostatic discharge (ESD) protection greater than 2000V, per method 3015.7. These improved muxes are pin-compatible upgrades for the industry-standard DG508A and DG509A. For similar Maxim devices with lower leakage and charge injection but higher on-resistance, see the MAX328 and MAX329.
上传时间: 2013-11-12
上传用户:18711024007
This example provides a description of how to use the USART with hardware flowcontrol and communicate with the Hyperterminal.First, the USART2 sends the TxBuffer to the hyperterminal and still waiting fora string from the hyperterminal that you must enter which must end by '\r'character (keypad ENTER button). Each byte received is retransmitted to theHyperterminal. The string that you have entered is stored in the RxBuffer array. The receivebuffer have a RxBufferSize bytes as maximum. The USART2 is configured as follow: - BaudRate = 115200 baud - Word Length = 8 Bits - One Stop Bit - No parity - Hardware flow control enabled (RTS and CTS signals) - Receive and transmit enabled - USART Clock disabled - USART CPOL: Clock is active low - USART CPHA: Data is captured on the second edge - USART LastBit: The clock pulse of the last data bit is not output to the SCLK pin
上传时间: 2013-10-31
上传用户:yy_cn
温湿度传感器 sht11 仿真程序 sbit out =P3^0; //加热口 //sbit input =P1^1;//检测口 //sbit speek =P2^0;//报警 sbit clo =P3^7;//时钟 sbit ST =P3^5;//开始 sbit EOC =P3^6;//成功信号 sbit gwei =P3^4;//个位 sbit swei =P3^3;//十位 sbit bwei =P3^2;//百位 sbit qwei =P3^1;//千位 sbit speak =P0^0;//报警音 sbit bjled =P0^1;//报警灯 sbit zcled =P0^2;//正常LED int count; uchar xianzhi;//取转换结果 uchar seth;//高时间 uchar setl;//低时间 uchar seth_mi;//高时间 uchar setl_mi;//低时间 bit hlbz;//高低标志 bit clbz; bit spbz; ///定时中断程序/// void t0 (void) interrupt 1 using 0 { TH0=(65536-200)/256;//5ms*200=1000ms=1s TL0=(65536-200)%256; clo=!clo;//产生时钟 if(count>5000) { if(hlbz) { if(seth_mi==0){seth_mi=seth;hlbz=0;out=0;} else seth_mi--; } if(!hlbz) { if(setl_mi==0){setl_mi=setl;hlbz=1;out=1;} else setl_mi--; } count=0; } else count++; } ///////////// ///////延时/////// delay(int i) { while(--i); } ///////显示处理/////// xianshi() { int abcd=0; int i; for (i=0;i<5;i++) { abcd=xianzhi; gwei=1; swei=1; bwei=1; qwei=1; P1=dispcode[abcd/1000]; qwei=0; delay(70); qwei=1; abcd=abcd%1000; P1=dispcode[abcd/100]; bwei=0; delay(70); bwei=1; abcd=abcd%100; P1=dispcode[abcd/10]; swei=0; delay(70); swei=1; abcd=abcd%10; P1=dispcode[abcd]; gwei=0; delay(70); gwei=1; } } doing() { if(xianzhi>100) {bjled=0;speak=1;zcled=1;} else {bjled=1;speak=0;zcled=0;} } void main(void) { seth=60;//h60秒 setl=90;//l90秒 seth_mi=60;//h60秒 setl_mi=90;//l90秒 TMOD=0X01;//定时0 16位工作模式 TH0=(65536-200)/256; TL0=(65536-200)%256; TR0=1; //开始计时 ET0=1; //开定时0中断 EA=1; //开全中断 while(1) { ST=0; _nop_(); ST=1; _nop_(); ST=0; // EOC=0; xianshi(); while(!EOC) { xianshi(); } xianzhi=P2; xianshi(); doing(); } }
上传时间: 2013-11-07
上传用户:我们的船长
注:1.这篇文章断断续续写了很久,画图技术也不精,难免错漏,大家凑合看.有问题可以留言. 2.论坛排版把我的代码缩进全弄没了,大家将代码粘贴到arduino编译器,然后按ctrl+T重新格式化代码格式即可看的舒服. 一、什么是PWM PWM 即Pulse Wavelength Modulation 脉宽调制波,通过调整输出信号占空比,从而达到改 变输出平均电压的目的。相信Arduino 的PWM 大家都不陌生,在Arduino Duemilanove 2009 中,有6 个8 位精度PWM 引脚,分别是3, 5, 6, 9, 10, 11 脚。我们可以使用analogWrite()控 制PWM 脚输出频率大概在500Hz 的左右的PWM 调制波。分辨率8 位即2 的8 次方等于 256 级精度。但是有时候我们会觉得6 个PWM 引脚不够用。比如我们做一个10 路灯调光, 就需要有10 个PWM 脚。Arduino Duemilanove 2009 有13 个数字输出脚,如果它们都可以 PWM 的话,就能满足条件了。于是本文介绍用软件模拟PWM。 二、Arduino 软件模拟PWM Arduino PWM 调压原理:PWM 有好几种方法。而Arduino 因为电源和实现难度限制,一般 使用周期恒定,占空比变化的单极性PWM。 通过调整一个周期里面输出脚高/低电平的时间比(即是占空比)去获得给一个用电器不同 的平均功率。 如图所示,假设PWM 波形周期1ms(即1kHz),分辨率1000 级。那么需要一个信号时间 精度1ms/1000=1us 的信号源,即1MHz。所以说,PWM 的实现难点在于需要使用很高频的 信号源,才能获得快速与高精度。下面先由一个简单的PWM 程序开始: const int PWMPin = 13; int bright = 0; void setup() { pinMode(PWMPin, OUTPUT); } void loop() { if((bright++) == 255) bright = 0; for(int i = 0; i < 255; i++) { if(i < bright) { digitalWrite(PWMPin, HIGH); delayMicroseconds(30); } else { digitalWrite(PWMPin, LOW); delayMicroseconds(30); } } } 这是一个软件PWM 控制Arduino D13 引脚的例子。只需要一块Arduino 即可测试此代码。 程序解析:由for 循环可以看出,完成一个PWM 周期,共循环255 次。 假设bright=100 时候,在第0~100 次循环中,i 等于1 到99 均小于bright,于是输出PWMPin 高电平; 然后第100 到255 次循环里面,i 等于100~255 大于bright,于是输出PWMPin 低电平。无 论输出高低电平都保持30us。 那么说,如果bright=100 的话,就有100 次循环是高电平,155 次循环是低电平。 如果忽略指令执行时间的话,这次的PWM 波形占空比为100/255,如果调整bright 的值, 就能改变接在D13 的LED 的亮度。 这里设置了每次for 循环之后,将bright 加一,并且当bright 加到255 时归0。所以,我们 看到的最终效果就是LED 慢慢变亮,到顶之后然后突然暗回去重新变亮。 这是最基本的PWM 方法,也应该是大家想的比较多的想法。 然后介绍一个简单一点的。思维风格完全不同。不过对于驱动一个LED 来说,效果与上面 的程序一样。 const int PWMPin = 13; int bright = 0; void setup() { pinMode(PWMPin, OUTPUT); } void loop() { digitalWrite(PWMPin, HIGH); delayMicroseconds(bright*30); digitalWrite(PWMPin, LOW); delayMicroseconds((255 - bright)*30); if((bright++) == 255) bright = 0; } 可以看出,这段代码少了一个For 循环。它先输出一个高电平,然后维持(bright*30)us。然 后输出一个低电平,维持时间((255-bright)*30)us。这样两次高低就能完成一个PWM 周期。 分辨率也是255。 三、多引脚PWM Arduino 本身已有PWM 引脚并且运行起来不占CPU 时间,所以软件模拟一个引脚的PWM 完全没有实用意义。我们软件模拟的价值在于:他能将任意的数字IO 口变成PWM 引脚。 当一片Arduino 要同时控制多个PWM,并且没有其他重任务的时候,就要用软件PWM 了。 多引脚PWM 有一种下面的方式: int brights[14] = {0}; //定义14个引脚的初始亮度,可以随意设置 int StartPWMPin = 0, EndPWMPin = 13; //设置D0~D13为PWM 引脚 int PWMResolution = 255; //设置PWM 占空比分辨率 void setup() { //定义所有IO 端输出 for(int i = StartPWMPin; i <= EndPWMPin; i++) { pinMode(i, OUTPUT); //随便定义个初始亮度,便于观察 brights[ i ] = random(0, 255); } } void loop() { //这for 循环是为14盏灯做渐亮的。每次Arduino loop()循环, //brights 自增一次。直到brights=255时候,将brights 置零重新计数。 for(int i = StartPWMPin; i <= EndPWMPin; i++) { if((brights[i]++) == PWMResolution) brights[i] = 0; } for(int i = 0; i <= PWMResolution; i++) //i 是计数一个PWM 周期 { for(int j = StartPWMPin; j <= EndPWMPin; j++) //每个PWM 周期均遍历所有引脚 { if(i < brights[j])\ 所以我们要更改PWM 周期的话,我们将精度(代码里面的变量:PWMResolution)降低就行,比如一般调整LED 亮度的话,我们用64 级精度就行。这样速度就是2x32x64=4ms。就不会闪了。
上传时间: 2013-10-08
上传用户:dingdingcandy
protel 99se 使用技巧以及常见问题解决方法:里面有一些protel 99se 特别技巧,还有我们经常遇到的一些问题!如何使一条走线至两个不同位置零件的距离相同? 您可先在Design/Rule/High Speed/Matched Net Lengths的规则中来新增规则设定,最后再用Tools/EqualizeNet Lengths 来等长化即可。 Q02、在SCHLIB中造一零件其PIN的属性,如何决定是Passive, Input, I/O, Hi- Z,Power,…..?在HELP中能找到说明吗?市面有关 SIM?PLD?的书吗?或贵公司有讲义? 你可在零件库自制零件时点选零件Pin脚,并在Electrical Type里,可以自行设定PIN的 属性,您可参考台科大的Protel sch 99se 里面有介绍关于SIM的内容。 Q03、请问各位业界前辈,如何能顺利读取pcad8.6版的线路图,烦请告知 Protel 99SE只能读取P-CAD 2000的ASCII档案格式,所以你必须先将P-CAD8.6版的格式转为P-CAD 2000的档案格式,才能让Protel读取。 Q04、请问我该如何标示线径大小的那个平方呢 你可以将格点大小设小,还有将字形大小缩小,再放置数字的平方位置即可。 Q05、请问我一次如何更改所有组件的字型 您可以点选其中一个组件字型,再用Global的方法就可以达成你的要求。
上传时间: 2015-01-01
上传用户:yxgi5