This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

10 bit SAR ADC OF C5535EZDSP

Other Parts Discussed in Thread: TMS320C5535, TLV320AIC3204

hi EVERY ONE...

help me out i have program ADC 10 bit SAR by using ADC user guide i m using c5535ezdsp. my program as follows

#include "stdio.h"
#include "sar.h"
#include "data_types.h"
void Init_SAR(void)
{
*SARCTRL = 0x4C00; // Select AIN4, which is GPAIN2 
*SARCLKCTRL = 0xC34F; // 100/50000 = 2KHz 
*SARPINCTRL = 0x7104;
*SARGPOCTRL = 0; 
*SARCTRL = 0xCC00;
*SARDATA = 0xCC00;
}

void Read_GPAIN2(void)
{
Uint16 val, i;
while(1)
{
for(i=0;i<500; i++)
asm(" nop"); 
val = *SARDATA;
if((val&0x8000) == 0)
break;
}
}

but i am enable to run down this program on ccs v4. i m new to ccv4 environment plz help me out the error shows.........


errors encountered during linking; "sar123.out" not built sar123 line 0 

unresolved symbol _main, first referenced in C:\Program sar123 line 0 

  • Are you aware of the CSL link next to forum? There are instructions in Release Notes on how to build and run projects in CCS4 and there are example projects for SAR.

  • thanks sir for reply i had gone through the chip support library csl 3.01 nd gone through the SAR example three examples are given... but i want my external signal from my amplifier to convert digital using ADC  of the tms320c5535. in csl example it is given that we can use SAR adc for internal measurement viz internal battery power,press down switch, volume control, touch screen.... but no such code is written for converting external signal (from my amplifier)  to convert digital. it is possible to convert the external signal digital using GPAIN of the expansion slot or i will use EXternal ADC..... waiting for ur response .....thanks once again......

  • Hi Sachit,

    Check the C5000 Teaching ROM for example code on how to get the I2S and AIC3204 Audio Codec running - this will allow you to perform ADC on an audio signal.

    Regards,
    Nate

  • hi nathan,

    but my signal is of the range of 10hz-500hz it is an emg signal nd TLVaic3204 codec accept the signal IN THE operating range of 8khz mono to 192 khz stereo as mention in the spru of tlv320aic3204. so how can i directly interface my signal to codec. plz help me out .thanks for ur reply...

  • Hi Sachit,

    I thought you were working with audio signals - but you are not. Sorry but I am not sure what exactly you should be using.

    Good Luck,
    Nate 

  • hi Steve Tsang,

    As u mention i had gone through the csl 3.01 . it has given three example sar in DMA,INTERRUPT,POLLING MODE. ALSO IT IS WRITTEN THAT 

    Enumeration for Selecting type of A/D conversion.

    Enumerator:
    CSL_KEYPAD_MEAS

    For Measuring keypad voltage

    CSL_BATTRY_MEAS

    For Measuring battery voltage

    CSL_INT_VOLT_MEAS

    For Measuring Internal Voltage

    CSL_VOLUME_CTRL

    For Volume control Measurement

    CSL_TOUCH_SCREEN_XAXIS

    For Measuring X-Position of LCD

    CSL_TOUCH_SCREEN_YAXIS

    For Measuring Y-Postion of LCD

    CSL_PEN_PRESS_DOWN

    For Measuring pen press down 

    MY OBJECTIVE IS TO CONVERT MY EXTERNAL SIGNAL TO CONVERT DIGITAL USING ADC SO HOW COULD I SELECT TYPE OF A/D CONVERSION AS MENTION ABOVE IT CAN BE USED ONLY FOR THESE PURPOSES OR FOR EXTERNAL MEASUREMENT IS POSSIBLE, is it so i will not add this csl enum A/D TYPE CONVERSION LINE AND DIRECTLY APPLY MY ANALOG SIGNAL TO GPAIN PIN.

    SIR plz reply i am very much interested nd  A deep deep trouble this is the part of my dissertation work which has to be completed by two month... plz reply me soon

    thanks waiting for ur reply