Sign in

username:

password:



Not a member?

Search motoroladsp



Search tips

Subscribe to motoroladsp



motoroladsp by Keywords

56303 | 563xx | 5680 | 56805 | 5680x | 56F80 | 56F800DEMO | 56F805 | 56f807 | 56F830 | ADC | Bootloader | Codec | CodeWarrior | CW5 | CW6 | Debugger | DSP56303 | DSP56303EVM | DSP563xx | DSP5680 | DSP56800 | DSP56807 | DSP56858 | DSP56858EVM | DSP56F803 | DSP56F805 | DSP56F807 | DSP56F80x | DSP56F826 | DSP56F827 | DSP56F8xx | EVM | FFT | Flash_over_jtag | GPIO | Interrupt | Interrupts | JTAG | LCD | Linker | MCF5307 | Metrowerks | Modulus | MSCAN | PCMaster | PWM | Quad | Rif | RTOS | SDK | SPI


Discussion Groups

See Also

Embedded SystemsFPGAElectronics

Technical discussions about Freescale (Motorola) DSPs (including the DSP56000, DSP56300, DSP56600, 56800 DSPs).

  

Post a new Thread

Help ADC - praveen - Nov 5 7:26:00 2004



Hi All I am working on the DSP56F801 processor. Just wrote a simple program
for ADC

#include <math.h>
#include "port.h"
#include "bsp.h"
#include "io.h"
#include "fcntl.h"
#include "gpio.h"
#include "adc.h"

static const adc_sState sAd1 = {

ADC_CHANNEL_0,
1,
0,
0,
0,
0,
};

void main (void)
{ ssize_t Num;
UWord16 Adc1;
FRAC16 Readvalue;

Adc1 = open (BSP_DEVICE_NAME_ADC_0,O_RDONLY,&sAd1);

ioctl(Adc1,ADC_START,0);

while(1)
{
Num = read(Adc1,&Readvalue,sizeof(Readvalue));
}

close(Adc1); }

My input is 1 v at AN0 . But everytime i execute this program i am
getting Num = 0 or 1 and Readvalue =32760. Can you help me with this. I am not getting the exact value.

Thanks
Praveen



______________________________
New Code Sharing Section now Live on DSPRelated.com. Learn about the Reward Program for Contributors here.



(You need to be a member of motoroladsp -- send a blank email to motoroladsp-subscribe@yahoogroups.com )