
17. A/D Converter
17.2
Functions
17.2.1
Resolution Select Function
The BITS bit in the AD0CON1 register determines the resolution. When the BITS bit is set to 1 (10-bit mode),
the A/D conversion result is stored into bits 9 to 0 in the AD0i register (i = 0 to 7). When the BITS bit is set to 0
(8-bit mode), the A/D conversion result is stored into bits 7 to 0 in the AD0i register.
17.2.2
Sample and Hold
When the SMP bit in the AD0CON2 register is set to 1 (with sample and hold), the A/D conversion rate per pin
increases to 28
φAD cycles for 8-bit resolution and 33 φAD cycles for 10-bit resolution. The sample and hold
function is available in all operating modes. Start A/D conversion after selecting whether the sample and hold
circuit is used or not.
17.2.3
Trigger Select Function
The TRG bit in the AD0CON0 register and the TRG0 bit in the AD0CON2 register determine a trigger to start
A/D conversion.
Table 17.10 lists setting values for the trigger select function.
Table 17.10
Trigger Select Function Setting Values
NOTES:
1. A/D0 starts A/D conversion when the ADST bit is set to 1 (A/D conversion starts) and a trigger is generated.
2. A/D conversion is restarted from the beginning, if an external trigger or a hardware trigger is inserted during A/
D conversion. (Ongoing A/D conversion is aborted.)
17.2.4
DMAC Operating Mode
DMAC operating mode is available in all operating modes. To select multi-port single sweep mode or multi-
port repeat sweep mode 0, DMAC operating mode must be used. When the DUS bit in the AD0CON3 register
is set to 1 (DMAC operating mode enabled), all A/D conversion results are stored into the AD00 register.
DMAC transfers the data from the AD00 register to a given memory space every time A/D conversion at a
single pin is completed. 8-bit DMA transfer must be selected for 8-bit resolution and 16-bit DMA transfer for
10-bit resolution. Refer to 12. DMAC for DMAC instructions.
When using DMAC operating mode in single sweep mode, repeat sweep mode 0, repeat sweep mode 1, multi-
port single sweep mode, or multi-port repeat sweep mode 0, do not generate an external retrigger or hardware
retrigger. If these retriggers are inserted during a DMA transfer, the transfer is aborted and restarted from the
beginning.
Bit and Setting Values
Trigger
AD0CON0 Register
AD0CON2 Register
TRG = 0
Software trigger
A/D0 starts A/D conversion when the ADST bits in the AD0CON0
register is set to “1”
TRG0 = 0
Falling edge of a signal applied to ADTRG
TRG0 = 1
Timer B2 interrupt request of three-phase motor control timer
function (after the ICTB2 register completes counting)