PC与单片机双向通讯智能温控程序 #include <AT89X51.H> #include <intrins.h> #define Key_UP P1_0 #define Key_DOWN P1_1 #define Key_SET P1_2 #define RelayOutPort P2_0 #define LEDPort P0 #define DELPort P2_1 #define LEDTwoC P3_6 #define LEDThreeC P3_7 #define TMPort P2_7 #define INBUF_LEN 5 //数据长度 unsigned char inbuf1[INBUF_LEN]={ 0 , 0 , 0 , 0 , 0 } //发送缓冲区 unsigned char inbuf2[50] //接收缓冲区 unsigned char count3 void init_serialcomm( void ) { SCON = 0x50 //SCON: serail mode 1, 8-bit UART, enable ucvr TMOD |= 0x20 //TMOD: timer 1, mode 2, 8-bit reload PCON |= 0x80 //SMOD=1 TH1 = 0xFA //Baud:4800 fosc=11.0592MHz IE |= 0x90 //Enable Serial Interrupt TR1 = 1 // timer 1 run } //向串口发送一个字符 void send_char_com( unsigned char ch) { SBUF=ch while (TI== 0 ) TI= 0
标签: include intrins define Key_UP
上传时间: 2014-11-29
上传用户:风之骄子
本人用AVR mega32写的一个关于输出32路PWM的程序,其中有UART,PWM,TIMER,spi,Flash读写,等等模块可供参考。程序用Studio4 + GCC编写
上传时间: 2013-12-24
上传用户:思琦琦
自己用VC编写的一个关于滚动条的实验,其中涉及wnd和timer知识,希望对大家有用
上传时间: 2017-01-29
上传用户:梧桐
C51源程序集锦 This a demo program showing a way to perform simultaneous RS-232 transmit and receive using only one hardware timer. The transmit and receive routines divide each bit time into 4 slices to allow synchronizing to incoming data that may be out of synch with outgoing data.
标签: simultaneous transmit program perform
上传时间: 2017-02-08
上传用户:yangbo69
aduc7026裸机程序,实现子功能包括:ADC,timer中断,Flash读写,Uart与PC通讯。
上传时间: 2017-02-18
上传用户:xcy122677
PLATFORM BUILDER FOR WINDOWS MOBILE 5.0、6.1,AKU FOR WM6.1 ,aku for windows mobile 6.1,aku 6.1 for windows mobile,开发平台,编译系统,带BSP包,有s3c2440,s3c2442,sc32442,s3c2416,s3c2450,s3c2451,s3c6400,s3c6410,pxa300,pxa310,pxa320,pxa312的WM BSP包,PDF文档,altas A4,Atlas3,AT643,ATLAS3,AT642,arm11的相关资料,并是WINDOWS MOBILE pb,适用于GPS,智能手机等相关领域,希望对你有帮肋的!
上传时间: 2017-02-24
上传用户:busterman
温控仪表的初始化程序,CPU为C8051F020内含有定时器ADC,SPI,UART,TIMER使能以及SYSCLK、端口配置的初始化程序
上传时间: 2017-02-25
上传用户:xfbs821
S12的一些初始化,包含SCI,TIMER,PWM等等
上传时间: 2014-02-11
上传用户:xsnjzljj
先运行力控应用程序(如演示工程——反应釜),实时数据库系统亦随之启动。 然后启动delphi6.0,创建一个新的工程。 在form1窗体中,放置DdeClientConv控件(system标签页),设置ConnectMode属性值为ddeAutomatic、DdeService属性值为db、DdeTopic属性值为db; 接下来放置DdeClientItem控件(system标签页),设置DdeConv为DdeClientConv1,设置DdeItem属性值为所要读取的数据库点参数值如dbmixvol.pv; 放置一个edit控件; 放置一个timer控件,设置interval属性值为100;在ontimer脚本中加入: procedure TForm1.Timer1Timer(Sender: TObject) begin edit1.text:=form1.DdeClientItem1.Text end
上传时间: 2014-01-22
上传用户:lwwhust
富士通微控制器8位MCU各项功能的应用实例源代码,包括I2C通信,PPG timer,AD转换,Reload timer等等的C语言例程。
上传时间: 2014-11-29
上传用户:363186