#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
a_bit equ 20h ;个位数存放处 b_bit equ 21h ;十位数存放处 temp equ 22h ;计数器寄存器 star: mov temp,#0 ;初始化计数器 stlop: acall display inc temp mov a,temp cjne a,#100,next ;=100重来 mov temp,#0 next: ljmp stlop ;显示子程序 display: mov a,temp ;将temp中的十六进制数转换成10进制 mov b,#10 ;10进制/10=10进制 div ab mov b_bit,a ;十位在a mov a_bit,b ;个位在b mov dptr,#numtab ;指定查表启始地址 mov r0,#4 dpl1: mov r1,#250 ;显示1000次 dplop: mov a,a_bit ;取个位数 MOVC A,@A+DPTR ;查个位数的7段代码 mov p0,a ;送出个位的7段代码
上传时间: 2013-11-06
上传用户:lx9076
常用PIC系列产品特性一览表 器件 存储器 类型 字数 EEPROM 数据 存储器 RAM I/O 引脚数 ADC (-Bit) 比较 器 运 放 定时器/WDT 串行接口 最高 速度 MHz 封装 PDIP /SOIC ICSP CCP / ECCP 输出电流 (per I/O) 振荡器 频率 (MHz) 参考 电压 VREF LCD PWM 堆栈 深度 High Voltage Wakeup On Change PIC16C432 OTP 2048x14 128 12 2 1-8bit/1-WDT 20 20 √ 25 mA 4 0 0 PIC16C433 OTP 2048x14 128 6 4/8 1-8bit/1-WDT 10 18 √ 25 mA 0 0 PIC16C505 OTP 1024x12 72 12 1-8bit/1-WDT 20 14 √ 25 mA 4 0 0 PIC16C54 OTP 512x12 25 12 1-8bit/1-WDT 20 18/20 20 mA 0 0 PIC16C54A OTP 512x12 25 12 1-8bit/1-WDT 20 18/20 20 mA 0 0 PIC16C54C OTP 512x12 25 12 1-8bit/1-WDT 40 18/20 20 mA 0 0 PIC16C55 OTP 512x12 24 20 1-8bit/1-WDT 20 28 20 mA 0 0 PIC16C554 OTP 512x14 80 13 1-8bit/1-WDT 20 18/20 √ 25 mA 0 0 PIC16C558 OTP 2048x14 128 13 1-8bit/1-WDT 20 18/20 √ 25 mA 0 0 PIC16C55A OTP 512x12 24 20 1-8bit/1-WDT 40 28 20 mA 0 0 PIC16C56 OTP 1024x12 25 12 1-8bit/1-WDT 20 18/20 20 mA 0 0 PIC16C56A OTP 1024x12 25 12 1-8bit/1-WDT 40 18/20 20 mA 0 0 PIC16C57 OTP 2048x12 72 20 1-8bit/1-WDT 20 28 20 mA 0 0 PIC16C57C OTP 2048x12 72 20 1-8bit/1-WDT 40 28 20 mA 0 0 PIC16C58B OTP 2048x12 73 12 1-8bit/1-WDT 40 18/20 20 mA 0 0 PIC16C620 OTP 512x14 80 13 2 1-8bit/1-WDT 20 18/20 √ 25 mA √ 0 0 PIC16C620A OTP 512x14 96 13 2 1-8bit/1-WDT 40 18/20 √ 25 mA √ 0 0 PIC16C621 OTP 1024x14 80 13 2 1-8bit/1-WDT 20 18/20 √ 25 mA √ 0 0 PIC16C621A OTP 1024x14 96 13 2 1-8bit/1-WDT 40 18/20 √ 25 mA √ 0 0 PIC16C622 OTP 2048x14 128 13 2 1-8bit/1-WDT 20 18/20 √ 25 mA √ 0 0 PIC16C622A OTP 2048x14 128 13 2 1-8bit/1-WDT 40 18/20/40 √ 25 mA √ 0 0 PIC16C62A OTP 2048x14 128 22 2-8bit/1-16bit/1-WDT I²C/ SPI 20 28/ √ 1 25 mA 1 0 0 PIC16C62B OTP 2048x14 128 22 2-8bit/1-16bit/1-WDT I²C /SPI 20 28 √ 1 25 mA 1 0 0 PIC16C63 OTP 4096x14 192 22 2-8bit/1-16bit/1-WDT USART/I²C /SPI 20 28 √ 2 25 mA 2 0 0 PIC16C63A OTP 4096x14 192 22 2-8bit/1-16bit/1-WDT USART/I²C/SPI 20 28 √ 2 25 mA 2 0 0 PIC16C642 OTP 4096x14 176 22 2 1-8bit/1-WDT 20 28 √ 25 mA √ 0 0 PIC16C64A OTP 2048x14 128 33 2-8bit/1-16bit/1-WDT I²C /SPI 20 40/44 √ 1 25 mA 1 0 0 PIC16C65A OTP 4096x14 192 33 2-8bit/1-16bit/1-WDT USART/I²C/SPI 20 40/44 √ 2 25 mA 2 0 0 PIC16C65B OTP 4096x14 192 33 2-8bit/1-16bit/1-WDT USART/I²C/SPI 20 40/44 √ 2 25 mA 2 0 0 PIC16C66 OTP 8192x14 368 22 2-8bit/1-16bit/1-WDT USART/I²C/SPI 20 28 √ 2 25 mA 2 0 0 PIC16C662 OTP 4096x14 176 33 2 1-8bit/1-WDT 20 40/44 √ 25 mA √ 0 0 PIC16C67 OTP 8192x14 368 33 2-8bit/1-16bit/1-WDT USART/I²C /SPI 20 40/44 √ 2 25 mA 2 0 0 PIC16C71 OTP 1024x14 36 13 4/8 1-8bit/1-WDT 20 18 √ 25 mA 0 0 PIC16C710 OTP 512x14 36 13 4/8 1-8bit/1-WDT 20 18/20 √ 25 mA 0 0 PIC16C711 OTP 1024x14 68 13 4/8 1-8bit/1-WDT 20 18/20 √ 25 mA
上传时间: 2013-10-12
上传用户:xjy441694216
通用的多电源总线,如VME、VXI 和PCI 总线,都可提供功率有限的3.3V、5V 和±12V(或±24V)电源,如果在这些系统中添加设备(如插卡等),则需要额外的3.3V或5V电源,这个电源通常由负载较轻的-12V电源提供。图1 电路,将-12V 电压升压到15.3V(相对于-12V 电压),进而得到3.3V 的电源电压,输出电流可达300mA。Q2 将3.3V 电压转换成适当的电压(-10.75V)反馈给IC1 的FB 引脚,PWM 升压控制器可提供1W 的输出功率,转换效率为83%。整个电路大约占6.25Cm2的线路板尺寸,适用于依靠台式PC机电源供电,需要提供1W输出功率的应用,这种应用中,由于-12V总线电压限制在1.2W以内,因此需要保证高于83%的转换效率。由于限流电阻(RSENSE)将峰值电流限制在120mA,N 沟道MOSFET(Q1)可选用廉价的逻辑电平驱动型场效应管,R1、R2 设置输出电压(3.3V 或5V)。IC1 平衡端(Pin5)的反馈电压高于PGND引脚(Pin7)1.25V,因此:VFB = -12V + 1.25V = - 10.75V选择电阻R1后,可确定:I2 = 1.25V / R1 = 1.25V / 12.1kΩ = 103μA可由下式确定R2:R2 = (VOUT - VBE)/ I2 =(3.3V - 0.7V)/ 103μA = 25.2 kΩ图1 中,IC1 的开关频率允许通过外部电阻设置,频率范围为100kHz 至500kHz,有利于RF、数据采集模块等产品的设计。当选择较高的开关频率时,能够保证较高的转换效率,并可选用较小的电感和电容。为避免电流倒流,可在电路中增加一个与R1串联的二极管。
上传时间: 2013-10-17
上传用户:jixingjie
用了还是没用上的,大家都来看看啊,呵呵,希望对你会有所帮助 cos()余弦tan()正切sin()正弦sqrt()平方根 asin()反正弦acos()反余弦atan()反正切sinh()双曲线正弦 cosh()双曲线余弦tanh()双曲线正切 注释:所有三角函数都使用单位度。 log()以10为底的对数ln()自然对数 exp()e的幂abs()绝对值 ceil()不小于其值的最小整数 floor()不超过其值的最大整数 可以给函数ceil和floor加一个可选的自变量,用它指定要圆整的小数位数。带有圆整参数的这些函数的语法是: ceil(parameter_name或number,number_of_dec_places) floor(parameter_name或number,number_of_dec_places) 其中number_of_dec_places是可选值: 1、可以被表示为一个数或一个使用者自定义参数。如果该参数值是一个实数,则被截尾成为一个整数。 2、它的最大值是8。如果超过8,则不会舍入要舍入的数(第一个自变量),并使用其初值。 3、如果不指定它,则功能同前期版本一样。 使用不指定小数部分位数的ceil和floor函数,其举例如下: ceil(10.2)值为11 floor(10.2)值为11 使用指定小数部分位数的ceil和floor函数,其举例如下: ceil(10.255,2)等于10.26 ceil(10.255,0)等于11[与ceil(10.255)相同] floor(10.255,1)等于10.2 floor(10.255,2)等于10.26
标签: proe
上传时间: 2013-10-20
上传用户:sevenbestfei
题目:利用条件运算符的嵌套来完成此题:学习成绩>=90分的同学用A表示,60-89分之间的用B表示,60分以下的用C表示。 1.程序分析:(a>b)?a:b这是条件运算符的基本例子。
上传时间: 2015-01-08
上传用户:lifangyuan12
3X3填质数问题,在一个3×3的矩阵中填写1-10的数字,保证上下左右相加都是质数
标签: 3X3
上传时间: 2015-04-13
上传用户:jing911003
数字运算,判断一个数是否接近素数 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
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
在目录“\上三角矩阵类的实现”中给定了文件triMat.cpp、triMat.h,请把triMat.h文件中的9个填空位置补上正确的代码,使triMat.cpp能完成上三角矩阵的加、减、乘运算。要求输入: 输入矩阵维数:4 输入矩阵a的元素(包括0): 1 2 3 4 0 1 2 3 0 0 1 2 0 0 0 1 输入矩阵b的元素(包括0): 1 2 3 4 0 1 2 3 0 0 1 2 0 0 0 1
上传时间: 2014-11-11
上传用户:时代电子小智