LS_Analog to digital convertor (ADC)
RM0082
648/844
Doc ID 018672 Rev 1
29.5.2 AVERAGE_REG
register
The AVERAGE_REG is a RO register which reports the resulting data of the requested ADC
conversion, named as conversion data. It can return 10 or 17 bit according to the setting of
HIGH RESOLUTION bit inside the register ADC_STATUS_REG (
)
HIGH RESOLUTION = 0 (Normal mode)
.
The result of ADC conversion contains
integer part only. The result is present in 10 bits
HIGH RESOLUTION =1
. The
result of ADC conversion is present in 17 bit. The result contains both integer and fractional
part of the ADC conversion.The number fractional part depends upon numbers of samples
used.
Note:
This register can be read only if both bit[8], CONVERSION READY, and bit[0], ENABLE, of
the ADC_STATUS_REG register are set to 1‘b1.
[03:01]
CHANNEL SELECT
3’h0
RW
Channel selection.
This 3 bit field allows to select one of the 8
analog input (AIN) channels, according to
encoding:
– 3‘b000 = AIN[0]
– 3‘b001 = AIN[1]
– 3‘b010 = AIN[2]
– 3‘b011 = AIN[3]
– 3‘b100 = AIN[4]
– 3‘b101 = AIN[5]
– 3‘b110 = AIN[6]
– 3‘b111 = AIN[7]
[00]
ENABLE
1’h0
RW
Conversion enable.
Setting this bit, the conversion is enabled.
1.
This bit can be set only when the ENABLE bit is reset.
Table 576.
ADC_STATUS_REG register (continued)
Bit
Name
Reset
value
(1)
Type
Description
Table 577.
Conversion data bits position in AVERAGE_REG (High Resolution = 0)
Bit
Name
Reset
value
Type
Description
[09:00] CONVERSION DATA
10‘h0
RO
Contain the result of the ADC conversion
Table 578.
Conversion data bits position in AVERAGE_REG (High Resolution = 1)
ADC_STATUS_REG[7:5]
Number of samples
Integer part of the
result
Fractional part of the
result
3‘b000
1
bits [9:0]
-
3‘b001
2
bits [10:1]
bit [0]
3‘b010
4
bits [11:2]
bits [1:0]
3‘b011
8
bits [12:3]
bits [2:0]