PIC32CX2051MTG128 ADC registers

The 45 registers of ADC (Analog-to-Digital Converter), from 0x40024000, with their reset value and every field. The PIC32CX2051MTG128 has 2875 registers in 60 peripherals, one page each.

ADC Analog-to-Digital Converter

ADC_CRControl Register

Address
0x40024000
Reset
0x00000000
Access
write only
Size
32-bit
4 fields
FieldBitsWhat it does
CMPRST4Comparison Restart
SWFIFO3Software FIFO Reset
START1Start Conversion
SWRST0Software Reset

ADC_MRMode Register

Address
0x40024004
Reset
0x00000000
Access
read/write
Size
32-bit
10 fields
FieldBitsWhat it does
ALWAYS130
TRANSFER29:28Transfer Time
TRACKTIM27:24Tracking Time
ANACH23Analog Change
  • 0 No analog change on channel switching: DIFF0 is used for all channels.
  • 1 Allows different analog settings for each channel. See ADC Channel Configuration Register.
STARTUP19:16Startup Time
  • 0 0 period of ADCCLK
  • 1 8 periods of ADCCLK
  • 2 16 periods of ADCCLK
  • 3 24 periods of ADCCLK
  • 4 64 periods of ADCCLK
  • 5 80 periods of ADCCLK
  • 6 96 periods of ADCCLK
  • 7 112 periods of ADCCLK
  • 8 512 periods of ADCCLK
  • 9 576 periods of ADCCLK
  • 10 640 periods of ADCCLK
  • 11 704 periods of ADCCLK
  • 12 768 periods of ADCCLK
  • 13 832 periods of ADCCLK
  • 14 896 periods of ADCCLK
  • 15 960 periods of ADCCLK
PRESCAL15:8Prescaler Rate Selection
FWUP6Fast Wake-up
  • 0 If SLEEP is 1, then both ADC core and reference voltage circuitry are off between conversions.
  • 1 If SLEEP is 1, then Fast Wake-up Sleep mode: The voltage reference is on between conversions and ADC core is off.
SLEEP5Sleep Mode
  • 0 Normal mode: The ADC core and reference voltage circuitry are kept on between conversions.
  • 1 Sleep mode: The wake-up time can be modified by programming the FWUP bit.
TRGSEL3:1Trigger Selection
  • 0 PWM event line 0
  • 1 TIOA0 TC0
  • 2 TIOA1 TC0
  • 3 TIOA2 TC0
  • 4 TIOA0 TC1
  • 5 TIOA1 TC1
  • 6 RTCOUT0
USEQ31User Sequence Enable
  • 0 Normal mode: The controller converts channels in a simple numeric order depending only on the channel index.
  • 1 User Sequence mode: The sequence respects what is defined in ADC_SEQR1and can be used to convert the same channel several times.

ADC_SEQR1Channel Sequence Register 1

Address
0x40024008
Reset
0x00000000
Access
read/write
Size
32-bit
8 fields
FieldBitsWhat it does
USCH727:24User Sequence Number 7
USCH623:20User Sequence Number 6
USCH519:16User Sequence Number 5
USCH415:12User Sequence Number 4
USCH311:8User Sequence Number 3
USCH27:4User Sequence Number 2
USCH13:0User Sequence Number 1
USCH831:28User Sequence Number 8

ADC_CHERChannel Enable Register

Address
0x40024010
Reset
0x00000000
Access
write only
Size
32-bit
8 fields
FieldBitsWhat it does
CH77Channel 7 Enable
CH66Channel 6 Enable
CH55Channel 5 Enable
CH44Channel 4 Enable
CH33Channel 3 Enable
CH22Channel 2 Enable
CH11Channel 1 Enable
CH00Channel 0 Enable

ADC_CHDRChannel Disable Register

Address
0x40024014
Reset
0x00000000
Access
write only
Size
32-bit
8 fields
FieldBitsWhat it does
CH77Channel 7 Disable
CH66Channel 6 Disable
CH55Channel 5 Disable
CH44Channel 4 Disable
CH33Channel 3 Disable
CH22Channel 2 Disable
CH11Channel 1 Disable
CH00Channel 0 Disable

ADC_CHSRChannel Status Register

Address
0x40024018
Reset
0x00000000
Access
read only
Size
32-bit
8 fields
FieldBitsWhat it does
CH77Channel 7 Status
CH66Channel 6 Status
CH55Channel 5 Status
CH44Channel 4 Status
CH33Channel 3 Status
CH22Channel 2 Status
CH11Channel 1 Status
CH00Channel 0 Status

ADC_LCDRLast Converted Data Register

Address
0x40024020
Reset
0x00000000
Access
read only
Size
32-bit
4 fields
FieldBitsWhat it does
CHNBOSR28:24Channel Number in Oversampling Mode
LDATA15:0Last Data Converted
NO_OSR_CHNB15:12Channel Number when No Oversampling
NO_OSR_LDATA11:0Last Data Converted when No Oversampling

ADC_IERInterrupt Enable Register

Address
0x40024024
Reset
0x00000000
Access
write only
Size
32-bit
14 fields
FieldBitsWhat it does
RXBUFF28Receive Buffer Full Interrupt Enable
ENDRX27End of Receive Transfer Interrupt Enable
COMPE26Comparison Event Interrupt Enable
GOVRE25General Overrun Error Interrupt Enable
DRDY24Data Ready Interrupt Enable
TEMPCHG19Temperature Change Interrupt Enable
EOS18End Of Sequence Interrupt Enable
SMEV6Supply Monitor Event Interrupt Enable
RXOVR5Receive Over Flow Interrupt Enable
RXUDR4Receive Under Flow Interrupt Enable
RXCHUNK3Receive FIFO Chunk Interrupt Enable
RXFULL2Receive FIFO Full Interrupt Enable
RXEMPTY1Receive FIFO Empty Interrupt Enable
RXRDY0Receive Ready Interrupt Enable

ADC_IDRInterrupt Disable Register

Address
0x40024028
Reset
0x00000000
Access
write only
Size
32-bit
14 fields
FieldBitsWhat it does
RXBUFF28Receive Buffer Full Interrupt Disable
ENDRX27End of Receive Transfer Interrupt Disable
COMPE26Comparison Event Interrupt Disable
GOVRE25General Overrun Error Interrupt Disable
DRDY24Data Ready Interrupt Disable
TEMPCHG19Temperature Change Interrupt Disable
EOS18End Of Sequence Interrupt Disable
SMEV6Supply Monitor Event Interrupt Disable
RXOVR5Receive Over Flow Interrupt Disable
RXUDR4Receive Under Flow Interrupt Disable
RXCHUNK3Receive FIFO Chunk Interrupt Disable
RXFULL2Receive FIFO Full Interrupt Disable
RXEMPTY1Receive FIFO Empty Interrupt Disable
RXRDY0Receive Ready Interrupt Disable

ADC_IMRInterrupt Mask Register

Address
0x4002402C
Reset
0x00000000
Access
read only
Size
32-bit
14 fields
FieldBitsWhat it does
RXBUFF28Receive Buffer Full Interrupt Mask
ENDRX27End of Receive Transfer Interrupt Mask
COMPE26Comparison Event Interrupt Mask
GOVRE25General Overrun Error Interrupt Mask
DRDY24Data Ready Interrupt Mask
TEMPCHG19Temperature Change Interrupt Mask
EOS18End Of Sequence Interrupt Mask
SMEV6Supply Monitor Event Interrupt Mask
RXOVR5Receive Over Flow Interrupt Mask
RXUDR4Receive Under Flow Interrupt Mask
RXCHUNK3Receive FIFO Chunk Interrupt Mask
RXFULL2Receive FIFO Full Interrupt Mask
RXEMPTY1Receive FIFO Empty Interrupt Mask
RXRDY0Receive Ready Interrupt Mask

ADC_ISRInterrupt Status Register

Address
0x40024030
Reset
0x00000000
Access
read only
Size
32-bit
14 fields
FieldBitsWhat it does
RXBUFF28Receive Buffer Full (cleared by writing ADC_RCR or ADC_RNCR)
ENDRX27End of Receive Transfer (cleared by writing ADC_RCR or ADC_RNCR)
COMPE26Comparison Event (cleared on read)
GOVRE25General Overrun Error (cleared on read)
DRDY24Data Ready (automatically set / cleared)
TEMPCHG19Temperature Change (cleared on read)
EOS18End Of Sequence (cleared on read)
SMEV6Supply Monitor Event (cleared on read)
RXOVR5Receive Over Flow (cleared on read)
RXUDR4Receive Under Flow (cleared on read)
RXCHUNK3Receive FIFO Chunk (cleared on read)
RXFULL2Receive FIFO Full (cleared on read)
RXEMPTY1Receive FIFO Empty (cleared on read)
RXRDY0Receive Ready (cleared on read)

ADC_EOC_IEREnd Of Conversion Interrupt Enable Register

Address
0x40024034
Reset
0x00000000
Access
write only
Size
32-bit
8 fields
FieldBitsWhat it does
EOC77End of Conversion Interrupt Enable 7
EOC66End of Conversion Interrupt Enable 6
EOC55End of Conversion Interrupt Enable 5
EOC44End of Conversion Interrupt Enable 4
EOC33End of Conversion Interrupt Enable 3
EOC22End of Conversion Interrupt Enable 2
EOC11End of Conversion Interrupt Enable 1
EOC00End of Conversion Interrupt Enable 0

ADC_EOC_IDREnd Of Conversion Interrupt Disable Register

Address
0x40024038
Reset
0x00000000
Access
write only
Size
32-bit
8 fields
FieldBitsWhat it does
EOC77End of Conversion Interrupt Disable 7
EOC66End of Conversion Interrupt Disable 6
EOC55End of Conversion Interrupt Disable 5
EOC44End of Conversion Interrupt Disable 4
EOC33End of Conversion Interrupt Disable 3
EOC22End of Conversion Interrupt Disable 2
EOC11End of Conversion Interrupt Disable 1
EOC00End of Conversion Interrupt Disable 0

ADC_EOC_IMREnd Of Conversion Interrupt Mask Register

Address
0x4002403C
Reset
0x00000000
Access
read only
Size
32-bit
8 fields
FieldBitsWhat it does
EOC77End of Conversion Interrupt Mask 7
EOC66End of Conversion Interrupt Mask 6
EOC55End of Conversion Interrupt Mask 5
EOC44End of Conversion Interrupt Mask 4
EOC33End of Conversion Interrupt Mask 3
EOC22End of Conversion Interrupt Mask 2
EOC11End of Conversion Interrupt Mask 1
EOC00End of Conversion Interrupt Mask 0

ADC_EOC_ISREnd Of Conversion Interrupt Status Register

Address
0x40024040
Reset
0x00000000
Access
read only
Size
32-bit
8 fields
FieldBitsWhat it does
EOC77End of Conversion 7 (automatically set / cleared)
EOC66End of Conversion 6 (automatically set / cleared)
EOC55End of Conversion 5 (automatically set / cleared)
EOC44End of Conversion 4 (automatically set / cleared)
EOC33End of Conversion 3 (automatically set / cleared)
EOC22End of Conversion 2 (automatically set / cleared)
EOC11End of Conversion 1 (automatically set / cleared)
EOC00End of Conversion 0 (automatically set / cleared)

ADC_TEMPMRTemperature Sensor Mode Register

Address
0x40024044
Reset
0x00000000
Access
read/write
Size
32-bit
2 fields
FieldBitsWhat it does
TEMPCMPMOD5:4Temperature Comparison Mode
  • 0 Generates the TEMPCHG flag in ADC_ISR when the converted data is lower than the low threshold of the window.
  • 1 Generates the TEMPCHG flag in ADC_ISR when the converted data is higher than the high threshold of the window.
  • 2 Generates the TEMPCHG flag in ADC_ISR when the converted data is in the comparison window.
  • 3 Generates the TEMPCHG flag in ADC_ISR when the converted data is out of the comparison window.
TEMPON0Temperature Sensor On

ADC_TEMPCWRTemperature Compare Window Register

Address
0x40024048
Reset
0x00000000
Access
read/write
Size
32-bit
2 fields
FieldBitsWhat it does
THIGHTHRES27:16Temperature High Threshold
TLOWTHRES11:0Temperature Low Threshold

ADC_OVEROverrun Status Register

Address
0x4002404C
Reset
0x00000000
Access
read only
Size
32-bit
8 fields
FieldBitsWhat it does
OVRE77Overrun Error 7
OVRE66Overrun Error 6
OVRE55Overrun Error 5
OVRE44Overrun Error 4
OVRE33Overrun Error 3
OVRE22Overrun Error 2
OVRE11Overrun Error 1
OVRE00Overrun Error 0

ADC_EMRExtended Mode Register

Address
0x40024050
Reset
0x00000000
Access
read/write
Size
32-bit
12 fields
FieldBitsWhat it does
ADCMODE29:28ADC Running Mode
  • 0 Normal mode of operation.
  • 1 Offset Error mode to measure the offset error. See Table 6-6 "ADC Running Modes".
  • 2 Gain Error mode to measure the gain error. See Table 6-6 "ADC Running Modes".
  • 3 Gain Error mode to measure the gain error. See Table 6-6 "ADC Running Modes".
SIGNMODE26:25Sign Mode
  • 0 Single-ended channels: unsigned conversions Differential channels: signed conversions
  • 1 Single-ended channels: signed conversions Differential channels: unsigned conversions
  • 2 All channels: unsigned conversions
  • 3 All channels: signed conversions
TAG24ADC_LCDR Tag
TRACKX23:22Tracking Time x4, x8 or x16
  • 0 ADC_MR.TRACKTIM effect is multiplied by 1.
  • 1 ADC_MR.TRACKTIM effect is multiplied by 4.
  • 2 ADC_MR.TRACKTIM effect is multiplied by 8
  • 3 ADC_MR.TRACKTIM effect is multiplied by 16.
SRCCLK21External Clock Selection
  • 0 The peripheral clock is the source for the ADC prescaler.
  • 1 GCLK is the source clock for the ADC prescaler, thus the ADC clock can be independent of the core/peripheral clock.
ASTE20Averaging on Single Trigger Event
  • 0 The average requests several trigger events.
  • 1 The average requests only one trigger event.
OSR18:16Over Sampling Rate
  • 0 No averaging. ADC sample rate is maximum.
  • 1 1-bit enhanced resolution by averaging. ADC sample rate divided by 4.
  • 2 2-bit enhanced resolution by averaging. ADC sample rate divided by 16.
  • 3 1-bit enhanced resolution by averaging. ADC sample rate divided by 64
  • 4 2-bit enhanced resolution by averaging. ADC sample rate divided by 256.
CMPFILTER13:12Compare Event Filtering
CMPALL9Compare All Channels
CMPSEL8:4Comparison Selected Channel
CMPTYPE2Comparison Type
  • 0 Any conversion is performed and comparison function drives the COMPE flag.
  • 1 Comparison conditions must be met to start the storage of all conversions until ADC_CR.CMPRST is set.
CMPMODE1:0Comparison Mode
  • 0 When the converted data is lower than the low threshold of the window, generates the COMPE flag in ADC_ISR or, in Partial Wake-up mode, defines the conditions to exit the system from Wait mode.
  • 1 When the converted data is higher than the high threshold of the window, generates the COMPE flag in ADC_ISR or, in Partial Wake-up mode, defines the conditions to exit the system from Wait mode.
  • 2 When the converted data is in the comparison window, generates the COMPE flag in ADC_ISR or, in Partial Wake-up mode, defines the conditions to exit the system from Wait mode.
  • 3 When the converted data is out of the comparison window, generates the COMPE flag in ADC_ISR or, in Partial Wake-up mode, defines the conditions to exit the system from Wait mode.

ADC_CWRCompare Window Register

Address
0x40024054
Reset
0x00000000
Access
read/write
Size
32-bit
2 fields
FieldBitsWhat it does
LOWTHRES15:0Low Threshold
HIGHTHRES31:16High Threshold

ADC_CCRChannel Configuration Register

Address
0x4002405C
Reset
0x00000000
Access
read/write
Size
32-bit
8 fields
FieldBitsWhat it does
DIFF77Differential Inputs for Channel 7
DIFF66Differential Inputs for Channel 6
DIFF55Differential Inputs for Channel 5
DIFF44Differential Inputs for Channel 4
DIFF33Differential Inputs for Channel 3
DIFF22Differential Inputs for Channel 2
DIFF11Differential Inputs for Channel 1
DIFF00Differential Inputs for Channel 0

ADC_CDR0Channel Data Register

Address
0x40024060
Reset
0x00000000
Access
read only
Size
32-bit
1 field
FieldBitsWhat it does
DATA15:0Converted Data

ADC_CDR1Channel Data Register

Address
0x40024064
Reset
0x00000000
Access
read only
Size
32-bit
1 field
FieldBitsWhat it does
DATA15:0Converted Data

ADC_CDR2Channel Data Register

Address
0x40024068
Reset
0x00000000
Access
read only
Size
32-bit
1 field
FieldBitsWhat it does
DATA15:0Converted Data

ADC_CDR3Channel Data Register

Address
0x4002406C
Reset
0x00000000
Access
read only
Size
32-bit
1 field
FieldBitsWhat it does
DATA15:0Converted Data

ADC_CDR4Channel Data Register

Address
0x40024070
Reset
0x00000000
Access
read only
Size
32-bit
1 field
FieldBitsWhat it does
DATA15:0Converted Data

ADC_CDR5Channel Data Register

Address
0x40024074
Reset
0x00000000
Access
read only
Size
32-bit
1 field
FieldBitsWhat it does
DATA15:0Converted Data

ADC_CDR6Channel Data Register

Address
0x40024078
Reset
0x00000000
Access
read only
Size
32-bit
1 field
FieldBitsWhat it does
DATA15:0Converted Data

ADC_CDR7Channel Data Register

Address
0x4002407C
Reset
0x00000000
Access
read only
Size
32-bit
1 field
FieldBitsWhat it does
DATA15:0Converted Data

ADC_ACRAnalog Control Register

Address
0x400240E0
Reset
0x00000000
Access
read/write
Size
32-bit
4 fields
FieldBitsWhat it does
SMVT22Supply Monitor Voltage Threshold
SMEN21Supply Monitor Enable
INTVREFEN20ADC Internal Positive Voltage Reference Enable
ZBAT2VBAT Resistive Load Selection

ADC_FMRFIFO Mode Register

Address
0x400240E4
Reset
0x00000000
Access
read/write
Size
32-bit
4 fields
FieldBitsWhat it does
FIFOCNT23:16FIFO Count (read-only)
CHUNK7:4Chunk Size
ENLEVEL1Enable Level
  • 0 Request to DMA is generated as soon as one data is written in FIFO when FIFO is enabled. CHUNK is not used.
  • 1 Request to DMA is generated as soon as the number of written elements in the FIFO is greater than or equal to CHUNK.
ENFIFO0Enable FIFO
  • 0 FIFO is disabled.
  • 1 FIFO is enabled.

ADC_RPRReceive Pointer Register

Address
0x40024100
Reset
0x00000000
Access
read/write
Size
32-bit
1 field
FieldBitsWhat it does
RXPTR31:0Receive Pointer Register

ADC_RCRReceive Counter Register

Address
0x40024104
Reset
0x00000000
Access
read/write
Size
32-bit
1 field
FieldBitsWhat it does
RXCTR15:0Receive Counter Register

ADC_RNPRReceive Next Pointer Register

Address
0x40024110
Reset
0x00000000
Access
read/write
Size
32-bit
1 field
FieldBitsWhat it does
RXNPTR31:0Receive Next Pointer

ADC_RNCRReceive Next Counter Register

Address
0x40024114
Reset
0x00000000
Access
read/write
Size
32-bit
1 field
FieldBitsWhat it does
RXNCTR15:0Receive Next Counter

ADC_PTCRTransfer Control Register

Address
0x40024120
Reset
0x00000000
Access
write only
Size
32-bit
9 fields
FieldBitsWhat it does
ERRCLR24Transfer Bus Error Clear
TXCBDIS19Transmitter Circular Buffer Disable
TXCBEN18Transmitter Circular Buffer Enable
RXCBDIS17Receiver Circular Buffer Disable
RXCBEN16Receiver Circular Buffer Enable
TXTDIS9Transmitter Transfer Disable
TXTEN8Transmitter Transfer Enable
RXTDIS1Receiver Transfer Disable
RXTEN0Receiver Transfer Enable

ADC_PTSRTransfer Status Register

Address
0x40024124
Reset
0x00000000
Access
read only
Size
32-bit
5 fields
FieldBitsWhat it does
ERR24Transfer Bus Error
TXCBEN18Transmitter Circular Buffer Enable
RXCBEN16Receiver Circular Buffer Enable
TXTEN8Transmitter Transfer Enable
RXTEN0Receiver Transfer Enable

ADC_PWPMRWrite Protection Mode Register

Address
0x40024128
Reset
0x00000000
Access
read/write
Size
32-bit
4 fields
FieldBitsWhat it does
WPCREN2Write Protection Control Register Enable
WPCTREN1Write Protection Counter Registers Enable
WPPTREN0Write Protection Pointer Registers Enable
WPKEY31:8Write Protection Key
  • 5260355 Writing any other value in this field aborts the write operation. Always reads as 0.

ADC_TRGRTrigger Register

Address
0x40024130
Reset
0x00000000
Access
read/write
Size
32-bit
2 fields
FieldBitsWhat it does
TRGMOD2:0Trigger Mode
  • 0 No hardware trigger, only software trigger can start conversions
  • 1 Rising edge of the selected trigger event, defined in ADC_MR.TRGSEL
  • 2 Falling edge of the selected trigger event
  • 3 Any edge of the selected trigger event
  • 5 ADC internal periodic trigger (see TRGPER)
  • 6 Continuous mode, free run mode
TRGPER31:8Trigger Period

ADC_COSRCorrection Select Register

Address
0x40024134
Reset
0x00000000
Access
read/write
Size
32-bit
1 field
FieldBitsWhat it does
CSEL4:0Channel Correction Select

ADC_CVRCorrection Values Register

Address
0x40024138
Reset
0x00000000
Access
read/write
Size
32-bit
2 fields
FieldBitsWhat it does
OFFSETCORR15:0Offset Correction
GAINCORR31:16Gain Correction

ADC_CECRChannel Error Correction Register

Address
0x4002413C
Reset
0x00000000
Access
read/write
Size
32-bit
8 fields
FieldBitsWhat it does
ECORR77Error Correction Enable for Channel 7
ECORR66Error Correction Enable for Channel 6
ECORR55Error Correction Enable for Channel 5
ECORR44Error Correction Enable for Channel 4
ECORR33Error Correction Enable for Channel 3
ECORR22Error Correction Enable for Channel 2
ECORR11Error Correction Enable for Channel 1
ECORR00Error Correction Enable for Channel 0

ADC_SRStatus Register

Address
0x40024144
Reset
0x00000000
Access
read only
Size
32-bit
1 field
FieldBitsWhat it does
VADCSM0VDD ADC Supply Monitor Output

ADC_WPMRWrite Protection Mode Register

Address
0x4002414C
Reset
0x00000000
Access
read/write
Size
32-bit
4 fields
FieldBitsWhat it does
WPCREN2Write Protection Control Register Enable
WPITEN1Write Protection Interrupt Enable
WPEN0Write Protection Enable
WPKEY31:8Write Protection Key
  • 4277315 Writing any other value in this field aborts the write operation of the WPEN bit. Always reads as 0.

ADC_WPSRWrite Protection Status Register

Address
0x40024150
Reset
0x00000000
Access
read only
Size
32-bit
2 fields
FieldBitsWhat it does
WPVSRC23:8Write Protection Violation Source
WPVS0Write Protection Violation Status