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
基于CC1110单片机公交报站系统主要由CC1110单片机最小系统和WT588D语音模块组成,提出了如何实现语音报站,通过无线通信SimpliciTI网络协议实现公交站台的自动播报和OLCD液晶显示公交运行的各类信息。结果表明,该公交报站系统报站准确率99%,价格比同类产品下降了300%以上,系统组成结构简单,提高了系统的抗干扰性和稳定性,也便于携带。 Abstract: The bus stop announcement system based on CC1110 MCU is composed of CC1110 MCU minimum system and WT588D voice module. How to achieve the voice announcing is put forward.The bus-stop will announce automatically and display on the OLCD by means of wireless communication SimpliciTI network protocol. As a result, the bus station stop announcement systems reported 99% accuracy rate, price of similar products declined by 300% or more, system of simple structure, improve the anti-jamming and stability of the power system, it is also portable.
上传时间: 2013-10-21
上传用户:baby25825
本文针对实验平台管理系统的实际需求,结合密码技术和身份认证技术,采用了基于USB Key的双因子身份认证技术。目前众多身份认证技术当中,USB Key是被认为最安全的身份认证手段,除了生物特征身份认证技术。但是因为成本问题,生物特征身份认证技术并没有被广泛使用。而且通过深入研究,可以进一步完善USB Key的功能,使USB Key不仅能起到认证的作用,还可以用于存储数据。因此,随着人们对网络安全问题的重视程度加深,USB Key身份认证方式将在各安全需求领域大显身手
上传时间: 2014-12-27
上传用户:sun_pro12580
基于PIC单片机的低功耗读卡器硬件设计:本文提出了一个完整的基于串口的智能读卡器子系统设计方案并将其实现。读卡器的设计突出了小型化的要求,全部器件使用贴片封装。为了减小读卡器的体积,设计中还使用了串口窃电的技术,使用串口信号线直接给读卡器供电。为此,读卡器使用了省电的设计,采用了省电的集成电路,并大胆简化了许多传统的设计电路。关键字: 读卡器, 单片机, 串口窃电 Abstract: This paper aims to put forward a complete design of Smart IC card reader based onSerial Port and propose the way of realizing it for the purpose of Network Security. SMD isadopted to make Smart IC reader smaller in this design. To reduce the volume of Smart ICreader, Serial Port powered technology is employed to get power from the signal line of Serial Port. For this reason, low-power consumption components are adopted in the design and some traditional designs are simplified to reduce the power consumption.Keywords: Card Reader; Single-chip Computer; Serial Port Powered IC 卡系统保存了加密算法所需要的工作密钥,供加密算法对网络上传输的数据加密使用,是整个系统网络安全的核心。在IC 卡子系统中,读卡器是一个重要的部分。它起着管理IC卡、在IC 卡和PC或网络计算机间传递数据的重要作用。本文以一片PIC单片机为核心完成了基于RS232 串口的读卡器的硬件设计。
上传时间: 2014-04-14
上传用户:wanghui2438
网络安全知识
上传时间: 2013-10-12
上传用户:tsfh
基于解决缓冲区溢出这一普遍发生的网络安全漏洞的目的,通过软件、硬件技术层面的验证方法,结合人工检查、静态发现技术、动态防御技术等实验手段,得出了在向缓冲区中传输数据时可以通过数组边界检
上传时间: 2013-10-30
上传用户:shawvi
随着无线网络快速成长,开始将现有的企业网络环境与无线局域网紧密地整合在一起。利用指纹的唯一性、成本低、储存空间小以及安全度高并容易使用等优点,提出了一套生物指纹特征技术来实现企业在无线局域网中的身份认证。该方法在企业在无线网络安全认证上有较大的实用价值。
上传时间: 2013-11-18
上传用户:642778338
工作原理 该装置电路原理见图1。由红外线传感器、信号放大电路、电压比较器、延时电路和音响报警电路等组成。红外线探测传感器IC1探测到前方人体辐射出的红外线信号时,由IC1的②脚输出微弱的电信号,经三极管VT1等组成第一级放大电路放大,再通过C2输入到运算放大器IC2中进行高增益、低噪声放大,此时由 IC2①脚输出的信号已足够强。IC3作电压比较器,它的第⑤脚由R10、VD1提供基准电压,当IC2①脚输出的信号电压到达IC3的⑥脚时,两个输入端的电压进行比较, 此时IC3的⑦脚由原来的高电平变为低电平。IC4为报警延时电路,R14和C6组成延时电路,其时间约为1分钟。当IC3的⑦脚变为低电平时,C6通过VD2放电,此时IC4的②脚变为低电平它与IC4的③脚基准电压进行比较,当它低于其基准电压时,IC4的①脚变为高电平,VT2 导通,讯响器BL通电发出报警声。人体的红外线信号消失后,IC3的⑦脚又恢复高电平输出,此时VD2截止。由于C6两端的电压不能突变, 故通过R14向 C6缓慢充电,当C6两端的电压高于其基准电压时,IC4的①脚才变为低电平,时间约为1分钟,即持续1分钟报警。
上传时间: 2013-12-19
上传用户:Breathe0125