Hi
I used ADC in TMS320C5505. here I select channel-1 and read it value. but i monitor channel-3 and channel-4 value. it also change depends on channel-1 value. Hardware side no short connection. but value change. please help me. i post my code there.
#include<stdio.h>
#include "usbstk5515.h"
#define SARCTRL *(volatile ioport Uint16*)(0x7012)
#define SARDATA *(volatile ioport Uint16*)(0x7014)
#define SARCLKCTRL *(volatile ioport Uint16*)(0x7016)
#define SARPINCTRL *(volatile ioport Uint16*)(0x7018)
#define SARGPOCTRL *(volatile ioport Uint16*)(0x701A)
int i;
void main()
{
USBSTK5515_init();
//------------ADC Initialization----------------//
SARCTRL = 0x1C00;
SARCLKCTRL = 0x0031;
SARPINCTRL = 0x7106;
SARGPOCTRL = 0x0000;
SARCTRL = 0x9C00;
while(1)
{
i=SARDATA;
printf("The ADC ch0 is %d\n",i);
SARCTRL = 0x9C00;
}
}