DSP56F807 : A/D getting started

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

DSP56F807 : A/D getting started

1,653 Views
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

Labels (1)
Tags (1)
0 Kudos
1 Reply

199 Views
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 Kudos