C8051F340/1/2/3/4/5/6/7
5.1.Analog Multiplexer
AMUX0 selects the positive and negative inputs to the ADC. The positive input (AIN+) can be connected to individual Port pins, the
The conversion code format differs between
Input Voltage | ||
(AD0LJST = 0) | (AD0LJST = 1) | |
VREF x 1023/1024 | 0x03FF | 0xFFC0 |
VREF x 512/1024 | 0x0200 | 0x8000 |
VREF x 256/1024 | 0x0100 | 0x4000 |
0 | 0x0000 | 0x0000 |
When in Differential Mode, conversion codes are represented as
Input Voltage | ||
(Differential) | (AD0LJST = 0) | (AD0LJST = 1) |
VREF x 511/512 | 0x01FF | 0x7FC0 |
VREF x 256/512 | 0x0100 | 0x4000 |
0 | 0x0000 | 0x0000 |
0xFF00 | 0xC000 | |
| 0xFE00 | 0x8000 |
Important Note About ADC0 Input Configuration: Port pins selected as ADC0 inputs should be config- ured as analog inputs, and should be skipped by the Digital Crossbar. To configure a Port pin for analog input, set to ‘0’ the corresponding bit in register PnMDIN (for n = 0,1,2,3). To force the Crossbar to skip a Port pin, set to ‘1’ the corresponding bit in register PnSKIP (for n = 0,1,2). See Section “15. Port Input/ Output” on page 147 for more Port I/O configuration details.
42 | Rev. 0.5 |