DSP56F807 : A/D getting started

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

DSP56F807 : A/D getting started

2,253 次查看
spearce
Contributor I
I apologize in advance for such an elementary question. I can't get the ADC on a DSP56F807 to record a measurment. The following is the code (related to the ADC) I am using. The variable "value" does not change after the AD1 code is executed. Is there something additional that I need to add to my code?



float value;

void main(void)
{
...

AD1_Enable();

AD1_MeasureChan(TRUE, 0);

AD1_GetChanValue(0, &value);



Also, if there are any examples of using ADC with the ADC bean I would greatly appreciate a link.

Thanks,

Spearce

Message Edited by CrasyCat on 2007-04-13 02:17 PM

标签 (1)
标记 (1)
0 项奖励
回复
1 回复

799 次查看
ProcessorExpert
Senior Contributor III
Hello,
The code seems correct except the type of the value variable.
The ADC native result is integer value si it needs to be declared as the 'word', not 'float'.
best regards
Petr Hradsky
Processor Expert Support Team
UNIS
0 项奖励
回复