SGM5200
DETAILED DESCRIPTION (continued)
Table 5. Mode Control Register Settings for Auto-2 Mode
Reset
Bits
State
DI[15:12]
0001
DI11
0
DI10
0
DI[9:7]
000
DI6
0
DI5
0
DI4
0
DI[3:0]
0000
NOTE: 1. GPIO1 to GPIO3 are available only in TSSOP packaged device. TQFN device offers GPIO0 only.
Figure 12 shows an example in which auto-2 mode is used
to scan channels 0, 1 and 2. Auto-2 mode is selected to
scan all channels until channel 2 (CH2) in ascending order
by programming the auto-2 register as described in Figure
12. The device enters auto-2 mode on receiving the auto-2
th
mode command in the n
to switch to CH0 in the (n+1)
the ADC samples and shifts out the conversion results for
CH0 because the MUX internally switches to CH1. In the
th
(n+3)
frame, the ADC samples and the shifts out the
nCS
SCLK
SDI
Auto-2 Start
SDO
Data CHx
Frame n
SG Micro Corp
www.sg-micro.com
Logic
State
0011
Selects auto-2 mode.
1
Enables programming of bits DI[10:0].
0
Device retains values of DI[10:0] from the previous frame.
1
Channel number is reset to CH0.
0
Channel counter increments every conversion (no reset).
xxx
Do not care.
0
Selects V
input range (Range 1).
REF
1
Selects 2 × V
input range (Range 2).
REF
0
Device normal operation (no power-down).
1
Device powers down on the 16
SDO outputs the current channel address of the channel on DO[15:12] followed by the 12-bit conversion
0
result on DO[11:0].
GPIO3 - GPIO0 data (both input and output) is mapped onto DO[15:12] in the order shown below. Lower
data bits DO[11:0] represent the 12-bit conversion result of the current channel.
1
DO15
(1)
GPIO3
GPIO data for the channels configured as output. Device ignores data for the channel which is
configured as input. SDI bit and corresponding GPIO information is given below.
DI3
(1)
GPIO3
frame. This step causes the MUX
th
frame. In the (n+2)
Sample
Sample
CHy
t
CYCLE
Auto-2
Data CHy
Frame (n+1)
Figure 12. Example Auto-2 Mode Timing Diagram
Single-Ended, Serial Interface ADC
th
SCLK falling edge.
DO14
(1)
GPIO2
DI2
(1)
GPIO2
conversion result for CH1 and the MUX also switches to
CH2 and so on. When this process reaches the maximum
selected channel, CH2 in this case, the device returns to
CH0 and repeats the cycle as long as the device remains in
auto-2 mode. Entering auto-2 mode from any other mode
also causes the device to restart from CH0. Additionally,
th
frame,
modifying the contents of the for auto-2 program register
while operating in auto-2 also causes the device to scan for
restart from CH0.
Sample
CH0
CH1
Auto-2
Data CH0
Frame (n+2)
Scan channels CH0, CH1 and CH2
12-Bit, 1MSPS, 16 Channels,
Function
DO13
(1)
GPIO1
DI1
(1)
GPIO1
Sample
CH2
Auto-2
Data CH1
Frame (n+3)
DO12
(1)
GPIO0
DI0
(1)
GPIO0
Auto-2
Data CH2
SEPTEMBER 2021
25
Need help?
Do you have a question about the SGM5200 and is the answer not in the manual?