33.8.8 Input Control

Name: INPUTCTRL
Offset: 0x10
Reset: 0x00000000
Property: Write-Protected, Write-Synchronized

Bit 3130292827262524 
     GAIN[3:0] 
Access R/WR/WR/WR/W 
Reset 0000 
Bit 2322212019181716 
 INPUTOFFSET[3:0]INPUTSCAN[3:0] 
Access R/WR/WR/WR/WR/WR/WR/WR/W 
Reset 00000000 
Bit 15141312111098 
    MUXNEG[4:0] 
Access R/WR/WR/WR/WR/W 
Reset 00000 
Bit 76543210 
    MUXPOS[4:0] 
Access R/WR/WR/WR/WR/W 
Reset 00000 

Bits 27:24 – GAIN[3:0] Gain Factor Selection

These bits set the gain factor of the ADC gain stage.

GAIN[3:0]NameDescription
0x01X1x
0x12X2x
0x24X4x
0x38X8x
0x416X16x
0x5-0xE-Reserved
0xFDIV21/2x

Bits 23:20 – INPUTOFFSET[3:0] Positive Mux Setting Offset

The pin scan is enabled when INPUTSCAN != 0. Writing these bits to a value other than zero causes the first conversion triggered to be converted using a positive input equal to MUXPOS + INPUTOFFSET. Setting this register to zero causes the first conversion to use a positive input equal to MUXPOS.

After a conversion, the INPUTOFFSET register will be incremented by one, causing the next conversion to be done with the positive input equal to MUXPOS + INPUTOFFSET. The sum of MUXPOS and INPUTOFFSET gives the input that is actually converted.

Bits 19:16 – INPUTSCAN[3:0] Number of Input Channels Included in Scan

This register gives the number of input sources included in the pin scan. The number of input sources included is INPUTSCAN + 1. The input channels included are in the range from MUXPOS + INPUTOFFSET to MUXPOS + INPUTOFFSET + INPUTSCAN.

The range of the scan mode must not exceed the number of input channels available on the device.

Bits 12:8 – MUXNEG[4:0] Negative Mux Input Selection

These bits define the Mux selection for the negative ADC input. selections.

ValueNameDescription
0x00PIN0

ADC AIN0 pin

0x01PIN1

ADC AIN1 pin

0x02PIN2

ADC AIN2 pin

0x03PIN3

ADC AIN3 pin

0x04PIN4

ADC AIN4 pin

0x05PIN5

ADC AIN5 pin

0x06PIN6

ADC AIN6 pin

0x07PIN7

ADC AIN7 pin

0x08-0x17

Reserved

0x18GND

Internal ground

0x19IOGND

I/O ground

0x1A-0x1F

Reserved

Note: 1. Only available in SAM R21G.

Bits 4:0 – MUXPOS[4:0] Positive Mux Input Selection

These bits define the Mux selection for the positive ADC input. The following table shows the possible input selections. If the internal bandgap voltage channel is selected, then the Sampling Time Length bit group in the Sampling Control register must be written.

MUXPOS[4:0]Group configurationDescription
0x00

PIN0

ADC AIN0 pin

0x01

PIN1

ADC AIN1 pin

0x02

PIN2

ADC AIN2 pin

0x03PIN3ADC AIN3 pin
0x04PIN4ADC AIN4 pin
0x05

PIN5

ADC AIN5 pin

0x06

PIN6

ADC AIN6 pin

0x07PIN7ADC AIN7 pin
0x08PIN8ADC AIN8 pin
0x09PIN9ADC AIN9 pin
0x0APIN10ADC AIN10 pin
0x0BPIN11ADC AIN11 pin
0x0C

PIN12

ADC AIN12 pin

0x0D

PIN13

ADC AIN13 pin

0x0E

PIN14

ADC AIN14 pin

0x0F

PIN15

ADC AIN15 pin

0x10PIN16ADC AIN16 pin
0x11PIN17ADC AIN17 pin
0x12PIN18ADC AIN18 pin
0x13PIN19ADC AIN19 pin
0x14-0x17Reserved
0x18TEMPTemperature reference
0x19BANDGAPBandgap voltage
0x1ASCALEDCOREVCC1/4 scaled core supply
0x1BSCALEDIOVCC1/4 scaled I/O supply
0x1CDACDAC output (1)
0x1D-0x1FReserved
Note:
  1. When using the internal DAC connection to the positive input of the ADC, the DAC CTRLB.EOEN must be set.