主題:E9280板子AD采集問題 共有40107人關注過本帖 |
---|
客人 |
1樓 |
E9280板子AD采集問題 Post By:2013-12-12 11:26:00 [只看該作者]
前面定義了這句:private const uint EM9280_DAQ_VDD_5V = 2;
后面 for(i = 0;i<100;i++) { DaqInfo.dwCmd = EM9280_DAQ_VDD_5V; //供電V數 uLen = 0; bRet = ReadFile(hLRADC, ref DaqInfo, sizeDaqInfo, ref uLen, 0); if(!bRet) { Console.WriteLine("ReadFile failed!"); CloseHandle(hLRADC); return; } str = Encoding.Default.GetString(DaqInfo.UnitName, 0, 16); str = str.Split('\0')[0]; Console.WriteLine("+5V = {0}({1})", DaqInfo.dwData, str.ToString()); } 這是EM9280的板子的AD_test的列程,他是怎么就能提取電源的電壓呢!是驅動定義的問題嗎??求解答!
|
|
單帖管理 | 引用 | 回復 |
zxw |
2樓 |
Post By:2013-12-12 13:44:00 [只看該作者]
CPU有內部電壓檢測傳感器,讀取AD時,指定讀取內部電壓檢測值
EM9280_DAQ_VDD_5V:就表明告訴驅動程序,要讀取內部電壓檢測值!
|
|
單帖管理 | 引用 | 回復 |
客人 |
3樓 |
Post By:2013-12-27 19:59:00 [只看該作者]
謝謝,我還是疑問這些參數在哪個頭文件里,或是那個類中定義的啊 在類中隨便定義的這些參數: private const uint EM9280_DAQ_VOLTAGE_CH0 = 0; private const uint EM9280_DAQ_VOLTAGE_CH1 = 1; private const uint EM9280_DAQ_VDD_5V = 2; private const uint EM9280_DAQ_VDDIO_3V3 = 3; private const uint EM9280_DAQ_VDDA_1V8 = 4; private const uint EM9280_DAQ_VDDD_1V45 = 5; private const uint EM9280_DAQ_CPU_TEMPERATURE = 6; private const uint EM9280_DAQ_BOARD_TEMPERATURE = 7; 然后 DaqInfo.dwCmd = EM9280_DAQ_VDD_5V; //供電V數 DaqInfo.dwCmd = EM9280_DAQ_CPU_TEMPERATURE;
//芯片溫度 ,,,,, 這些參數的應該在哪有定義吧,我該怎么找啊(單片機的思維),不可能,我隨便頂一個private const uint EM9280_5V = 2; 然后DaqInfo.dwCmd = EM9280_5V,也行吧???謝謝,很是疑惑
|
|
單帖管理 | 引用 | 回復 |
客人 |
4樓 |
Post By:2013-12-27 20:02:00 [只看該作者]
謝謝,我還是疑問這些參數在哪個頭文件里,或是那個類中定義的啊 在類中隨便定義的這些參數: private const uint EM9280_DAQ_VOLTAGE_CH0 = 0; private const uint EM9280_DAQ_VOLTAGE_CH1 = 1; private const uint EM9280_DAQ_VDD_5V = 2; private const uint EM9280_DAQ_VDDIO_3V3 = 3; private const uint EM9280_DAQ_VDDA_1V8 = 4; private const uint EM9280_DAQ_VDDD_1V45 = 5; private const uint EM9280_DAQ_CPU_TEMPERATURE = 6; private const uint EM9280_DAQ_BOARD_TEMPERATURE = 7; 然后 DaqInfo.dwCmd = EM9280_DAQ_VDD_5V; //供電V數 DaqInfo.dwCmd = EM9280_DAQ_CPU_TEMPERATURE;
//芯片溫度 ,,,,, 這些參數的應該在哪個文件有定義吧(有什么硬件名稱列表啥的),我該怎么找。▎纹瑱C的思維),不可能,我隨便定義一個參數,如private const uint EM9280_5V = 2; 然后DaqInfo.dwCmd = EM9280_5V,也能讀溫度吧???謝謝,很是疑惑
|
|
單帖管理 | 引用 | 回復 |
x10 |
5樓 |
Post By:2013-12-28 15:03:00 [只看該作者]
目前只提供了:
#define
EM9280_DAQ_VOLTAGE_CH0
0 #define
EM9280_DAQ_VOLTAGE_CH1
1 #define
EM9280_DAQ_CPU_TEMPERATURE
6 #define
EM9280_DAQ_BOARD_TEMPERATURE
7 這4項的支持。其他參數會出錯返回。
|
|
單帖管理 | 引用 | 回復 |