Digital Coding Schemes for Mixed Signal Communication



Category: Telephone, cellular phone and intercom
Manufacture: Microchip Technology, Inc.
Datasheet: Download this application note


Description:
Author: Bonnie C. Baker Microchip Technology Inc. Median Analog Voltage (V) 0.9375 FS (15/16 FS) 0.875 FS (14/16 FS)
16 FS) 12/ FS) 0.75 FS ( 16 0.6875 FS (11/16 FS) 0.625 FS (10/16 FS) 0.5625 FS (9/16 FS) 0.5 FS (8/16FS) 0.4375 FS (7/16 FS) 0.375 FS (6/16 FS) 0.3125 FS (5/16 FS) 0.25 FS (4/16 FS) 0.1875 FS (3/16 FS) 0.125 FS (2/16 FS) 0.0625 FS (1/16 FS)
Digital Code 1111 1110 1101 1100 1011 1010 1001 1000 0111 0110 0101 0100 0011 0010 0001 0000
Digital Coding Schemes for Mixed Signal Communication
An Analog-to-Digital (A/D) converter translates an analog input signal into a discrete digital code. This digital representation of the "real world" signal can be manipulated in the digital domain for the purposes of information processing, computing, data transmission or control system implementation. In any application where a converter is used, it is advantageous to have the code structure complement the microcontroller's operands. This application note describes the straight binary and binary two's complement code schemes that are outputted by Microchip's Analog-to-Digital (A/D) converters. All code examples given in this application note are for a 4-bit conversion. The median analog voltages in the tables are the equivalent analog voltages that are at the center of the digital code.
The straight binary code is more accurately called unipolar straight binary. This digital format for an A/D conversion is the simplest to understand. As the name implies, this coding scheme is used only when positive voltages are converted. An example of this type of coding is shown in Table 1. When this scheme is used to represent a positive analog signal range, the digital code for zero volts is equal to zero (0000 per Table 1). Given an ideal converter with no offset, gain, INL or DNL error, the code transition from 0000 to 0001 occurs at the analog value of: 1 First Code Transition = 0 + -- L S B 2 1 L S B + 1 L S B Second Code Transition = - 2 where: +FS L S B = ---------n 2 where: n is equal to the number of bits in the converter +FS is equal to the analog full-scale range.
TABLE 1: The unipolar straight binary code representation of zero volts is equal to a digital (0000). The analog full-scale minus one LSB digital representation is equal to (1111). With this code, there is no digital representation for analog full-scale. The A/D converters from Microchip that produce a straight binary output code are from the MCP320X (12bit) and the MCP300X (10-bit) families. These devices can be operated in a single ended, positive voltage input mode or a pseudo-differential input mode, but in both cases the digital output represents a positive input voltage. In the pseudo-differential mode, the IN- input is limited to 100 mV. This can be used to cancel small noise signals present on both the IN+ and IN- inputs. This provides a means of rejecting noise when the IN- input is used to sense a remote signal ground. The converter will produce digital code that represents the analog input when the IN+ input range is from IN- to (VFS -1 LSB). When the voltage level of IN+ is less than IN-, the resultant code for the family of devices will be still be `0', which does not represent a negative voltage.
2001 Microchip Technology Inc.
BINARY TWO'S COMPLEMENT CODE
In some applications it may be necessary for an ADC to convert negative and positive values. The logic modification that allows this flexibility in the digital output code is to produce the bipolar results called offset binary two's complement. Binary two's complement arithmetic is widely used in microcontrollers, calculators and computers. Binary two's complement is not as straight forward as the scheme for straight binary. The codes are not continuous from one end to the other due to the discontinuity that occurs at the analog bipolar zero. The two's complement of a negative binary number is generated by logically complementing all the digits of the positive binary number, hence converting it to the negative binary number counterpart as shown in Table 2. With this coding scheme, the MSB can be considered a sign indicator. When the MSB is a logic `0', a positive value is indicated and when the MSB is a logic `1', a negative value is indicated. This system is has an odd number of codes and only one zero state. It is also mathematically consistent making it synergistic with signed arithmetic functions. Median Voltage (V) 0.875 FS ( 8 FS) 0.75 FS (6/8 FS) 0.625 FS
8 FS) 4/ FS) 0.5 FS ( 8 0.375 FS (3/8 FS) 0.25 FS (2/8 FS) 0.125 FS (1/8 FS) 7/
The A/D converters from Microchip that produce a binary two's complement output code are from the TC340X, TC53X, TC7109, TC85 and all I2C/SMBus thermal sensors families. These devices are operated in a full-differential input mode. In this mode, the full-scale range of the device is equal to:
FS range = ( I N + M A X ( I N - M I N ) ) + ( I N - M A X ( I N +M I N ) )
And the input voltage presented to the converter is equal to: AIN = ((IN+ )(IN-)) These converters will produce digital code that represents both negative and positive analog inputs.
Digital Code 0111 0110 0101 0100 0011 0010 0001 0000 1111 1110 1101 1100 1011 1010 1001 1000
0 -0.125 FS (-1/8 FS)
8 FS) 3/ FS) -0.375 FS (- 8 -0.5 FS (-4/8FS) -0.625 FS (-5/8 FS) -0.75 FS (-6/8 FS) -0.875 FS (-7/8 FS)
TABLE 2: The binary two's complement representation of zero volts is also equal to a digital (0000). The analog positive full-scale minus one LSB digital representation is equal to (0111) and the analog negative full-scale representation is (1000).
2001 Microchip Technology Inc.

 
0-C     D-L     M-R     S-Z