BAT32G1x9 user manual | Chapter 16 D/A converter
530 / 1149
Rev.1.02
16.4 Operation of the D/A converter
16.4.1 Normal mode of operation
The D/A conversion is initiated using the write operation of the
DACSi register as the initiation trigger.
The setup method is as follows:
①
Take the DACEN position "1" of the PER1 register (peripheral allow register 1) and start providing
the input clock to the D/A converter.
②
Set the port to the analog pin through the PMC register (port mode control register).
③
Place the DAMDi position of the DAM register (the mode register of the D/A converter) "0" (usually
mode).
④
Sets the analog voltage value of the ANOi pin output to the DACSi register (D/A conversion value
setting register i).
The above (1) ~ (4) is the initial setting.
⑤
Place the DACEi position of the DAM register "1" (allow D/A conversion). Start the D/A conversion
and output the analog voltage set by (4) to the ANOi pin after the settling time has elapsed.
⑥
Thereafter, when you want to perform a D/A conversion, write the DACSi register.
Hold the results of the previous D/A conversion before performing the next D/A conversion.
If the DACEi position of the DAM register is "0" (stops the D/A conversion), the D/A conversion is stopped.
Note 1
Even if the
value of the
DACEi
bit is set to
"1"
"0"
"1"
, the DACSi
will be set after the settling time after
the
last
"1" The analog voltage of the register setting is output to the
ANOi
pin.
2. If the DACSi
register
is overwritten during the stable time, the conversion is
aborted and the conversion restarts with the overwritten value. Note
i = 0,
1