Microchip Technology AC164337 Scheda Tecnica

Pagina di 286
 2006-2014 Microchip Technology Inc.
DS70000178D-page 181
dsPIC30F1010/202X
16.4
ADC Result Buffer
The ADC module contains up to 12 data output regis-
ters to store the A/D results called ADCBUF<11:0>.
The registers are 10 bits wide, but are read into differ-
ent format, 16-bit words. The buffers are read-only.
Each analog input has a corresponding data 
output register.  
This module DOES NOT include a circular data
buffer or FIFO.
 Because the conversion results may
be produced in any order, such schemes will not work
since there would be no means to determine which
data is in a specific location.
The SAR write to the buffers is synchronous to the
ADC clock. Reads from the buffers will always have
valid data assuming that the data-ready interrupt has
been processed.
If a buffer location has not been read by the software
and the SAR needs to overwrite that location, the 
previous data is lost.
Reads from the result buffer pass through the data for-
matter. The 10 bits of the result data are formatted into
a 16-bit word. 
16.5
Application Information
The ADC module implements a concept based on
“Conversion Pairs”. In power conversion applications,
there is a need to measure voltages and currents for
each PWM control loop. The ADC module enables the
sample and conversion process of each conversion
pair to be precisely timed relative to the PWM signals.
In a user’s application circuit, the PWM signal enables
a transistor, which allows an inductor to charge up with
current to a desired value. The longer a PWM signal is
on, the longer the inductor is charging, and therefore
the inductor current is at its maximum at the end of the
PWM signal. Often, this is the point where the user
wants to take the current and voltage measurements.
Figure 16-2 shows a typical power conversion applica-
tion (a boost converter) where the current sensing of
the inductor is done by monitoring the voltage across a
resistor in series with the power transistor that
“charges” the inductor. The significant feature of this
figure is that if the sampling of the resistor voltage
occurs slightly later than the desired sample point, the
data read will be zero. This is not acceptable in most
applications. The ADC module always samples the
analog voltages at the appointed time regardless of
whether the ADC converter is busy or not.
The Power Supply PWM module supports 2-4 indepen-
dent PWM channels as well as 2-4 trigger signals (one
per PWM generator). The user can configure these
channels to initiate an ADC conversion of a selected
input pair at the proper time in the PWM cycle. The
Power Supply PWM module also provides an addi-
tional trigger signal (Special Event Trigger), which can
be programmed to occur at a specified time during the
primary time base count cycle.
FIGURE 16-2:
APPLICATION EXAMPLE: IMPORTANCE OF PRECISE SAMPLING   
X
PWM
I
L
I
R
X
X
Late sample yields 
zero data
Desired sample point
Critical Edge
+V
IN
I
L
L
PWM
V
ISENSE
V
OUT
C
OUT
+
I
R
R
Measuring peak inductor current is very important
Example Boost Converter