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.
Hello!
I have done an ADC coding for TMS320F28335 in code composer studio4.It is working fine.The values corresponding to analog signal is getting stored in corresponding registers.
Now i want to input a sine wave and see the corresponding digital values in a graph.
Before that i saw the graph when ADC pins are grounded.I expected a graph in which values are zero or near to zero.But the obtained graph was this:
What is the actual problem?
It would be great if any one can solve this problem.
regards
Mahesh
Hi Mahesh,
I am not sure how to interpret the vertical scale on your graph, can you show it in the range of raw ADC conversions: 0 to 4095?
The result registers you are looking at there are left aligned, so 48 is 0x0030 = 3 LSBs above 0V. This is within reason for what might be expected when sampling ground.
Hi Devin
How can i make it to proper values(other than left aligned)?
Also how to obtain the graph for that?
regards
Mahesh
The best way to get right aligned values are to use the AdcMirror registers, which are the same as the result registers, just right aligned. You can also use a right shift on the result registers: ADCRESULT0 >> 4
As far as graphing, I am not sure exactly, but I think you will want to run some code to perform sampling which moves each sample to an array in memory, then graph that array.
Hello Mahesh!
You read: "the graph when ADC pins are grounded".
1 Your digital ground and analog ground are separated or aggregated? The result would be better if they are separated.
2 On my opinion "3 LSB" is too much for the ADC-noise. It should be no more "2 LSB".
3 I think it will be helpful for you http://e2e.ti.com/support/microcontrollers/c2000/f/171/p/264395/932865.aspx#932865.
Regards,
Igor
Hi Mahesh,
To be precise, please implement the following:
Voltage1 =((AdcRegs.ADCRESULT0>>4) );
and add Voltage1 to watchpoint and plot the graph for this variable.
Regards,
Gautam Iyer