EasyManua.ls Logo

Texas Instruments TMS320F2837 D Series - Signed Input Voltages

Texas Instruments TMS320F2837 D Series
324 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Analog-to-Digital Converter (ADC)
TMS320F2837xD Microcontroller Workshop - Analog Subsystem 6 - 19
ADC Conversion Result Registers
16-Bit Mode
Differential two input pins (ADCINxP & ADCINxN)
Input voltage is the difference between the two pins
External reference (VREFHI and VREFLO)
LSBMSB
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
AdcnResultRegs.ADCRESULTx n = a - d x = 0 - 15
ADCIN
x
P
Voltage
ADCINxN
Voltage
Digital
Results
AdcnResultRegs.
ADCRESULTx
3.0V 0V FFFFh 1111|1111|1111|1111
1.5V 1.5V 7FFFh 0111|1111|1111|1111
45µV
3.0V
-
45µV
1h
0000|0000|0000|0001
0V 3.0V 0h
0000|0000|0000|0000
Signed Input Voltages
How Can We Handle Signed Input Voltages?
Example: -1.5 V
V
in
+1.5 V
1) Add 1.5 volts to the
analog input
V
in
1.5V
ADCIN0
GND
VREFLO
-
+
R
R
R
-
+
R
R
ADCA
#include “F2837xD_Device.h”
#define offset 0x07FF
void main(void)
{
int16 value; // signed
value = AdcaResultRegs.ADCRESULT0 – offset;
}
2) Subtract “1. 5” from the digital result

Table of Contents

Other manuals for Texas Instruments TMS320F2837 D Series

Related product manuals