數(shù)據(jù)驅(qū)動(dòng)、堅(jiān)持為客戶提供有價(jià)值的服務(wù)和內(nèi)容
51單片機(jī)初學(xué)者流水燈程序1、程序?qū)嵗?
LED閃爍程序示例#include reg52.h//這是單片機(jī)頭文件,主要包含幾個(gè)寄存器等/*初步點(diǎn)亮LED燈,LED閃爍*/sbit /*延遲函數(shù)*/void delay (統(tǒng)一Inti ) while(I-- ); }void main ()//調(diào)用主函數(shù)) {led0=0; //低電平LED點(diǎn)亮delay(50000 ); led0=1; //高電平LED熄滅延遲(50000 ); (/)如果需要繼續(xù)閃爍,while循