这些小活动你都参加了吗?快来围观一下吧!>>
电子产品世界 » 论坛首页 » DIY与开源设计 » 电子DIY » cat3902982 MCU DIY进程帖

共5条 1/1 1 跳转至

cat3902982 MCU DIY进程帖

助工
2011-11-11 16:53:12     打赏

线晒下焊的东西吧,因为有些器件还没有过来就,发个办成品的照片,展示下进度:





跟新中




关键词: cat3902982     进程    

助工
2011-12-20 22:06:44     打赏
2楼

/********************************************************************************
*- 花样流水灯                                                                  *
* P1---8个LED   硬件:8路指示灯接P1口                          *
*********************************************************************************
*  日期:  2011-12-20                                                            *
*  版本:  V1.0                                                                  *
*  作者:  CAT                                   *
********************************************************************************/
#include <reg51.h>
#include <intrins.h>
#define uchar unsigned char
#define uint unsigned int
uchar code display_P1[]={
  0xFE,0xFD,0xFB,0xF7,0xEF,0xDF,0xBF,0x7F,
        0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
        0x7F,0xBF,0xDF,0xEF,0xF7,0xFB,0xFD,0xFE,0xFF,
        0xFE,0xFC,0xF8,0xF0,0xE0,0xC0,0x80,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,   //
        0x00,0x80,0xC0,0xE0,0xF0,0xF8,0xFC,0xFE,   //
        0xFC,0xF9,0xF3,0xE7,0xCF,0x9F,0x3F,0x7F,
  0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,   //
        0xE7,0xDB,0xBD,0x7E,0xBD,0xDB,0xE7,0xFF,
        0xE7,0xC3,0x81,0x00,0x81,0xC3,0xE7,0xFF,
        0xAA,0x55,0x18,0xFF,0xF0,0x0F,0x00,0xFF,
  0xFF,0x00,0x00,0xFF,0xFF };      
/**********************************************************/
void delayms(uint ms)// 延时子程序
{
  uchar k;
  while(ms--)
  {
    for(k = 0; k < 50; k++);
  }
}      
/**********************************************************/
void main(void)
{
  uchar i;
  P1 = 0xff;
   
  while(1)
   for(i=0;i <110; i++)     
    {
      P1 =display_P1[i];
      delayms(350);
    }
}       
/**********************************************************/

助工
2011-12-20 22:12:29     打赏
3楼

助工
2011-12-20 22:51:32     打赏
4楼


助工
2011-12-20 23:39:13     打赏
5楼
LED.rar工程文件!

共5条 1/1 1 跳转至

回复

匿名不能发帖!请先 [ 登陆 注册 ]