DSP56F807 : A/D getting started

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

DSP56F807 : A/D getting started

2,087件の閲覧回数
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 返信

633件の閲覧回数
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 件の賞賛
返信