資源簡介
利用MSP430控制HX711AD采樣模塊
代碼片段和文件信息
//這個(gè)程序是網(wǎng)友提供里面有個(gè)?讀711?AD數(shù)據(jù)子程序?僅供參考
//本店不做任何注釋說明大家能用就用?不能用就刪
#include?
#include?
#include?
sbit?ADDO=P2^0;?
sbit?ADSK=P2^1;
sbit?led1=P2^4;
sbit?led2=P2^5;
sbit?led3=P2^6;
sbit?led4=P2^7;?
//unsigned?char?key;
unsigned?char?code?disp_code[]?=
{
??//顯示碼數(shù)組
??0xc0?0xf9?0xa4?0xb0?0x99?0x92?0x82?0xf8?0x80?0x90?0x88?
??0x83?0xc6?0xa1?0x86?0x8e?0xbf
};
unsigned?char?code?seg[]={0x7f0xbf0xdf0xef};//分別對應(yīng)相應(yīng)的數(shù)碼管點(diǎn)亮
/**********************************************************
延時(shí)子函數(shù)
?**********************************************************/
void?delayms(unsigned?int?ms)
{
??unsigned?char?t;
??while?(ms--)
??{
????for?(t?=?0;?t?114;?t++)
??????;
??}
}
/*****************************************************
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件???????4005??2012-08-04?16:59??AD.c
-----------?---------??----------?-----??----
?????????????????4005????????????????????1
評論
共有 條評論