Operations Of D/A Converter; Operation In Normal Mode - Renesas RL78/G1P Hardware User Manual

16-bit single-chip microcontroller
Hide thumbs Also See for RL78/G1P:
Table of Contents

Advertisement

RL78/G1P

10.4 Operations of D/A Converter

10.4.1 Operation in normal mode

D/A conversion is performed using write operation to the DACSi register as the trigger.
The setting method is described below.
<1> Set the DACEN bit of the PER1 register (peripheral enable register 1) to 1 to start the supply of the input
clock to the D/A converter.
<2> Use the ADPC register (port configuration register) to set the ports to analog pins.
<3> Set the DAMDi bit of the DAM register (D/A converter mode register) to 0 (normal mode).
<4> Set the analog voltage value to be output to the ANOi pin to the DACSi register (D/A conversion value setting
register i ).
Steps <1> and <4> above constitute the initial settings.
<5> Set the DACEi bit of the DAM register to 1 (D/A conversion enable).
D/A conversion starts, and then, after the settling time elapses, the analog voltage set in step <4> is output to
the ANOi pin.
<6> To perform subsequent D/A conversions, write to the DACSi register.
The previous D/A conversion result is held until the next D/A conversion is performed.
When the DACEi bit of the DAM register is set to 0 (D/A conversion operation stop), D/A conversion stops.
If the ports are set to digital pins using the ADPC register, the ANOi pin goes into a high-impedance state when the
PM2i bit of the PM2 register for the port = 1 (input mode), and the ANOi pin outputs the set value of the PM2 register when
the PM2i bit = 0 (output mode).
Cautions 1. Even if 1, 0, and then 1 is set to the DACEi bit, there is a wait after 1 is set for the last time.
2. If the DACSi register is rewritten during the settling time, D/A conversion is aborted and
reconversion by using the rewritten values starts.
Remark i = 0, 1
R01UH0895EJ0100 Rev.1.00
Nov 29, 2019
CHAPTER 10 D/A CONVERTER
305

Advertisement

Table of Contents
loading

Table of Contents