标题: 单片机模拟开关灯和广告灯仿真实验 [打印本页]

作者: 813640712    时间: 2017-11-13 13:02
标题: 单片机模拟开关灯和广告灯仿真实验
基于单片机的广告的设计


单片机源程序如下:
  1. #include <REG52.H>

  2. unsigned char code table[]={0xfc,0xf3,0xcf,0x3f,0xff,0x00,0xff,0x3f,0xcf,0xf3,0xfc,0xff,0x00,0xff,0x01};//定义广告灯的变化样式

  3. unsigned char i;

  4. /******定义延时子程序**********/
  5. void delay(void)
  6. {
  7.         unsigned char m,n,s;
  8.         for(m=20;m>0;m--)
  9.         for(n=20;n>0;n--)
  10.         for(s=248;s>0;s--);
  11. }
  12. //////////////////////////////

  13. void main(void)
  14. {
  15.         while(1)
  16.         {
  17.                 if(table[i]!=0x01)
  18.                 {
  19.                         P0=table[i];
  20.                         i++;
  21. ……………………

  22. …………限于本文篇幅 余下代码请从51黑下载附件…………
复制代码

所有资料51hei提供下载:
实验一.rar (99.63 KB, 下载次数: 28)







欢迎光临 (http://www.51hei.com/bbs/) Powered by Discuz! X3.1