Datasheet

2011 Microchip Technology Inc. DS21697F-page 23
MCP3302/04
6.0 SERIAL COMMUNICATIONS
6.1 Output Code Format
The output code format is a binary two’s complement
scheme, with a leading sign bit that indicates the sign
of the output. If the IN+ input is higher than the IN-
input, the sign bit will be a zero. If the IN- input is higher,
the sign bit will be a ‘1’.
The diagram shown in Figure 6-1 shows the output
code transfer function. In this diagram, the horizontal
axis is the analog input voltage and the vertical axis is
the output code of the ADC. It shows that when IN+ is
equal to IN-, both the sign bit and the data word is zero.
As IN+ gets larger with respect to IN-, the sign bit is a
zero and the data word gets larger. The full scale output
code is reached at +4095 when the input [(IN+) - (IN-)]
reaches V
REF
- 1 LSB. When IN- is larger than IN+, the
two’s complement output codes will be seen with the
sign bit being a one. Some examples of analog input
levels and corresponding output codes are shown in
Table 6-1.
TABLE 6-1: BINARY TWO’S COMPLEMENT OUTPUT CODE EXAMPLES.
Analog Input Levels
Sign
Bit
Binary Data
Decimal
DATA
Full Scale Positive (IN+)-(IN-)=V
REF
-1 LSB
0 1111 1111 1111 +4095
(IN+)-(IN-) = V
REF
-2 LSB 0 1111 1111 1110 +4094
IN+ = (IN-) +2 LSB 0 0000 0000 0010 +2
IN+ = (IN-) +1 LSB 0 0000 0000 0001 +1
IN+ = IN- 0 0000 0000 0000 0
IN+ = (IN-) - 1 LSB 1 1111 1111 1111 -1
IN+ = (IN-) - 2 LSB 1 1111 1111 1110 -2
IN
+
- IN
-
= -V
REF
+1 LSB 1 0000 0000 0001 -4095
Full Scale Negative IN
+
- IN
-
= -V
REF
1 0000 0000 0000 -4096