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); } }
上传时间: 2013-11-19
上传用户:shen1230
#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
摘要 本研究计划之目的,在整合应用以ARM为基础的嵌入式多媒体实时操作系统于H.264/MPEG-4多媒体上。由于H.264是一种因应实时系统(RTOS)所设计的可扩展性串流传输(scalability stream media communication)的编码技术。H.264主要架构于细细粒可扩展(Fine Granula Scalability,FGS)的压缩编码机制。细粒度可扩展压缩编码技术是最新MPEG-4串流式传输标准,能依频寛的差异来调整传输的方式。细粒度扩展缩编码技术以编入可选择性的增强层(enhanced layers)于码中,来提高影像传输的质量。本计划主要在于设计一种简单有效的实时阶层可扩展的影像传输系统。在增强层编码及H.264的基本层(base layer)编码上使用渐进的细粒度可扩展编码(Progressive Fine Granularity Scalable,PFGS)能直接使用H.264的格式特色来实现FGS。同时加入了LB-LLF(Layer-Based Least-Laxity-Fir stscheduling algorithm)的排程算法,来增 进网路传输影像的质量。由实验结果显示本系统在串流影像质量PSNR值上确有较佳的效能。
上传时间: 2014-12-26
上传用户:mpquest
介绍了基于单片机C8051F020的通用串口适配器的设计与实现方法,即由单片机控制的智能化一对多口收发信号转换器。通过采用C51对单片机进行编程,控制与RS-232(标准RS-232电平)、RS232(TTL电平)、RS-422接口的数据通信;采用C++ Builder作为开发平台,通过RS-232接口实现上位机对适配器各个通信端口的控制。 Abstract: Design and realization of a universal serial port adapter based on the MCU C8051F020 are introduced.The adapter is an intelligent one-to-more receiving and transmitting signal converter controlled by the MCU. By programming the MCU with the language C51,MCU control data communication between the MCU and RS-232(RS-232 level),RS-232(TTL level),RS-422 port; Using C++ Builder as the development plane, by one RS232 port, the upper PC can control each of the communication port of the adapter.
上传时间: 2013-11-19
上传用户:hebanlian
TKS c o pe嵌入式智能仿真开发平台全面支持AVR内核的仿真,并具有下载编程功能。TKScope仿真器提供一套完善的JTAG和debugWIRE调试接口,在芯片内(onchipdebug)调试所有的AVR 8位RISC结构微处理器。
上传时间: 2013-11-01
上传用户:xhwst
Keil C51是一种基于80C51内核的微处理器软件开发平台,内镶嵌了多种符合当前工业标准的开发工具,可以完成从工程建立到仿真的完整的开发流程。尤其是C编译工具在产生代码的准确性和效率方面达到了较高水平。
上传时间: 2013-10-31
上传用户:wangzhen1990
胰岛素泵的设计 MPLAB IDE是一种在PC 机上运行的软件,用来为Microchip Technology系列单片机开发应用程序。由于它提供了一种单一的集成环境来为嵌入式单片机开发程序代码,因此被称为集成开发环境或IDE,所有软件开发任务都可以在MPLAB IDE下完成,包括编辑、编译、调试程序和下载。MPLAB IDE提供了一个统一的开发平台,用于所有Microchip Technology处理器系统。 本系统的软件设计开发采用C语言。C语言的可移植性很高,并且可读性很好。软件设计是通过各个模块的编程设计来实现的。
上传时间: 2013-10-08
上传用户:哈哈haha
SmartSOPC教学实验开发平台集众多功能于一体,是SOPC、DSP、EDA、ARM、ARM7SOC以及8051教学实验、科研开发的最佳选择。开发平台采用“主板+核心板”的模式,更换不同的核心板即可实验不同平台的功能。
上传时间: 2013-12-09
上传用户:18602424091
关键词 EPC-266x摘 要 EPC-266x 产品上各接口说明及使用方法
上传时间: 2013-10-28
上传用户:wangcehnglin