
17. A/D Converter
17.1.7
Multi-Port Repeat Sweep Mode 0
In multi-port repeat sweep mode 0, analog voltage that is applied to 16 selected pins is repeatedly converted to
a digital code. Set the DUS bit in the AD0CON3 register to 1 (DMAC operating mode enabled).
Table 17.9 lists specifications of multi-port repeat sweep mode 0.
Table 17.9
Multi-Port Repeat Sweep Mode 0 Specifications
Item
Specification
Function
Analog voltage applied to the 16 selected pins is repeatedly converted 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
Bits MPS11 and MPS10 in the AD0CON4 register determine which pins are used
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
Set the ADST bit in the AD0CON0 is set 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)