虫虫首页| 资源下载| 资源专辑| 精品软件
登录| 注册

source-<b>Code</b>-for-AVR

  • 微电脑型数学演算式双输出隔离传送器

    特点(FEATURES) 精确度0.1%满刻度 (Accuracy 0.1%F.S.) 可作各式数学演算式功能如:A+B/A-B/AxB/A/B/A&B(Hi or Lo)/|A| (Math functioA+B/A-B/AxB/A/B/A&B(Hi&Lo)/|A|/etc.....) 16 BIT 类比输出功能(16 bit DAC isolating analog output function) 输入/输出1/输出2绝缘耐压2仟伏特/1分钟(Dielectric strength 2KVac/1min. (input/output1/output2/power)) 宽范围交直流两用电源设计(Wide input range for auxiliary power) 尺寸小,稳定性高(Dimension small and High stability)

    标签: 微电脑 数学演算 输出 隔离传送器

    上传时间: 2013-11-24

    上传用户:541657925

  • TLC2543 中文资料

    TLC2543是TI公司的12位串行模数转换器,使用开关电容逐次逼近技术完成A/D转换过程。由于是串行输入结构,能够节省51系列单片机I/O资源;且价格适中,分辨率较高,因此在仪器仪表中有较为广泛的应用。 TLC2543的特点 (1)12位分辩率A/D转换器; (2)在工作温度范围内10μs转换时间; (3)11个模拟输入通道; (4)3路内置自测试方式; (5)采样率为66kbps; (6)线性误差±1LSBmax; (7)有转换结束输出EOC; (8)具有单、双极性输出; (9)可编程的MSB或LSB前导; (10)可编程输出数据长度。 TLC2543的引脚排列及说明    TLC2543有两种封装形式:DB、DW或N封装以及FN封装,这两种封装的引脚排列如图1,引脚说明见表1 TLC2543电路图和程序欣赏 #include<reg52.h> #include<intrins.h> #define uchar unsigned char #define uint unsigned int sbit clock=P1^0; sbit d_in=P1^1; sbit d_out=P1^2; sbit _cs=P1^3; uchar a1,b1,c1,d1; float sum,sum1; double  sum_final1; double  sum_final; uchar duan[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f}; uchar wei[]={0xf7,0xfb,0xfd,0xfe};  void delay(unsigned char b)   //50us {           unsigned char a;           for(;b>0;b--)                     for(a=22;a>0;a--); }  void display(uchar a,uchar b,uchar c,uchar d) {    P0=duan[a]|0x80;    P2=wei[0];    delay(5);    P2=0xff;    P0=duan[b];    P2=wei[1];    delay(5);   P2=0xff;   P0=duan[c];   P2=wei[2];   delay(5);   P2=0xff;   P0=duan[d];   P2=wei[3];   delay(5);   P2=0xff;   } uint read(uchar port) {   uchar  i,al=0,ah=0;   unsigned long ad;   clock=0;   _cs=0;   port<<=4;   for(i=0;i<4;i++)  {    d_in=port&0x80;    clock=1;    clock=0;    port<<=1;  }   d_in=0;   for(i=0;i<8;i++)  {    clock=1;    clock=0;  }   _cs=1;   delay(5);   _cs=0;   for(i=0;i<4;i++)  {    clock=1;    ah<<=1;    if(d_out)ah|=0x01;    clock=0; }   for(i=0;i<8;i++)  {    clock=1;    al<<=1;    if(d_out) al|=0x01;    clock=0;  }   _cs=1;   ad=(uint)ah;   ad<<=8;   ad|=al;   return(ad); }  void main()  {   uchar j;   sum=0;sum1=0;   sum_final=0;   sum_final1=0;    while(1)  {              for(j=0;j<128;j++)          {             sum1+=read(1);             display(a1,b1,c1,d1);           }            sum=sum1/128;            sum1=0;            sum_final1=(sum/4095)*5;            sum_final=sum_final1*1000;            a1=(int)sum_final/1000;            b1=(int)sum_final%1000/100;            c1=(int)sum_final%1000%100/10;            d1=(int)sum_final%10;            display(a1,b1,c1,d1);           }         } 

    标签: 2543 TLC

    上传时间: 2013-11-19

    上传用户:shen1230

  • AVR事无巨细系列

    ,我说说AVR 的集成开发环境。也就是常说的IDE(Integrated Development Environment)。图片比较多,虽然用软件处理过体积,网页可能还是比较慢,还请见谅。 现今世界上的AVR 开发环境可以说是百花齐放了,互相当然各有长短,我们看看都有哪些: 首当其冲的应该还是IAR,为什么呢,因为当初AVR 还在ATMEL 胎中酝酿的时候,IAR 公司 参与了AVR 的设计,因此可以认为IAR 有更为正统的血液,它最了解AVR,它的编译器编出来的 代码应该最优秀。好比你生的孩子还是你最了解——至少相当长一段时间是这样的。事实上,IAR for AVR 确实展现了这个实力,它的功能确实最为强大,无论是源代码编写还是软件乃至硬件仿 真,编译出来的代码也十分优秀。但是事物总是相对存在的,优点有时就意味着缺点。IAR 功能 全面而强悍,代价就是它的软件界面比较复杂,设置选项多,网上的资料也比较少,最要命的是 这个软件非常的贵,好吧你说你有破解版,但是破解文件一般并不通用,而且破解方法一般都稍 显繁琐。以上几条,对于新接触AVR 的人来说,几乎是迈不过的坎。

    标签: AVR

    上传时间: 2013-10-15

    上传用户:weiwolkt

  • 基于AVR单片机在控制步进电机方面的应用

    摘要:介绍了AVR单片机在控制步进电机方面的应用,对系统的软件和硬件设计做了说明。这是一个自动翻页拍照的图书录入系统,该系统以ATmega32L为核心,通过ICCV7 for AVR和步进电机的细分驱动器对脉冲频率进行设定,进而控制翻页和拍照装置的精确位置。和传统的图书录入相比,系统具有可靠性高、实用性强、易于操作等特点。

    标签: AVR 单片机 控制 步进电机

    上传时间: 2013-11-17

    上传用户:digacha

  • The code assumes a two-dimensional computational domain with TMz polarization (i.e., non-zero field

    The code assumes a two-dimensional computational domain with TMz polarization (i.e., non-zero field Ez, Hx, and Hy). The program is currently written so that the incident field always strikes the lower-left corner of the total-field region first. (If you want a different corner, that should be a fairly simple tweak to the code, but for now you ll have to make that tweak yourself.) I have attempted to provide copious comments in the code and hope that a knowledgeable C programmer can quickly map the approach as described in the paper to what is in the program.

    标签: two-dimensional computational polarization non-zero

    上传时间: 2013-12-13

    上传用户:cylnpy

  • The tar file contains the following files: ptfsf.c: heart of the perfect TFSF code ptfsf.h: he

    The tar file contains the following files: ptfsf.c: heart of the perfect TFSF code ptfsf.h: header file for same ptfsf-demo.c: FDTD code which demonstrates use of perfect TFSF code. Essentially this program used to generate results shown in the paper ptfsf-file-maker.c: code to generate an incident-field file using the "perfect" incident fields ptfsf-demo-file.c: FDTD code which uses the perfect incident fields stored in a file fdtdgen.h: defines macros used in much of my code Makefile: simple make-file to compile programs Also include are some simple script files to run the programs with reasonable values. The code assumes a two-dimensional computational domain with TMz polarization (i.e., non-zero field Ez, Hx, and Hy). The program is currently written so that the incident field always strikes the lower-left corner of the total-field region first. (If you want a different corner, that should be a fairly simple tweak to the code, but for now you ll have to make that tweak yourself.)

    标签: ptfsf following the contains

    上传时间: 2013-11-28

    上传用户:风之骄子

  • 数字运算

    数字运算,判断一个数是否接近素数 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

  • TIMER.ASM ********* [ milindhp@tifrvax.tifr.res.in ] Set Processor configuration word as = 000

    TIMER.ASM ********* [ milindhp@tifrvax.tifr.res.in ] Set Processor configuration word as = 0000 0000 1010 b. a] -MCLR tied to VDD (internally). b] Code protection off. c] WDT disabled. d] Internal RC oscillator [4 MHZ].

    标签: configuration Processor milindhp tifrvax

    上传时间: 2015-05-24

    上传用户:wqxstar

  • The government of a small but important country has decided that the alphabet needs to be streamline

    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

  • The Bayesian Committee Machine (BCM) is an approximation method for large-scale Gaussian process re

    The Bayesian Committee Machine (BCM) is an approximation method for large-scale Gaussian process regression. - The code is for Matlab Version 1.0, November 2005

    标签: approximation large-scale Committee Bayesian

    上传时间: 2015-09-14

    上传用户:caiiicc