標題: C51單片機關于74ls138譯碼器的應用(仿真+代碼) [打印本頁]

作者: WWCL    時間: 2019-1-26 00:08
標題: C51單片機關于74ls138譯碼器的應用(仿真+代碼)
仿真原理圖如下(proteus仿真工程文件可到本帖附件中下載)

程序如下
/***************   writer:shopping.w   ******************/
#include <reg52.h>
#define uint unsigned int
#define uchar unsigned char

void Delay(uint x)
{
         uchar i;
        while(x--)
        {
                 for(i=0;i<120;i++);
        }
}

void main()
{
         P2 = 0x00;
        while(1)
        {
                 P2 = (P2+1)%8;
                Delay(50);
        }
}

全部資料51hei下載地址:
01 74LS138譯碼器應用.zip (26.26 KB, 下載次數(shù): 27)






歡迎光臨 (http://www.torrancerestoration.com/bbs/) Powered by Discuz! X3.1