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.跪求单片机流水灯论文摘要英文翻译
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.。
3.LED跑马灯的单片机开发板设计
这是我用的铁牛单片机开发板里面的跑马灯程序。不知道能不能给你一些启发。灯是共阳的。给低电平亮。
/************************************************************
类型:流水灯的写法,此程序是最原始的写法。
现象:发光二极管从左到右依次点亮。
编写:铁牛电子
时间:2009.3
修改:无
【版权】Copyright(C)铁牛电子 All Rights Reserved
【声明】此程序仅用于学习与参考,引用请注明版权和作者信息!
************************************************************/
#include<reg52.h> //52单片机头文件,一般不要改动,里面包含特殊功能寄存器的定义
#define uchar unsigned char //将unsigned char定义为uchar,简化输写。提高编程速度
#define uint unsigned int //将unsigned char定义为uint,简化输写。提高编程速度
uchar code table[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f}; //定义八个灯的工作状态。
/*延时子程序*/
void delay(uint time)
{
while(--time); //当time的值为非0时,执行空语句。当time为0时,跳出while语句。
}
/*主程序*/
void main()
{
uchar i; //定义一个无符号字符变量。
while(1) //做一个死循环,让程序永远在while下面的大括号里面运行。
{
for(i=0;i<8;i++) //for语句判断条,i<8成立时,执行大括号里面程序
{
P2=table[i]; //P2口对应取值,八个灯的状态
delay(10000); //延时子程序调用
}
}
}
4.多功能流水灯的设计
从原理图可以看出,如果我们想让接在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。余下全文>>