1.跪求单片机流水灯论文摘要英文翻译
Since the introduction of computer-chip technology in society, in every field in a wide range of applications.Running light control systems, the microcontroller is replaced by the gear regulating the delay time of old growth rate in future in the heart of this system.Due to the MCU has several benefits: small size, light weight, a single power supply; features, low power consumption and low; and the data transfer, one finds in SCM internal, run fast, uding, high reliability, so single-chip is widely used in measurement and control system, data acquisition, instrumental, Mechatronics product, smart interface, computer communications, as well as single-chip multilevel system, etc.This article is primarily deals with a subject name is single-chip-chip, flowing water and light control, which enables we learned how to use the SCM control our lives in the application of the facility.The design of this subject at a later time, introduced me to many aspects of the SCM.This topic describes in detail by the MCS-89C51 manifold programming the control circuit, it completed the single-chip flowing water and light control features, and gives specific hardware circuits and the appropriate program.This kind of control circuit reliability, flexibility, use the wide-ranging especially suitable for medium-sized cities of traffic lights, neon lights, etc.Rather, it on other similar system has certain significance.。
2.求多路彩灯控制器的设计(完整的毕业设计有内容摘要 关键词 参考文
多路彩灯控制器的设计湖南文理学院 符子根[摘 要 ]本文利用 8051单片机的串行口来实现循环彩灯的设计。
系统模块主要包括键盘控制模块和流水彩灯模拟显示模块。键盘控制模块采用行列式键盘 ,通过中断调用程序对单片机进行控制。
流水彩灯模拟显示模块采用 2片74LS164的并联扩展 ,从而实现 16路彩灯的流水效果。系统并用 WAVE软件进行了模拟仿真 ,结果表明可以实现流水彩灯的控制。
[关键词 ]单片机 串行口 8051一、引言多路彩灯 (即流水灯 )是现代大都市装扮美化城市夜景的灯饰之一。以前的流水灯控制器均是采用模拟或数字技术设计 ,电路复杂 ,成本较高 ,并且功能简单 ,所以已不能满足日益增长的用户需要。
本设计采用单片机设计 ,电路结构简单 ,成本低廉 ,功能灵活多样 ,实用性较强。二、设计方案的选择和论证。
.三、总结本设计系统与市面上大多数的 LED彩灯相比 ,该种彩灯具有更好的灯光装饰效果 ,性价比更高 ,与普通的全硬件 LED彩灯相比具有更好的经济效益。应用主控模块输出的控制信号去控制灯管内的 LED板模块工作 ,使得产品性能稳定 ,便于安装容易操作。
由于控制程序存储在 8051单片机的电可擦除Falsh闪存 EPROM中 ,如果用户需要更改系统的亮灯模式 ,无需改变系统硬件电路 ,只需修改其中程序即可 ,是一种很有发展前途的彩灯控制器。参考文献[1 ]张毅刚. 单片机原理及应用 [M ].北 京 : 高等教育出版社 ,2004[2 ] ISD ChpiCorde.r SID2500 Sereis. Prnited ni the USA,2000[3 ]楼然苗. 51系列单片机设计实例 [M ]. 北京: 北京航空航天大学出版社 ,2 003[4 ]李华等. MCS - 51系列单片机实用接口技术 [M ]. 北京: 北京航空航天大学出版社 , 1993[5] 陈东光 赵,性初.单 片微型计算机原理与接口技术 第(二版 ) [M ].武汉:华中科技大学出版社 ,1999。
3.多功能流水灯的设计
从原理图可以看出,如果我们想让接在P1.0口的LED1亮起来,那么我们只要把P1.0口的电平变为低电平就可以了;相反,如果要接在P1.0口的LED1熄灭,就要把P1.0口的电平变为高电平就可以;同理,接在P1.1~P1.7口的其他7个LED的点亮和熄灭方法方法同LED1。因此,要实现流水灯功能,我们只要将LED2~LED8依次点亮、熄灭,依始类推,8只LED变会一亮一暗的做流水灯了。
实现8个LED流水灯程序用中文表示为:P1.0低、延时、P1.0高、P1.1低、延时、P1.1高、P1.2低、延时、P1.2高、P1.3低、延时、P1.3高、P1.4低、延时、P1.4高、P1.5低、延时、P1.5高、P1.6低、延时、P1.6高、P1.7低、延时、P1.7高、返回到开始、程序结束。
从上面中文表示看来实现单片机流水灯很简单,但是我们不能说P1.0你变低,它就变低了。因为单片机听不懂我们的汉语的,只能接受二进制的“1、0。。”机器代码。我们又怎样来使单片机按我们的意思去工作呢?为了让单片机工作,只能将程序写为二进制代码交给其执行;早期单片机开发人员就是使用人工编写的二进制代码交给单片机去工作的。今天,我们不必用烦人的二进制去编写程序,完全可以将我们容易理解的“程序语言”通过“翻译”软件“翻译”成单片机所需的二进制代码,然后交给单片机去执行。这里的“程序语言”目前主要有汇编语言和C语言两种;在这里我们所说的“翻译”软件,同行们都叫它为“编译器”,将“程序语言”通过编译器产生单片机的二进制代码的过程叫编译。前面说到,要想使LED1变亮,只需将对应的单片机引脚电平变为低电平就可以了。现在让我们将上面提到的8只LED流水灯实验写为汇编语言程序。
实现8个LED流水灯汇编语言源程序 liu01.asm
;----- 主程序开始 -----
START: CLR P1.0 ;P1.0输出低电平,使LED1点亮
ACALL DELAY ;调用延时子程序
SETB P1.0 ;P1.0输出高电平,使LED1熄灭
CLR P1.1 ;P1.1输出低电平,使LED2点亮
ACALL DELAY ;调用延时子程序
SETB P1.1 ;P1.1输出高电平,使LED2熄灭
CLR P1.2 ;P1.2输出低电平,使LED3点亮
ACALL DELAY ;调用延时子程序
SETB P1.2 ;P1.2输出高电平,使LED3熄灭
CLR P1.3 ;P1.3输出低电平,使LED4点亮
ACALL DELAY ;调用延时子程序
SETB P1.3 ;P1.3输出高电平,使LED4熄灭
CLR P1.4 ;P1.4输出低电平,使LED5点亮
ACALL DELAY ;调用延时子程序
SETB P1.4 ;P1.4输出高电平,使LED5熄灭
CLR P1.5 ;P1.5输出低电平,使LED6点亮
ACALL DELAY ;调用延时子程序
SETB P1.5 ;P1.5输出高电平,使LED6熄灭
CLR P1.6 ;P1.6输出低电平,使LED7。余下全文>>
4.基于单片机的流水灯程序设计
// 功能 :p0口八个灯作3路跑马灯
// 日期 :2007.10.28
// 程序 :阿辉
// 互动 : 有问题可进小组讨论
// 我们将随时关注小组问题及时为你答疑
//
#include
#define uchar unsigned char
#define uint unsigned int
#define led_data P0 //数据口定义
//延时程序
void delay(uint a)
{
uint i,j;
for(i=a;i>0;i--)
{
for(j=4000;j>0;j--)
;
}
}
//主程序
void main()
{
while(1)
{
led_data=0xdb;
delay(5); //延时一段
led_data=0x6d;
delay(5); //延时一段
led_data=0xb6;
delay(5); //延时一段
}
}
;* 功能 :p0口八个灯作3路跑马灯
;* 日期 : 2007.10.28
;* 程序 :阿辉
;* 互动 : 有问题可进小组讨论
;* 我们将随时关注小组问题及时为你答疑
LED_DATA EQU P0 ;数据口定义
ORG 0000H
LJMP MAIN
ORG 030H
MAIN: MOV LED_DATA,#0DBH ;11011011--零为亮
ACALL DELAY ;延时一段
MOV LED_DATA,#06DH ;01101101
ACALL DELAY ;延时一段
MOV LED_DATA,#0B6H ;10110110
ACALL DELAY ;延时一段
AJMP MAIN ;跳转回主程序
DELAY: MOV R7,#255 ;延时子程序
D1: MOV R6,#255
D2: DJNZ R6,D2
DJNZ R7,D1
RET
END
5.51单片机流水灯设计思想
用移位的方法,逐一给低电平。
#include<reg52.h>
#define uint unsigned int
#define uchar unsigned char
void delayms(uint xms)
{
uint i,j;
for (i=xms;i>0;i--)
for(j=110;j>0;j--);
}
uchar a;
void main()
{
a=0xff;
while(1)
{
P1=a;
delayms(200);
a=a>>1;
}
}
6.关于单片机C语言的流水灯设计
把18个发光二极管分别与单片机的P0.0-P0.7、P1.0-P1.7、P2.0-P2.1,并街上5K欧的上拉电阻。
程序如下:
#include<reg52.h>
#include <intrins.h>
#define uint unsigned int
#define uchar unsigned char
uchar temp0,temp1,num;
sbit d1=P2.0;
sbit d2=P2.1;
void delay(uint);
void main()
{
while(1)
{
temp0=0xfe;
temp1=0xff;
d1=1;
d2=1;
for(num=0;num<8;num++)
{
P0=temp0;
P1=temp1;
delay(100);
temp0=_crol_(temp0,1);
P0=0xff;
delay(100);
}
temp0=0xff;
temp1=0xfe;
d1=1;
d2=1;
for(num=0;num<8;num++)
{
P0=temp0;
P1=temp1;
delay(100);
temp1=_crol_(temp1,1);
P1=0xff;
delay(100);
}
temp0=0xff;
temp1=0xff;
d1=0;
d2=1;
delay(100);
d1=1;
d2=0;
delay(100);
}
}
void delay(uint z)
{
uint x,y;
for(x=z;x>0;x--)
for(y=110;y>0;y--);
}
上面是依次点亮程序,时间间隔为100ms,如果更改,只需更改delay()内的数字即可;
全部点亮程序如下:
#include<reg52.h>
#include <intrins.h>
#define uint unsigned int
#define uchar unsigned char
uchar temp0,temp1,num;
sbit d1=P2.0;
sbit d2=P2.1;
void main()
{
temp0=0xff;
temp1=0xff;
d1=1;
d2=1;
P0=temp0;
P1=temp1;
}