Technical discussions about the TI C28x DSPs (including the C2810, C2811, C2812, F2801, F2806, F2808, F2810,, F2811, F2812, R2811 and R2812).
Hi all, Could you please tell me how do i perform computation with ADC outputs? I need to write commands in C. I know that ADC outputs can be accessbile through ADC result register. Incase if i do some computation with the results in ADC,should i get the value of ADCresult register in hexa, or binary or decimal? For example, i want the result of realtime voltage input, it would be in ADC result register, can i directly use the ADCresult register value by assinging it as a variable with Uint16 and make use of it in my calculation??? Is the following command right? Uint16 V= AdcRegs.ADCRESULT0; what is the meaning of this command, I saw it in TI's example. Why should we right shift the results by 4digits.? Can any one tell me? Voltage[ConversionCount] = AdcRegs.ADCRESULT1 >>4; thanks in advance. regards ------------------------------------ Check Out Industry's First Single-Chip, Multi-Format, Real-Time HD Video Transcoding Solution for Commercial & Consumer End Equipment: www.ti.com/dm6467 You can post a message or access and search the archives of this group on DSPRelated.com: http://www.dsprelated.com/groups/c28x/1.php _____________________________________
Hi, If you check spru060 (nowadays it is on revision D, I believe), you will see that ADCRESULTn register is a 16 bit register and the first 4 bits (from 0 to 3) are reserved. The adc conversion is placed on 12 bits: from 4 to 15. If you use the command you mention "Uint16 V= AdcRegs.ADCRESULT0;", you are going to have a wrong conversion result. The shift is really necessary. Regards Gloria --- In c...@yahoogroups.com, naayagi04@... wrote: > > Hi all, > > Could you please tell me how do i perform computation with ADC outputs? I need to write commands in C. I know that ADC outputs can be accessbile through ADC result register. Incase if i do some computation with the results in ADC,should i get the value of ADCresult register in hexa, or binary or decimal? > > For example, i want the result of realtime voltage input, it would be in ADC result register, can i directly use the ADCresult register value by assinging it as a variable with Uint16 and make use of it in my calculation??? Is the following command right? > > Uint16 V= AdcRegs.ADCRESULT0; > > what is the meaning of this command, I saw it in TI's example. Why should we right shift the results by 4digits.? > Can any one tell me? > Voltage[ConversionCount] = AdcRegs.ADCRESULT1 >>4; > > thanks in advance. > > regards > ------------------------------------ Check Out Industry's First Single-Chip, Multi-Format, Real-Time HD Video Transcoding Solution for Commercial & Consumer End Equipment: www.ti.com/dm6467 You can post a message or access and search the archives of this group on DSPRelated.com: http://www.dsprelated.com/groups/c28x/1.php _____________________________________