標(biāo)題:
TLC2543數(shù)字電壓表的51單片機(jī)源碼與proteus仿真
[打印本頁(yè)]
作者:
Cherish純紫
時(shí)間:
2018-3-21 15:50
標(biāo)題:
TLC2543數(shù)字電壓表的51單片機(jī)源碼與proteus仿真
基于51單片機(jī)的數(shù)字電壓表proteus仿真
0.png
(20.05 KB, 下載次數(shù): 88)
下載附件
2018-3-22 02:06 上傳
單片機(jī)源程序如下:
#define TLC2543_GLOBAL
#include "TLC2543.h"
uint read_TLC2543(uchar channel)
{
register uchar i;
uint tempAD = 0;
while(!TLC2543GetEoc()); //wait TLC2543 free
_delay_us(3);
channel <<= 4;
TLC2543Clk(TLC2543_CLR);
TLC2543_Cs(TLC2543_SET);
TLC2543_Cs(TLC2543_CLR); //_CS TLC2543 select
_delay_us(3);
for( i = 0; i < 12; i ++ )
{
tempAD <<= 1;
if( TLC2543GetDo() ) //read value
{
tempAD |= 0x01;
}
if( channel&0x80 )
{
TLC2543Di(TLC2543_SET);
}
else
{
TLC2543Di(TLC2543_CLR);
}
channel <<= 1;
TLC2543Clk(TLC2543_SET);
nop();
TLC2543Clk(TLC2543_CLR);
}
TLC2543_Cs(TLC2543_SET); //TLC2543 close
_delay_us(1);
return tempAD;
}
void _delay_us(uint us)
……………………
…………限于本文篇幅 余下代碼請(qǐng)從51黑下載附件…………
復(fù)制代碼
所有資料51hei提供下載:
數(shù)字電壓表.rar
(23.19 KB, 下載次數(shù): 60)
2018-3-21 15:49 上傳
點(diǎn)擊文件名下載附件
下載積分: 黑幣 -5
作者:
sheep0736
時(shí)間:
2018-8-17 16:29
我來看看
作者:
愛你不愛JJ
時(shí)間:
2018-11-18 23:32
謝謝 課程設(shè)計(jì) 正需要 很有參考價(jià)值
歡迎光臨 (http://www.torrancerestoration.com/bbs/)
Powered by Discuz! X3.1