SBASAC1A august 2021 – july 2023 AFE439A2 , AFE539A4 , AFE639D2
PRODUCTION DATA
The AFE639D2 provides a preprogrammed PI controller state machine, as shown in Figure 7-9. An external digital temperature sensor is used as the input and DAC channel 0 is used as the output. DAC channel 1 is used as a comparator that is used to set the output of DAC channel 0 to a value specified by the FIXED-OUTPUT field. Table 7-13 lists all the input/output pin names and functions.
PIN | FUNCTION | RANGE |
---|---|---|
FB0 | Voltage-feedback input for DAC0—connect this pin to OUT0. | Not applicable |
OUT0 | DAC0 voltage output. | 0 V to VFS |
AIN1 | DAC1 comparator input— connect to AGND if unused for fixed output clamping. | See Section 7.4.3 |
A0/SDI/SCL2 | I2C controller clock output. | Not applicable |
NC/SDO/SDA2 | Bidirectional I2C controller data input/output. | Not applicable |
The PI controller provides many configuration parameters. The following list describes the function of each configuration parameter:
PARAMETER | DESCRIPTION |
---|---|
SETPOINT | The 12-bit set point to which the ADC input is compared by the PI controller. The unit of this value is the same as the value at the external ADC input. The PI controller minimizes the error between the set point and the sensed ADC data. |
KP | This 16-bit parameter is used as the proportional gain. KP is multiplied with the instantaneous error. A higher KP enables the loop to correct the error faster. However, if the external process has a fast response time, a higher KP can cause system instability. |
KI | This 16-bit parameter is used as inverse integral gain. KI is inverted and multiplied to the accumulated error. This parameter is important to help minimize the steady-state error under different ambient conditions of the process. A higher KI means a weaker response to the steady-state error. A smaller KI can effectively correct the steady-state error, but can also lead to bigger oscillations. The integral function is disabled when KI = 0. |
MAX-OUTPUT | This 12-bit value limits the maximum value of the PI controller output. |
MIN-OUTPUT | This 12-bit value limits the minimum value of the PI controller output. |
COMMON-MODE | This 12-bit value is present at the PI output when the proportional and integral outputs are zero. This parameter is very important to help achieve a uniform response for all set points with fixed KP and KI settings. COMMON-MODE represents the nominal output to achieve a given set point. Therefore, for best results, use empirically measured COMMON-MODE values for every set point. |
LOOP-POLARITY | This 1-bit parameter provides the option to invert the phase of the PI-controller loop. This function is useful when the loop external to the device has an additional phase inversion. |
FIXED-OUTPUT | This 12-bit parameter is used to take the output to this predefined value based on the output of comparator. This function is useful in failure scenarios. |
CMP-THRESHOLD | This 12-bit parameter is used to set the threshold for comparator. |
PERIPHERAL-ADDR | The 7-bit I2C target address of the external temperature sensor or ADC. |
DATA-REG-ADDR | The 8-bit address of the temperature or ADC data register. |
CONFIG-REG-ADDR | The 8-bit address of the configuration register. |
CONFIG-DATA | The 16-bit configuration data for the external temperature sensor or ADC. |
ADC-DATA-SHIFT | The number of bits by which the ADC data needs to be shifted to align the data to 16-bit MSB. |
SHIFT-DIR | The direction of the ADC data shift. 0 refers to left shift. 1 refers to right shift. |
DATA-MASK | The mask that needs to be applied on the data when LOOP-POLARITY is set to 1. The DATA-MASK value must be 0xFFFF right shifted by (16-bits − ADC data length). For a 12-bit ADC, the DATA-MASK must be 0x0FFF. |
TWOS-FLAG | 1: 16-bit data is in 2's compliment, 0: Data is not 16-bit. |
REGISTER FIELD NAME | STATIC ADDRESS | STATIC ADDRESS LOCATION | DEFAULT VALUE (16‑BIT ALIGNED) |
---|---|---|---|
SETPOINT | 0x23[15:4] | SRAM | 0x0200 |
KP | 0x24[15:0] | SRAM | 0x0064 |
KI | 0x27[15:0] | SRAM | 0x0001 |
MAX-OUTPUT | 0x21[15:4] | SRAM | 0x7FC0 |
MIN-OUTPUT | 0x22[15:4] | SRAM | 0x0000 |
COMMON-MODE | 0x26[11:0] | SRAM | 0x8000 |
LOOP-POLARITY | 0x28[0] | SRAM | 0x0000 |
FIXED-OUTPUT | 0x28[15:4] | SRAM | 0x8000 |
CMP-THRESHOLD | 0x25[15:4] | SRAM | 0x8000 |
PERIPHERAL-ADDR | 0x29[14:8] | Register | 0xC800 |
DATA-REG-ADDR | 0x29[7:0] | SRAM | 0x0000 |
CONFIG-REG-ADDR | 0x2A[7:0] | SRAM | 0x0001 |
CONFIG-DATA | 0x2B[15:0] | SRAM | 0x0220 |
ADC-DATA-SHIFT | 0x2C[0] | SRAM | 0x0000 |
SHIFT-DIR | 0x2D[0] | SRAM | 0x0001 |
DATA-MASK | 0x2E[15:0] | SRAM | 0xFFFF |
TWOS-FLAG | 0x2F[0] | SRAM | 0x0001 |
REGISTER NAME | ADDRESS | DEFAULT VALUE |
---|---|---|
COMMON-CONFIG | 0x1F | 0x13F9 |
DAC-A-VOUT-CMP-CONFIG | 0x03 | 0x0401 |
DAC-D-VOUT-CMP-CONFIG | 0x15 | 0x0400 |
STATE-MACHINE-CONFIG0 | 0x27 | 0x0003 |
Table 7-16 shows the default device configuration. Follow these steps to configure and operate the PI controller: