SGM5200
DETAILED DESCRIPTION (continued)
Programming
As discussed previously in overview, the digital output of
the SGM5200 device is SPI compatible. The Table 8 lists
the output codes corresponding to various analog input
voltages.
Note that GPIO0, GPIO1, GPIO2 and GPIO3 are available
in the TSSOP package. Only GPIO0 is available in the
TQFN package.
The device has four general purpose input and output
(GPIO) pins. Each of the four pins can be independently
Table 8. Ideal Input Voltages and Output Codes
Description
Full Scale Range
Least Significant Bit (LSB)
Full Scale
Midscale
Midscale - 1LSB
Zero
NOTE: The device continues its operation in selected mode during programming. SDO is valid, however it is not possible to
change the range or write GPIO data into the device during programming.
SG Micro Corp
www.sg-micro.com
Digital Output
GPIO Registers
Analog Value
Range 1 → V
REF
V
/4096
REF
V
- 1LSB
REF
V
/2
REF
V
/2 - 1LSB
REF
0V
nCS
Device in any operation mode
Program GPIO register?
nCS
Refer Table 9 for DI[11:0] data
GPIO Register
Programming
End of GPIO register programming
Figure 14. GPIO Program Register Programming Flowchart
12-Bit, 1MSPS, 16 Channels,
Single-Ended, Serial Interface ADC
programmed as general purpose output (GPO) or general
purpose input (GPI). It is also possible to use the GPIOs for
some pre-assigned functions (refer to Table 9 for details).
GPO data can be written into the device through the SDI
line. The device refreshes the GPO data on every nCS
falling edge as per the SDI data written in the previous
frame. Similarly, the device latches GPI status on the nCS
falling edge and outputs it on SDO (if GPI is read enabled
by writing DI4 = 1 during the previous frame) in the same
frame starting on the nCS falling edge.
The details regarding programming the GPIO registers are
illustrated in the flowchart in Figure 14. Table 9 lists the
details regarding GPIO Register programming settings.
Range 2 → 2 × V
REF
2 × V
/4096
REF
2 × V
- 1LSB
REF
V
REF
V
- 1LSB
REF
0V
Yes
SDI: DI[15:12] = 0100
Digital Output
Straight Binary
Binary Code
Hex Code
1111 1111 1111
1000 0000 0000
0111 1111 1111
0000 0000 0000
No
SEPTEMBER 2021
FFF
800
7FF
000
27
Need help?
Do you have a question about the SGM5200 and is the answer not in the manual?