Setup Procedure - Panasonic MN101L Series User Manual

Lsi
Table of Contents

Advertisement

Chapter 16
A/D Converter (ADC)
16.3.2

Setup Procedure

Initial setup of A/D conversion operation
The following flow chart shows the initial setup procedure of A/D conversion operation.
After initial setup, the A/D conversion is started, when the selected A/D conversion start factor occurs.
The conversion completion can be confirmed by monitoring A/D conversion interrupt or the ANCTR2.ANST.
When the conversion is restarted by changing the setting after the A/D conversion, set the
ANCTR0.ANLADE to "0" to change the setup after stopping an analog circuit.
Note that operation is not guaranteed if the procedures above are not properly conducted.
..
..
After setting the ANCTR0.ANLADE to "1" and waiting for 12 conversion clocks, start A/D con-
version.
..
..
XVI - 12
Operation
//Analog input pin setting
//Analog pin function selection
//Channel selection
ANCTR1.ANCHS2-0 = "ANn"
//A/D conversion clock, S/H time setting
ANCTR0.ANCK2-0 = "any"
ANCTR0.ANSH1-0 = "any"
ANCTR0.ANLADE = 0
//A/D converion star factor selection
ANCTR2.ANSTSEL1-0 = "any"
Figure:16.3.2 Initial setup procedure of A/D conversion operation
START
ANEN0.ANEN0 = 1
PnDIR.PnDIRm = 0
PnPLU.PnPLUm = 0
PnODC.PnODCm = 0
//A/D resistor ladder ON
ANCTR0.ANLADE = 1
END

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mn101lr05dMn101lr04dMn101lr03dMn101lr02d

Table of Contents