Datasheet

Table Of Contents
2010 Microchip Technology Inc. Preliminary DS39979A-page 283
PIC18F87J72 FAMILY
22.0 DUAL-CHANNEL, 24-BIT
ANALOG FRONT END (AFE)
The dual-channel, 24-bit Analog Front End (AFE) is an
integrated, high-performance analog subsystem that
has been tailored for energy metering and power
measurement applications. The AFE contains two
synchronous sampling Delta-Sigma Analog-to-Digital
Converters ( ADC), two PGAs, a phase delay
compensation block, an internal voltage reference and
a dedicated, high-speed 20 MHz SPI compatible serial
interface. A functional block diagram of the AFE is
shown in Figure 22-1.
The A/D Converters contain a proprietary dithering
algorithm for reduced Idle tones and improved THD.
Each converter is preceded by a PGA, allowing for
weak signal amplification and true differential voltage
inputs to the converters. This allows the AFE to inter-
face with a large variety of voltage and current sensors
including shunts, current transformers, Rogowski coils
and Hall effect sensors.
AFE data and control functions are accessed through a
dedicated register map. The map contains 24-bit wide
data words for each ADC (readable as 8-bit registers),
as well as five writable control registers to program
amplifier gain, oversampling, phase, resolution, dither-
ing, shutdown, Reset and communication features.
Communication is largely simplified with various
continuous read modes that can be accessed through
the serial interface and with a separate data ready pin
that can directly be connected to a microcontroller’s
IRQ input.
Because of the complexity of and comprehensive
options available on the AFE, a detailed explanation of
all of its functional elements is not provided in this
chapter. These are described in Appendix B:
“Dual-Channel, 24-Bit AFE Reference”. This chapter
explains the important points of configuring and using
the AFE in a PIC18F8XJ72 based application. Direct
links to relevant information in the AFE reference are
provided throughout the chapter for the reader’s
convenience.
FIGURE 22-1: DUAL-CHANNEL ANALOG FRONT END FUNCTIONAL DIAGRAM
CH0+
CH0-
CH1+
CH1-
SDOA
SDIA
SCKA
DUAL-DS
ADC
ANALOG
DIGITAL
SINC
3
-
+
PGA
MCLK
CLKIA
DR
ARESET
Digital SPI
Interface
Clock
Generation
SINC
3
-
+
PGA
Modulator
AMCLK
DMCLK/DRCLK
DMCLK
Phase
Shifter
PHASE <7:0>
OSR<1:0>
PRE<1:0>
DATA_CH0<23:0>
DATA_CH1<23:0>
SDN<1:0>, RESET<1:0>, GAIN<7:0>
CSA
REFIN+/OUT+
REFIN -
SAV
DD
SAVSS SVSS
SVDD
POR
SV
DD
Monitoring
POR
Modulator
VREF+VREF-/
VREFEXT
Voltage
Reference
VREF
+
-
D-S
D-S
F