主题:E9280板子AD采集问题 共有35091人关注过本帖 |
---|
客人 |
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;
//芯片温度 ,,,,, 这些参数的应该在哪个文件有定义吧(有什么硬件名称列表啥的),我该怎么找啊(单片机的思维),不可能,我随便定义一个参数,如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项的支持。其他参数会出错返回。
|
|
单帖管理 | 引用 | 回复 |