| Electronic Components Datasheet Search |
|
AD7879 Datasheet(PDF) 17 Page - Analog Devices |
|
|
|||||||||||||||||||||||||||||
AD7879 Datasheet(HTML) 17 Page - Analog Devices |
|
17 / 36 page ![]() AD7879 Rev. 0 | Page 17 of 36 AUX/VBAT/GPIO PIN Pin 1A (AUX/VBAT/GPIO) on the AD7879 can be programmed as either an auxiliary input to the ADC, as a battery monitoring input, or as a general-purpose digital input/output. To select the auxiliary measurement, set the ADC channel address to 011. To select a battery measurement, set the ADC channel address to 010. To select the GPIO, set Bit 13 in Control Register 2 (Address 0x02) to 1. AUXILIARY INPUT The AD7879 has an auxiliary analog input, AUX. When selected, the signal on the AUX pin (AUX/VBAT/GPIO) is connected directly to the ADC input. This channel has a full-scale input range from 0 V to VCC. The ADC channel addresses for AUX is 011, and the result is stored in Register 0x0C. BATTERY INPUT The AD7879 can monitor battery voltages from 0.5 V to 5 V when the BAT measurement is selected. Figure 28 shows a block diagram of a battery voltage monitored through the VBAT pin. The voltage to the VCC pin (VCC/REF) of the AD7879 is maintained at the desired supply voltage via the dc-to-dc regulator while the input to the regulator is monitored. This voltage on VBAT is divided down by 4 internally, so that a 5 V battery voltage is presented to the ADC as 1.25 V. To conserve power, the divider circuit is on only during the sampling of a voltage on VBAT. Note that the possible maximum input is 5 V. The VBAT input is ADC Channel 010, and the result is stored in Register 0x0C. ADC 0.125V TO 1.25V SW VBAT VCC 12k Ω 4k Ω DC-TO-DC CONVERTER BATTERY 0.5V TO 5V Figure 28. Block Diagram of Battery Measurement Circuit The maximum battery voltage that the AD7879 can measure changes when a different reference voltage is used. The maxi- mum voltage that is measurable is VCC × 4 because this voltage gives a full-scale output from the ADC. The battery voltage can be calculated using the following formula: VBAT (V) = [(Register Value) × VCC × 4]/4095 LIMIT COMPARISON The AUX measurement and the battery measurement can be compared with high and low limits stored on-chip. An out-of-limit result generates an alarm output at the INT pin (PENIRQ/INT/DAV) provided the INT function is enabled. The high limit for both channels is stored in Register 0x04, while the low limit is stored in Register 0x05. After a measurement from either AUX or VBAT is taken, it is compared with the high and low limits. The out-of-limit comparison sets a status bit in Control Register 3. There are separate status bits for both the high and low limits to indicate which limit was exceeded. The interrupt sources can be masked by clearing the corresponding enable bit in this register. GPIO The AD7879 has one general-purpose logic input/output pin, GPIO (AUX/VBAT/GPIO). To enable the GPIO, set Bit 13 in Control Register 2 to 1. If this bit it 0, then the AUX/VBAT function is active on the pin. The other GPIO configuration bits have no effect, if the GPIO is not enabled. The GPIO data bit is located in Bit 12 of the Control Register 2. Direction (Bit 11, Control Register2, Address 0x02) Bit 11 sets the direction of the GPIO pin (AUX/VBAT/GPIO). When GPIO DIR = 0, the pin is an output. Setting or clearing bits in the GPIO data bit (Register 0x02[12]) outputs a value on the GPIO pin. When GPIO DIR = 1, the pin is an input. An input value on the GPIO pin sets or clears the GPIO data bit (Register 0x02[12]). GPIO data register bits are read-only when GPIO DIR = 1. Polarity (Bit 10, Control Register 2, Address 0x02) When GPIO POL = 0, the GPIO pin is active low. When GPIO POL = 1, the GPIO pin is active high. How this bit affects the GPIO operation also depends on the GPIO DIR bit. If GPIO POL = 1 and GPIO DIR = 1, a 1 at the input pin sets the corresponding GPIO data register bit to 1. A 0 at the input pin clears the corresponding GPIO data bit to 0. If GPIO POL = 1 and GPIO DIR = 0, a 1 in the GPIO data register bit puts a 1 on the corresponding GPIO output pin. A 0 in the GPIO data register bit puts a 0 on the GPIO output pin. If GPIO POL = 0 and GPIO DIR = 1, a 1 at the input pin sets the corresponding GPIO data bit to 0. A 0 at the input pin clears the corresponding GPIO data bit to 1. If GPIO POL = 0 and GPIO DIR = 0, a 1 in the GPIO data register bit puts a 0 on the corresponding GPIO output pin. A 0 in the GPIO data register bit puts a 1 on the GPIO output pin. |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |