C8051F987-GMR Silicon Labs, C8051F987-GMR Datasheet - Page 65

no-image

C8051F987-GMR

Manufacturer Part Number
C8051F987-GMR
Description
8-bit Microcontrollers - MCU 8kB 512B RAM
Manufacturer
Silicon Labs
Datasheet

Specifications of C8051F987-GMR

Rohs
yes
Core
8051
Processor Series
C8051
Data Bus Width
8 bit
5.1.
The registers ADC0H and ADC0L contain the high and low bytes of the output conversion code from the
ADC at the completion of each conversion. Data can be right-justified or left-justified, depending on the
setting of the AD0SJST[2:0]. When the repeat count is set to 1, conversion codes are represented as 10-
bit unsigned integers. Inputs are measured from 0 to VREF x 1023/1024. Example codes are shown below
for both right-justified and left-justified data. Unused bits in the ADC0H and ADC0L registers are set to 0.
When the repeat count is greater than 1, the output conversion code represents the accumulated result of
the conversions performed and is updated after the last conversion in the series is finished. Sets of 4, 8,
16, 32, or 64 consecutive samples can be accumulated and represented in unsigned integer format. The
repeat count can be selected using the AD0RPT bits in the ADC0AC register. When a repeat count higher
than 1, the ADC output must be right-justified (AD0SJST = 0xx); unused bits in the ADC0H and ADC0L
registers are set to 0. The example below shows the right-justified result for various input voltages and
repeat counts. Notice that accumulating 2
samples returned from the ADC have the same value.
The AD0SJST bits can be used to format the contents of the 16-bit accumulator. The accumulated result
can be shifted right by 1, 2, or 3 bit positions. Based on the principles of oversampling and averaging, the
effective ADC resolution increases by 1 bit each time the oversampling rate is increased by a factor of 4.
The example below shows how to increase the effective ADC resolution by 1, 2, and 3 bits to obtain an
effective ADC resolution of 11-bit, 12-bit, or 13-bit respectively without CPU intervention.
V
V
V
V
V
V
REF
REF
VREF x 1023/1024
Input Voltage
Input Voltage
VREF x 512/1024
VREF x 256/1024
REF
REF
REF
REF
Input Voltage
x 1023/1024
x 1023/1024
x 512/1024
x 511/1024
x 512/1024
x 511/1024
Output Code Formatting
0
0
0
Repeat Count = 4
Repeat Count = 4
Shift Right = 1
11-Bit Result
Right-Justified ADC0H:ADC0L
0x0FFC
0x07FC
0x03FE
0x0800
0x0000
0x07F7
0x0400
0x0000
(AD0SJST = 000)
0x03FF
0x0200
0x0100
0x0000
n
samples is equivalent to left-shifting by n bit positions when all
Rev. 1.1
Repeat Count = 16
Repeat Count = 16
Shift Right = 2
12-Bit Result
0x0FFC
0x04FC
0x3FF0
0x1FF0
0x2000
0x0000
0x0800
0x0000
C8051F99x-C8051F98x
Left-Justified ADC0H:ADC0L
(AD0SJST = 100)
Repeat Count = 64
Repeat Count = 64
0xFFC0
0x0000
0x8000
0x4000
Shift Right = 3
13-Bit Result
0xFFC0
0x7FC0
0x1FF8
0x0FF8
0x8000
0x0000
0x1000
0x0000
65

Related parts for C8051F987-GMR