- 博客(10)
- 资源 (1)
- 收藏
- 关注
原创 MATLAB中绘图的应用
<br />%%%三相同步发电机实验%%%<br /><br />clc;<br />IF=[946.5 805.5 704.1 603.4 503.1 402.2 299.3 262.2 0];<br />U=[261.3 244.4 231.5 211.7 188 160.2 127.6 115.4 16.2];<br />IF1=0:10:1000;<br />%%%%%%%%%%%%%%%%%%%%%%%%%%%<br />subplot(2,2,1);<br />U1=interp1(IF,U,I
2011-04-09 11:17:00 403
原创 例程 1602液晶操作
<br />#include<reg52.h><br />#define uchar unsigned char<br />#define uint unsigned int<br />uchar code table[]="I LIKE MCU!";<br />uchar code table1[]="WWW.TXMCU.COM";<br />sbit lcden=P3^4;<br />sbit lcdrs=P3^5;<br />sbit dula=P2^6;<br />sbit wela=P2^7;<b
2011-02-07 20:46:00 472
原创 例程 关于串口通信
<br />#include<reg52.h><br />unsigned char flag,a;<br />void main()<br />{<br /> TMOD=0x20;//设置定时器1为工作方式2<br /> TH1=0xfd;<br /> TL1=0xfd;<br /> TR1=1;<br /> REN=1;<br /> SM0=0;<br /> SM1=1;<br /> EA=1;<br /> ES=1;<br /> while(1)<br /> {<br /> /* if(RI==1
2011-02-07 20:36:00 372
原创 51的综合应用程序
<br />//完成串口通信,,数码管显示,,AD DA采样综合使用<br /> <br />#include<reg52.h><br />#define uchar unsigned char <br />#define uint unsigned int<br />sbit beep=P2^3;<br />sbit csda=P3^2;<br />sbit s2=P3^4;<br />//sbit s3=P3^5;<br />sbit wr=P3^6;<br />sbit rd=P3^7;<br />
2011-02-01 20:44:00 449
原创 简单的操作通信
<br />#include<reg52.h><br />unsigned char flag;<br />unsigned char code table[]={<br />0x3f,0x06,0x5b,0x4f,<br />0x66,0x6d,0x7d,0x07,<br />0x7f,0x6f,0x77,0x7c,<br />0x39,0x5e,0x79,0x71};<br />unsigned int num=0,val=0,val1=0,val2=0;<br />sbit beep=P2^3;<br
2011-01-29 15:12:00 562
原创 串口通讯原理
<br />#include<reg52.h><br />#define uchar unsigned char<br />#define uint unsigned int<br />/*由上位机发送1给单片机时,蜂鸣器以400ms频率发声,<br />发2时以200ms频率发声,发3时以100ms频率发声,发4时关闲蜂鸣器。<br />*/<br />sbit beep=P2^3;<br />uchar num,val,count;<br />void init()<br />{<br /> TMOD
2011-01-29 10:04:00 498
原创 关于定时器的简单联系
<br /><br /> #include<reg52.h> <br />#include<intrins.h><br />sbit beep=P2^3;<br />sbit led1=P1^0;<br />#define uint unsigned int <br />#define uchar unsigned char <br />uint num,count;<br />uchar m=0xfe , val=0,flag=0;<br />sbit dula=P2^6;<br />sbit wel
2011-01-26 22:12:00 476
原创 独立键盘的练习实验
<br />#include<reg52.h> <br /> //数码管显示0-59的计数器" <br />//数码管前三位显示<br />//一个跑表,从000到999之间以1%秒速度运行,<br />//当按下一个独立键盘时跑表停止,松开手后跑表继续运行。(用定时器设计表)。<br />#include<intrins.h><br />sbit beep=P2^3;<br />sbit s2=P3^4;//to<br />sbit s3=P3^5;<br />sbit s4=P3^6;<br />sb
2011-01-25 17:01:00 612
原创 数码管笔记1
#include //数码管显示0-59的计数器#includesbit beep=P2^3;#define uint unsigned int #define uchar unsigned char sbit dula=P2^6;sbit wela=P2^7;uchar num;uchar code table[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71};void delay(u
2011-01-24 21:10:00 476
原创 流水灯学习笔记
1. /流水灯/#include#include sbit beep=P2^3;void delay(unsigned int x) 延时函数{ unsigned int i,j; for(i=x;i>0;i--) for(j=110;j>0;j--);}void main() { unsigned char n; n=0x01; P1=n; while(1) { delay(1000); n=_crol_(n,1);
2011-01-24 19:12:00 544
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人