/*--------- 8051内核特殊功能寄存器 -------------*/ sfr ACC = 0xE0; //累加器 sfr B = 0xF0; //B 寄存器 sfr PSW = 0xD0; //程序状态字寄存器 sbit CY = PSW^7; //进位标志位 sbit AC = PSW^6; //辅助进位标志位 sbit F0 = PSW^5; //用户标志位0 sbit RS1 = PSW^4; //工作寄存器组选择控制位 sbit RS0 = PSW^3; //工作寄存器组选择控制位 sbit OV = PSW^2; //溢出标志位 sbit F1 = PSW^1; //用户标志位1 sbit P = PSW^0; //奇偶标志位 sfr SP = 0x81; //堆栈指针寄存器 sfr DPL = 0x82; //数据指针0低字节 sfr DPH = 0x83; //数据指针0高字节 /*------------ 系统管理特殊功能寄存器 -------------*/ sfr PCON = 0x87; //电源控制寄存器 sfr AUXR = 0x8E; //辅助寄存器 sfr AUXR1 = 0xA2; //辅助寄存器1 sfr WAKE_CLKO = 0x8F; //时钟输出和唤醒控制寄存器 sfr CLK_DIV = 0x97; //时钟分频控制寄存器 sfr BUS_SPEED = 0xA1; //总线速度控制寄存器 /*----------- 中断控制特殊功能寄存器 --------------*/ sfr IE = 0xA8; //中断允许寄存器 sbit EA = IE^7; //总中断允许位 sbit ELVD = IE^6; //低电压检测中断控制位 8051
上传时间: 2013-10-30
上传用户:yxgi5
#include<iom16v.h> #include<macros.h> #define uint unsigned int #define uchar unsigned char uint a,b,c,d=0; void delay(c) { for for(a=0;a<c;a++) for(b=0;b<12;b++); }; uchar tab[]={ 0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,
上传时间: 2013-10-21
上传用户:13788529953
AVRPRO烧录器,是针对ATMEL公司的90系列AVR精简指令单片机设计的专用烧录工具该产品只有软件部分,无需硬件支持,仅仅只需4根线,将计算机并口和用户板相连,这都是因为采用了ISP串行编程。软件支持擦、写、校验、写保护位以及批处理。使用极其方便。 该产品的最大优点有: 1. 使用串行编程,达到了在线编程,节省了购买万用编程器和适配器的费用(万用编程器需2千元左右,适配器需3、4百元,并各个芯片和封装需不同适配器)。用户板也无需在焊插座(带来可靠性下降),而且为软件升级带来了极大的便利。 2. 使用方便,无需硬件,给现场调试带来了极大的便利,不用再带笨重的编程器,而且为AVR单片机的使用上带来了方便。 3. 价格实在太便宜,为您省了不少钱。 硬件使用说明: 并口和用户板连接说明 并口2脚<―――>用户板单片机MOSI 并口3脚<―――>用户板单片机SCK 并口12脚<―――>用户板单片机MISO 并口25脚<―――>用户板单片机GND 软件使用说明: 软件名是AVRPRO.EXE,支持DOS,WIN9x,支持.hex(intel)格式,可直接运行AVRPRO.EXE,也可以键入AVRPRO.EXE 目录\文件名.HEX,直接运行时可进入菜单,可选择擦、写、校验、写保护位以及批处理。键入文件名时,软件运行批处理,自动完成擦、写、校验、写保护位
上传时间: 2014-12-27
上传用户:zhang97080564
2010 年,科通成为Cadence 公司在中国规模最大的增值代理商,科通也是Cadence 公司唯一代理区域覆盖全国,唯一代理产品范围覆盖Cadence PCB 全线(Allegro 和Orcad)的增值服务商。随着业界领先的信号完整性和电源完整性仿真软件供应商Sigrity 成为Cadence 的一员,全新的Cadence 芯片封装/PCB 板协同设计及仿真解决方案,让你能够迅速优化芯片和封装之间的网络连接,以及封装与PCB 之间的网络连接。同时通过网表管理、自动优化路径以及信号和电源完整性分析,可以对产品的成本与性能进行优化。
标签: Cadence_PCB 2013
上传时间: 2013-10-22
上传用户:haoxiyizhong
2010 年,科通成为Cadence 公司在中国规模最大的增值代理商,科通也是Cadence 公司唯一代理区域覆盖全国,唯一代理产品范围覆盖Cadence PCB 全线(Allegro 和Orcad)的增值服务商。随着业界领先的信号完整性和电源完整性仿真软件供应商Sigrity 成为Cadence 的一员,全新的Cadence 芯片封装/PCB 板协同设计及仿真解决方案,让你能够迅速优化芯片和封装之间的网络连接,以及封装与PCB 之间的网络连接。同时通过网表管理、自动优化路径以及信号和电源完整性分析,可以对产品的成本与性能进行优化。
标签: Cadence_PCB 2013
上传时间: 2013-10-08
上传用户:comua
题目:利用条件运算符的嵌套来完成此题:学习成绩>=90分的同学用A表示,60-89分之间的用B表示,60分以下的用C表示。 1.程序分析:(a>b)?a:b这是条件运算符的基本例子。
上传时间: 2015-01-08
上传用户:lifangyuan12
RSA算法 :首先, 找出三个数, p, q, r, 其中 p, q 是两个相异的质数, r 是与 (p-1)(q-1) 互质的数...... p, q, r 这三个数便是 person_key,接著, 找出 m, 使得 r^m == 1 mod (p-1)(q-1)..... 这个 m 一定存在, 因为 r 与 (p-1)(q-1) 互质, 用辗转相除法就可以得到了..... 再来, 计算 n = pq....... m, n 这两个数便是 public_key ,编码过程是, 若资料为 a, 将其看成是一个大整数, 假设 a < n.... 如果 a >= n 的话, 就将 a 表成 s 进位 (s
标签: person_key RSA 算法
上传时间: 2013-12-14
上传用户:zhuyibin
数字运算,判断一个数是否接近素数 A Niven number is a number such that the sum of its digits divides itself. For example, 111 is a Niven number because the sum of its digits is 3, which divides 111. We can also specify a number in another base b, and a number in base b is a Niven number if the sum of its digits divides its value. Given b (2 <= b <= 10) and a number in base b, determine whether it is a Niven number or not. Input Each line of input contains the base b, followed by a string of digits representing a positive integer in that base. There are no leading zeroes. The input is terminated by a line consisting of 0 alone. Output For each case, print "yes" on a line if the given number is a Niven number, and "no" otherwise. Sample Input 10 111 2 110 10 123 6 1000 8 2314 0 Sample Output yes yes no yes no
上传时间: 2015-05-21
上传用户:daguda
源代码\用动态规划算法计算序列关系个数 用关系"<"和"="将3个数a,b,c依次序排列时,有13种不同的序列关系: a=b=c,a=b<c,a<b=v,a<b<c,a<c<b a=c<b,b<a=c,b<a<c,b<c<a,b=c<a c<a=b,c<a<b,c<b<a 若要将n个数依序列,设计一个动态规划算法,计算出有多少种不同的序列关系, 要求算法只占用O(n),只耗时O(n*n).
上传时间: 2013-12-26
上传用户:siguazgb
The government of a small but important country has decided that the alphabet needs to be streamlined and reordered. Uppercase letters will be eliminated. They will issue a royal decree in the form of a String of B and A characters. The first character in the decree specifies whether a must come ( B )Before b in the new alphabet or ( A )After b . The second character determines the relative placement of b and c , etc. So, for example, "BAA" means that a must come Before b , b must come After c , and c must come After d . Any letters beyond these requirements are to be excluded, so if the decree specifies k comparisons then the new alphabet will contain the first k+1 lowercase letters of the current alphabet. Create a class Alphabet that contains the method choices that takes the decree as input and returns the number of possible new alphabets that conform to the decree. If more than 1,000,000,000 are possible, return -1. Definition
标签: government streamline important alphabet
上传时间: 2015-06-09
上传用户:weixiao99