80C51单片机模仿实例100—2 从左到右的流水灯

废话不多说,直接上图。
从左到右的流水灯

/* Main.c file generated by New Project wizard
 *
 * Created:   周六 11月 25 2017
 * Processor: 80C52
 * Compiler:  Keil for 8051
 * Author:    Chenchong 
 */

#include <reg51.h>
#include <intrins.h>
#define uchar unsigned char 
#define uint unsigned int 
sbit LED=P1^0;
void DelayXms(uint x)
{
      uchar i;
      while(x--)
      {
    for(i=0;i<120;i++); 
      }
}
void main(void)
 { 
   // Write your code here
   P0=0xfe;//1111 1110
   while (1)
   {
      P0=_crol_(P0,1);//1111 1101→1111 1011
      DelayXms(150);

   }
      ;
 }
第一章 AT89S51单片机实验及实践系统板简介┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅1 第二章 Keil C软件使用┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅14 第三章 AT89S51单片机下载器软件使用┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅25 第四章 实验及实践课题┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅28 1. 闪烁灯┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅28 2. 模拟开关灯┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅31 3. 多路开关状态指示┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅33 4. 广告灯的左移右移┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅37 5. 广告灯(利用取表方式)┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅40 6. 报警产生器┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅43 7. I/O并行口直接驱动LED显示┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅46 8. 按键识别方法之一┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅49 9. 一键多功能按键识别技术┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅53 10. 00-99计数器┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅57 11. 00-59秒计时器(利用软件延时)┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅60 12. 可预置可逆4位计数器┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅63 13. 动态数码显示技术┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅67 14. 4×4矩阵式键盘识别技术┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅70 15. 定时计数器T0作定时应用技术(一)┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅79 16. 定时计数器T0作定时应用技术(二)┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅84 17. 99秒马表设计┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅89 18. “嘀、嘀、……”报警声┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅95 19. “叮咚”门铃┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅99 20. 数字钟(★)┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅105 21. 拉幕式数码显示技术┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅114 22. 电子琴┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅121 23. 模拟计算器数字输入及显示┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅134 24. 8×8LED点阵显示技术┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅141 25. 点阵LED“0-9”数字显示技术┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅146 26. 点阵式LED简单图形显示技术┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅153 27. ADC0809 A/D转换器基本应用技术┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅157 28. 数字电压表┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅163 29. 两点间温度控制┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅167 30. 四位数数字温度计┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅172 31. 6位数显频率计数器┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅177 32. 电子密码锁设计┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅180 33. 4×4键盘及8位数码管显示构成的电子密码锁┅┅┅┅┅┅┅┅┅┅┅186 34. 带有存储器功能的数字温度计-DS1624技术应用┅┅┅┅┅┅┅┅┅┅199 35. DS18B20数字温度计使用┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅211
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值