新聞中心

EEPW首頁 > 嵌入式系統(tǒng) > 設(shè)計應(yīng)用 > 單片機與DAC0832采集數(shù)據(jù)

單片機與DAC0832采集數(shù)據(jù)

作者: 時間:2016-11-23 來源:網(wǎng)絡(luò) 收藏
#include

#define uchar unsigned char
sbit csda=P3^2;
sbit wr=P3^6;
sbit dula=P2^6;
sbit wela=P2^7;
uchar dig;
void delay(uchar);
void main()
{
dula=0;
wela=0;
csda=0;
wr=0;
//delay(200);
while(1)
{
P0=dig;
delay(10);
dig++;

}
}

本文引用地址:http://butianyuan.cn/article/201611/320234.htm

void delay(uchar x)
{
uchar a;
unsigned int b;
for(a=x;a>0;a--)
for(b=100;b>0;b--);
}




關(guān)鍵詞: 單片機DAC0832采集數(shù)

評論


技術(shù)專區(qū)

關(guān)閉