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
本文重点介绍A/D转换器的原理及其构成的单片机电压表工作原理
上传时间: 2013-10-16
上传用户:huanglang
ad与da,希望对你有帮助
上传时间: 2013-11-10
上传用户:jiangshandz
刚刚入门,希望交更多朋友。
上传时间: 2014-12-26
上传用户:xja31415
51芯片与ADc转换器
上传时间: 2013-12-26
上传用户:yy541071797
智能仪器是指内含微机(目前最适合的是单片机)和GP-IB接口的电子仪器。本书介绍以MCS-51单片机为核心的智能仪器的工作原理和设计方法。书中详细介绍了智能仪器中模拟放大电路,A/D、D/A转换器与单片机的接口设计,常用的输入输出设备(如键盘、LED、LCD、CRT显示器、微型打印机、语音处理器等)与单片机的接口技术,还深入地讨论了监控主程序和接口管理主程序的设计,常用的测量算法及优化系统性能的高精确度、高抗干扰和低功耗的设计方法。这些方法也适用于一般的单片机应用系统设计。 本书内容新颖、实用、文字精炼、通俗易懂,可作为工科院校的电子、电气、机电、仪器仪表、检测控制等专业的教科书或参考书,也可代从事智能仪器或单片机应用的研究人员和工程技术人员阅读。
上传时间: 2013-11-09
上传用户:qwerasdf
MK7A23P是带15 位(11bit+4bit)A/D转换器的RISC高性能8位微控制器。它内部包含2K字节的一次性可编程只读存储器、128字节数据存储器、定时器/计数器、中断、LVR(低电压复位)、I/O 口、比较器和PWM输出。
上传时间: 2013-12-07
上传用户:hullow
设计了一种基于PIC16C71单片机的数字水温配制阀。该配制阀采用NTC热敏电阻作温度传感器,与固定电阻组成简单分压电路作为水温测量电路,利用PIC16C71单片机内置的8位A/D转换器把热敏电阻上的模拟电压转换为数字量,PIC16C71单片机控制直流电机驱动混水阀调节冷热水的混合比例实现水温调节。给出了控制电路图,对水温测量电路的参数选择和测温精度作了详细讨论。实验和分析表明,选用阻值较大的NTC热敏电阻和分压电阻可较好地解决热敏电阻因功耗较大造成的热击穿问题。 Abstract: A digital valve for controlling water temperature based on PIC16C71 was presented in this paper.A bleeder circuit which consisted of a NTC thermistor as temperature sensor and a fixed resistance was designed as water temperature measuring circuit.The analog voltage on the thermistor was converted into digital signal by a 8-bit A/D converter embedded in PIC16C71. Based on the digital signal, the MCU PIC16C71 drived the valve by a DC motor to adjust the water temperature through adjusting the proportion of hot water and cold water.The circuit diagram of controller was given,the principle,the component parameters and the accuracy of measuring temperatures were also dissertated in detail. It was found by experiment and analysis that thermal breakdown of thermistor caused by high power could be solved by selecting thermistor and fixed resistance with high impedance value.
上传时间: 2013-11-08
上传用户:Yue Zhong
在16MHZ频率下速度为16MIPS的8位RISC结构单片机,内含硬件乘法器。 支持JTAG端口仿真和编程,仿真效果比传统仿真同更真实有效。 8通道10位AD转换器,支持单端和双端差分信号输入,内带增益可编程运算放大器。 16K字节的FLASH存贮器,支持ISP、IAP编程,使系统开发、生产、维护更容易。 多达1K字节的SRAM,32个通用寄存器,三个数据指针,使用C语言编程更容易。 512字节的EEPROM存贮器,可以在系统掉电时保存您的重要数据。 多达20个中断源,每个中断有独立的中断向量入口地址。 2个8位定时/计数器,1个16位定时/计数器,带捕捉、比较功能,有四个通道的PWM。 硬件USART、SPI和基于字节处理的I2C接口。 杰出的电气性能,超强的抗干扰能力。每个IO口可负载40mA的电流,总电流不超过200mA。 可选片内/片外RC振荡、石英/陶瓷晶振、外部时钟,更具备实时时钟(RTC)功能;片内RC振荡可达8MHZ,频率可校调到1%精度;片外晶振振荡幅度可调,以改善EMI性能。 内置模拟量比较器。 可以用熔丝开启、带独立振荡器的看门狗,看门狗溢出时间分8级可调。 内置上电复位电路和可编程低电压检测(BOD)复位电路。 六种睡眠模式,给你更低的功耗和更灵活的选择。 ATMEGA16L工作电压2.7V-5.5V,工作频率0-8MHZ;ATMEGA16工作电压4.5-5.5V,工作频率0-16MHZ。 32个IO口,DIP40、TQFP44封装。 与其它8位单片机相比,有更高的程序安全性,保护您的知识产权。
上传时间: 2013-11-22
上传用户:wcl168881111111
针对目前使用的RS232接口数字化B超键盘存在PC主机启动时不能设置BIOS,提出一种PS2键盘的设计方法。基于W78E052D单片机,采用8通道串行A/D转换器设计了8个TGC电位器信息采集电路,电位器位置信息以键盘扫描码序列形式发送,正交编码器信号通过XC9536XL转换为单片机可接收的中断信号,软件接收到中断信息后等效处理成按键。结果表明,在满足开机可设置BIOS同时,又可实现超声特有功能,不需要专门设计驱动程序,接口简单,成本低。 Abstract: Aiming at the problem of the digital ultrasonic diagnostic imaging system keyboard with RS232 interface currently used couldn?蒺t set the BIOS when the PC boot, this paper proposed a design method of PS2 keyboards. Based on W78E052D microcontroller,designed eight TGC potentiometers information acquisition circuit with 8-channel serial A/D converter, potentiometer position information sent out with keyboard scan code sequentially.The control circuit based on XC9536 CPLD is used for converting the mechanical actions of the encoders into the signals that can be identified by the MCU, software received interrupt information and equivalently treatmented as key. The results show that the BIOS can be set to meet the boot, ultrasound specific functionality can be achieved at the same time, it does not require specially designed driver,the interface is simple and low cost.
上传时间: 2013-10-10
上传用户:asdfasdfd