久久ER99热精品一区二区-久久精品99国产精品日本-久久精品免费一区二区三区-久久综合九色综合欧美狠狠

新聞中心

EEPW首頁 > 嵌入式系統 > 設計應用 > DAC0832數模轉換實驗

DAC0832數模轉換實驗

作者: 時間:2016-11-13 來源:網絡 收藏
#include

#include
#define uchar unsigned char
#define uint unsigned int
uchar tt;
uint temp;

本文引用地址:http://cqxgywz.com/article/201611/316311.htm

void delay(uint z)
{
uint x,y;
for(x=110;x>0;x--)
for(y=z;y>0;y--);
}
void main()
{
TMOD=0x01;
TH0=(65536-50000)/256;
TL0=(65536-50000)%256;
EA=1;
ET0=1;
TR0=1;
while(1)
{

for(temp=0x80;temp<0xff;temp++)
{
P0=temp;
delay(10);

}
for(temp=0xff;temp>0x80;temp--)
{
P0=temp;
delay(10);
}

}
}

void timer0() interrupt 1
{
TH0=(65536-50000)/256;
TL0=(65536-50000)%256;
tt++;
}



關鍵詞: DAC0832數模轉

評論


技術專區

關閉