附件为:LCD12864显示汉字和数字的程序与电路 /* 自定义延时子函数 */ void delayms(uchar z) { int x,y; for(x=z;x>0;x--) for(y=110;y>0;y--); } /* 判断LCD忙信号状态 */ void buys() { int dat; RW=1; RS=0; do { P0=0x00; E=1; dat=P0; E=0; dat=0x80 & dat; } while(!(dat==0x00)); } /* LCD写指令函数 */ void w_com(uchar com) { //buys(); RW=0; RS=0; E=1; P0=com; E=0; } /* LCD写数据函数 */ void w_date(uchar date) { //buys(); RW=0; RS=1; E=1; P0=date; E=0; } /* LCD选屏函数 */ void select_screen(uchar screen) { switch(screen) { case 0: //选择全屏 CS1=0; CS2=0; break; case 1: //选择左屏 CS1=0; CS2=1; break; case 2: //选择右屏 CS1=1; CS2=0; break; /* case 3: //选择右屏 CS1=1; CS2=1; break; */ } } /* LCDx向上滚屏显示 */ void lcd_rol() { int x; for(x=0;x<64;x++) { select_screen(0); w_com(0xc0+x); delayms(500); } } /* LCD清屏函数:清屏从第一页的第一列开始,总共8页,64列 */ void clear_screen(screen) { int x,y; select_screen(screen); //screen:0-选择全屏,1-选择左半屏,2-选择右半屏 for(x=0xb8;x<0xc0;x++) //从0xb8-0xbf,共8页 { w_com(x); w_com(0x40); //列的初始地址是0x40 for(y=0;y<64;y++) { w_date(0x00); } } } /* LCD显示汉字字库函数 */ void lcd_display_hanzi(uchar screen,uchar page,uchar col,uint mun) { //screen:选择屏幕参数,page:选择页参数0-3,col:选择列参数0-3,mun:显示第几个汉字的参数 int a; mun=mun*32; select_screen(screen); w_com(0xb8+(page*2)); w_com(0x40+(col*16)); for ( a=0;a<16;a++) { w_date(hanzi[mun++]); } w_com(0xb8+(page*2)+1); w_com(0x40+(col*16)); for ( a=0;a<16;a++) { w_date(hanzi[mun++]); } } /* LCD显示字符字库函数 */ void lcd_display_zifuk(uchar screen,uchar page,uchar col,uchar mun) { //screen:选择屏幕参数,page:选择页参数0-3,col:选择列参数0-7,mun:显示第几个汉字的参数 int a; mun=mun*16; select_screen(screen); w_com(0xb8+(page*2)); w_com(0x40+(col*8)); for ( a=0;a<8;a++) { w_date(zifu[mun++]); } w_com(0xb8+(page*2)+1); w_com(0x40+(col*8)); for ( a=0;a<8;a++) { w_date(zifu[mun++]); } } /* LCD显示数字字库函数 */ void lcd_display_shuzi(uchar screen,uchar page,uchar col,uchar mun) { //screen:选择屏幕参数,page:选择页参数0-3,col:选择列参数0-7,mun:显示第几个汉字的参数 int a; mun=mun*16; select_screen(screen); w_com(0xb8+(page*2)); w_com(0x40+(col*8)); for ( a=0;a<8;a++) { w_date(shuzi[mun++]); } w_com(0xb8+(page*2)+1); w_com(0x40+(col*8)); for ( a=0;a<8;a++) { w_date(shuzi[mun++]); } } /* LCD初始化函数 */ void lcd_init() { w_com(0x3f); //LCD开显示 w_com(0xc0); //LCD行初始地址,共64行 w_com(0xb8); //LCD页初始地址,共8页 w_com(0x40); //LCD列初始地址,共64列 } /* LCD显示主函数 */ void main() { //第一行 int x; lcd_init(); //LCD初始化 clear_screen(0); //LCD清屏幕 lcd_display_shuzi(1,0,4,5); //LCD显示数字 lcd_display_shuzi(1,0,5,1); //LCD显示数字 lcd_display_hanzi(1,0,3,0); //LCD显示汉字 lcd_display_hanzi(2,0,0,1); //LCD显示汉字 //LCD字符汉字 lcd_display_hanzi(2,0,1,2); //LCD显示汉字 //第二行 lcd_display_zifuk(1,1,2,0); //LCD显示字符 lcd_display_zifuk(1,1,3,0); //LCD显示字符 lcd_display_zifuk(1,1,4,0); //LCD显示字符 lcd_display_zifuk(1,1,5,4); //LCD显示字符 lcd_display_shuzi(1,1,6,8); //LCD显示字符 lcd_display_shuzi(1,1,7,9); //LCD显示字符 lcd_display_shuzi(2,1,0,5); //LCD显示字符 lcd_display_shuzi(2,1,1,1); //LCD显示字符 lcd_display_zifuk(2,1,2,4); lcd_display_zifuk(2,1,3,1); lcd_display_zifuk(2,1,4,2); lcd_display_zifuk(2,1,5,3); //第三行 for(x=0;x<4;x++) { lcd_display_hanzi(1,2,x,3+x); //LCD显示汉字 } for(x=0;x<4;x++) { lcd_display_hanzi(2,2,x,7+x); //LCD显示汉字 } //第四行 for(x=0;x<4;x++) { lcd_display_zifuk(1,3,x,5+x); //LCD显示汉字 } lcd_display_shuzi(1,3,4,7); lcd_display_shuzi(1,3,5,5); lcd_display_shuzi(1,3,6,5); lcd_display_zifuk(1,3,7,9); lcd_display_shuzi(2,3,0,8); lcd_display_shuzi(2,3,1,9); lcd_display_shuzi(2,3,2,9); lcd_display_shuzi(2,3,3,5); lcd_display_shuzi(2,3,4,6); lcd_display_shuzi(2,3,5,8); lcd_display_shuzi(2,3,6,9); lcd_display_shuzi(2,3,7,2); while(1); /* while(1) { // LCD向上滚屏显示 lcd_rol(); } */ }
上传时间: 2013-11-08
上传用户:aeiouetla
数字控制的交流调速系统所选用的微处理器、功率器件及产生PWM波的方法是影响交流调速系统性能好坏的直接因素。在介绍了正弦脉宽调制(SPWM)技术的基础上,设计了一种以8098单片机作为控制器,以智能功率模块IPM为开关器件的变频调速系统。通过软件编程,产生正弦脉冲宽度调制波形来控制绝缘栅双极晶体管的导通和关断,从而达到控制异步电动机转速的目的。实验结果表明,该系统可调频率调电压,稳定度高,调速范围宽,具有较强的实用价值 Abstract: AC variable speed with digital control systems used microprocessors, power devices and generate PWM wave is the direct factors of affecting the performance AC speed regulation system. On the basis of introducing the sinusoidal pulse width modulation (SPWM) technology,this paper designed variable speed system which used 8098 as a controller, intelligent power module IPM as switching device. Through software programming, resulting in sinusoidal pulse width modulation waveform to control the insulated gate bipolar transistor turn on and off, so as to achieve the purpose of speed control of induction motors. Experimental results show that the system can adjust frequency modulation voltage, high stability, wide speed range, has a strong practical value.
上传时间: 2013-11-14
上传用户:ynwbosss
为了使音频信号分析仪小巧可靠,成本低廉,设计了以2片MSP430F1611单片机为核心的系统。该系统将音频信号送入八阶巴特沃兹低通滤波器,对信号进行限幅放大、衰减、电平位移、缓冲,并利用一单片机负责对前级处理后的模拟信号进行采样,将采集得到的音频信号进行4 096点基2的FFT计算,并对信号加窗函数提高分辨率,另一单片机负责对信号的分析及控制显示设备。此设计精确的测量了音频信号的功率谱、周期性、失真度指标,达到较高的频率分辨率,并能将测量结果通过红外遥控器显示在液晶屏上。 Abstract: o make the audio signal analyzer cheaper, smaller and more reliable, this system sends the audio signal to the eight-order butterworth filter, and then amplifies, attenuates, buffers it in a limiting range, transfers the voltage level of the signal before utilizing two MSP430F1611 MCU to realize the audio analysis. One is charged for sampling and dealing with the processed audio signal collected by the 4096 point radix-2 FFT calculation and imposes the window function to improve the frequency resolution. The other one controls the display and realizes the spectrum, periodicity, power distortion analysis in high resolution which is displayed in the LCD screen through the infrared remote control.
上传时间: 2013-12-11
上传用户:jasonheung
介绍一种多功能音乐播放器,它是以AT89S52单片机为核心,并辅有一些外围器件,采用汇编语言编写程序,实现多功能音乐播放,歌曲自动循环播放和使用琴键自编曲目功能。此外,彩灯显示歌曲节奏,按键跳转到喜爱曲目,液晶显示当前播英文曲目。并给出了系统软硬件设计。 Abstract: It introduces a multifunctional music player,taking AT89S52 single-chip microcomputer as hardware control core and using some peripheral elements.Programmes are compiled in assembly language to act as expected.There are two functional modes in this system.One is to make the music play automatically and consecutively,the other is to compose new songs through keys.In addition,lights show the pace of music and the English names can be displayed in the liquid crystal screen.With perfect combination of hardware and software,the music player can meet many music lovers’needs for multifunctional music player.And the hardware and software of the system are given.
上传时间: 2013-11-18
上传用户:xiaodu1124
介绍了一种TI公司最新推出的MSP430F247单片机,利用它自带的I2C模块驱动I2C总线的温度传感器TMP275。TMP275是一款具有高精度、低功耗的新型温度传感器。由于TMP275具有可编程功能,纤小的封装以及极大的温度范围,因而广泛应用于组建超小型温度测量装置。 Abstract: A new single chip microcomputer MSP430F247 which is released by TI is introduced.It can drive I2C interface digital temperature sensor TMP275 with I2C module.TMP275 is a new temperature sensor which has high accurate,low power. Because TMP275 has programmable function,small packages and wide temperature range,it is applied widely in very little temperature measurment equipment.
上传时间: 2013-12-06
上传用户:asdfasdfd
C8051F020单片机通过SPI接口驱动四线电阻式触摸屏控制器TSC2046,利用中断方式驱动TSC2046设计软件。介绍了触摸屏的工作原理、TSC2046工作方式以及典型应用电路。 Abstract: The C8051F020 MCU is connected with the TSC2046 which is a 4-wire touch screen controller. The TSC2046 is controlled by interrupt mode, the? operation principle of touch screen is introduced. The operation mode of TSC2046 and typical application circuit are also discussed.
上传时间: 2014-12-27
上传用户:hwl453472107
针对目前采用的热敏电阻测量方法,提出了采用单总线数字式温度传感器DS18B20和单片机组成的新型温度测量仪。介绍DS18B20的结构和工作原理,以及单总线工作原理,给出了由Mega8单片机和DS18B20构成的单总线温度测量仪的硬件电路及软件流程图。经试验基于单总线器件DS18B20的温度测量仪,具有测量准确、测温范围宽、体积小、控制方便等优点。 Abstract: This paper brings forward a new temperature meter composed of 1-Wire temperature sensor DS18B20 and MCU which has advantage of the thermistor. In the article, the DS18B20's structure and controlling principles are introduced and hardware circuit and software diagram of the temperature meter are given.After been tested,the temperature meter has the advantages of accurate measurement, wide temperature range, small volume and convenient controlling.
上传时间: 2013-10-31
上传用户:hzy5825468
基于幅移键控技术ASK(Amplitude-Shift Keying),以C8051F340单片机作为监测终端控制器,C8051F330D单片机作为探测节点控制器,采用半双工的通信方式,通过监控终端和探测节点的无线收发电路,实现数据的双向无线传输。收发电路采用直径为0.8 mm的漆包线自行绕制成圆形空心线圈天线,天线直径为(3.4±0.3)cm。试验表明,探测节点与监测终端的通信距离为24 cm,通过桥接方式,节点收发功率为102 mW时,节点间的通信距离可达20 cm。与传统无线收发模块相比,该无线收发电路在受体积、功耗、成本限制的场合有广阔的应用前景。 Abstract: Based on ASK technology and with the C8051F340 and C8051F330D MCU as the controller, using half-duplex communication mode, this paper achieves bi-directional data transfer. Transceiver circuit constituted by enameled wire which diameter is 0.8mm and wound into a diameter (3.4±0.3) cm circular hollow coil antenna. Tests show that the communication distance between detection and monitoring of the terminal is 24cm,the distance is up to 20cm between two nodes when using the manner of bridging and the node transceiver power is 102mW. Compared with the conventional wireless transceiver modules, the circuit has wide application prospect in small size, low cost and low power consumption and other characteristics.
上传时间: 2013-10-19
上传用户:xz85592677
提出一种基于单片机AT89C51SND1C的MP3播放系统的设计方案。单片机集成了专用的解码器,使用K9F1208闪存作为外存储器,放音电路采用CS4330,存储文件通过播放器上的USB接口设备从PC机上直接下载,液晶显示采用LCD1602。方案设计简单,性价比高,低功耗,易扩展。由于采用的是通用单片机实现的,可以很容易地移植到其他微控制器系统中,有很强的市场竞争能力和实用价值。 Abstract: A MP3 player design based on microchip AT89C51SND1C was presented, which used K9F1208 Flash chip as the memory circuit and used CS4330 as play chip. Storage files were download from PC through USB interfaces player on the device,and the LCD/602 was used as display screen. This system had characteristics of simple design,low power,easy expand,low cost and high recognition. Using of universual microchip make it easy to transplant to other microcontrol system,and have strong market competitiom and practical value.
上传时间: 2014-12-27
上传用户:佳期如梦
The SN65LBC170 and SN75LBC170 aremonolithic integrated circuits designed forbidirectional data communication on multipointbus-transmission lines. Potential applicationsinclude serial or parallel data transmission, cabledperipheral buses with twin axial, ribbon, ortwisted-pair cabling. These devices are suitablefor FAST-20 SCSI and can transmit or receivedata pulses as short as 25 ns, with skew lessthan 3 ns.These devices combine three 3-state differentialline drivers and three differential input linereceivers, all of which operate from a single 5-Vpower supply.The driver differential outputs and the receiverdifferential inputs are connected internally to formthree differential input/output (I/O) bus ports thatare designed to offer minimum loading to the buswhenever the driver is disabled or VCC = 0. Theseports feature a wide common-mode voltage rangemaking the device suitable for party-lineapplications over long cable runs.
上传时间: 2013-10-13
上传用户:ytulpx