Adc registers, Dual-core interfaces, Maxq3108 low-power, dual-core microcontroller – Rainbow Electronics MAXQ3108 User Manual
Page 59

MAXQ3108
Low-Power, Dual-Core Microcontroller
______________________________________________________________________________________
59
ADC Registers
• AD0 to AD5: These six registers contain the most
significant 16 bits for the cubic sinc filters. AD0 and
AD1 correspond to Manchester decoder 0, AD2 and
AD3 correspond to Manchester decoder 1, and AD4
and AD5 correspond to Manchester decoder 2.
• AD0LSB to AD5LSB: These six registers contain the
least significant 8 bits for the cubic sinc filters. Paired
with the AD0 to AD5 registers, each cubic sinc filter
has 24 bits of resolution.
• ADCN: The ADC control register contains both con-
trol bits and status bits associated with the ADC. The
register contains bits that configure the oversampling
rate, and enable or disable individual Manchester
decoder channels and interrupts and other functions.
• ADCC: This register contains a measure of the clock
rate associated with a particular Manchester
decoder. Because the speed of a Manchester chan-
nel is controlled not by the MAXQ3108 but by the
unsynchronized clock of an external device, it is criti-
cal for the application to know the difference
between the modulator clock and the MAXQ3108
clock. To determine this, the ADCC register contains
the number of sync bits that occur during 512
32.768kHz clock periods. Application software can
use this information to determine the relative speed
of the two clocks and to make correction for time-crit-
ical measurements.
• MSTC: The Manchester decoder status register con-
tains bits that reveal the synchronization status of all
three Manchester decoders. It also contains the
selection bits for the clock measurement function
exposed in the ADCC register.
Use Case: Using a Single DS8102 as a 2-Channel ADC
The DS8102 is designed to operate with the
Manchester data inputs of the MAXQ3108. Figure 4
demonstrates how simple the physical interface can be:
just connect the MNOUT pin of the DS8102 to the
MDIN0P input of the MAXQ3108, and establish a com-
mon ground using the MDIN0N pin. This interface point,
however, makes an ideal isolation interface. Because of
the Manchester-encoded nature of the signal interface,
any type of isolation—capacitive, transformer, or opti-
cal—can be used to couple the output of the DS8102 to
the MAXQ3108.
To use the ADC inputs, perform the following steps:
• Configure the ADC. In the ADCN register, set the
OSR bits to select the desired oversampling rate,
either 32, 64, 128, or 256. Enable the Manchester
decoder 0 by setting MD0E.
• Within a few milliseconds, the MD0SNC bit should go
active in the MSTC register. This indicates that the
synchronization pattern has been detected and that
samples in the AD0 register are valid.
• To read samples, wait for ABF0 to go active in the
ADCN register. This indicates that samples are avail-
able in the AD0 and AD1 registers. The sample input
loop can be as simple as:
while(TRUE)
{
while(!ADCN.ABF0);
process_sample(AD0);
}
Dual-Core Interfaces
The MAXQ3108 contains two MAXQ20 cores. The first
core, UserCore, operates at half the master clock
speed and manages most of the peripheral devices.
The second core, DSPCore, operates at the full master
clock speed and has no peripheral responsibility. It is
free to handle most of the math-intensive parts of the
application.
The DSPCore differs from the UserCore in two impor-
tant aspects: first, it has no debug engine; and second,
it has no nonvolatile program memory. Instead, the
DS8102
AN0+
AN0-
MAXQ3108
MDIN0P
MDIN0N
AN1+
AN1-
Figure 4. Connecting the MAXQ3108 to a DS8102 Dual Delta-Sigma Modulator