
17. A/D Converter
17.1.6
Multi-Port Single Sweep Mode
In multi-port single sweep mode, analog voltage applied to 16 selected pins is converted once for each pin to a
digital code. Set the DUS bit in the AD0CON3 register to 1 (DMAC operating mode enabled).
Table 17.8 lists specifications of multi-port single sweep mode.
Table 17.8
Multi-Port Single Sweep Mode Specifications
Item
Specification
Function
Analog voltage applied to the 16 selected pins is repeatedly converted once for
each pin to a digital code in the following order: AN_0 to AN_7
→ ANi_0 to ANi_7
(i = 0, 2, 15)
Analog voltage input pins
Select one of the following.
AN_0
→ AN_1 → . . . → AN_7 → AN0_0 → AN0_1→ . . . → AN0_7
AN_0
→ AN_1 → . . . → AN_7 → AN2_0 → AN2_1→ . . . → AN2_7
AN_0
→ AN_1 → . . . → AN_7 → AN15_0 → AN15_1→ . . . → AN15_7
The following register settings determine which pins are used:
Bits MPS11 and MPS10 in the AD0CON4 register
Start condition
When the TRG bit in the AD0CON0 register is set to 0 (software trigger):
the ADST bit in the AD0CON0 register is set to 1 (A/D conversion starts)
When the TRG bit is set to 1 (external trigger, hardware trigger), one of the
following can be selected:
A falling edge is input to the ADTRG pin after the ADST bit is set to 1
Timer B2 interrupt request of three-phase motor control timer function (after
the ICTB2 register completes counting) is generated after the ADST bit is set
to 1
Stop condition
When the TRG bit is set to 0 (software trigger):
The sequence of A/D conversions is completed (the ADST bit becomes 0)
When the TRG bit is set to 1 (external trigger, hardware trigger):
Set the ADST bit to 0 (A/D conversion stops)
Interrupt request generation timing An interrupt request is generated every time A/D conversion is completed
(Set the DUS bit in the AD0CON3 register to 1)
Reading of A/D conversion result
A/D conversion result is stored into the AD00 register after A/D conversion is
completed. Then, DMAC transfers the data from the AD00 register to a given
memory space. Refer to 12. DMAC for DMAC settings. (Set the DUS bit in the
AD0CON3 register to 1)