NEC V850E/Dx3 Preliminary User's Manual page 848

32-bit single-chip microcontroller
Table of Contents

Advertisement

Chapter 24
848
Downloaded from
Elcodis.com
electronic components distributor
(5)
SG0PWM - SG0 volume register
The 16-bit register SG0PWM is used to specify the sound volume. It holds the
target value for the sound amplitude that is given by the duty cycle of the PWM
signal.
Access
This register is can be read/written in 16-bit units. It cannot be written if bit
SG0CTL.PWR = 0.
Address
<base> + 4
H
Initial Value
0000
. This register is cleared by any reset.
H
15
14
13
0
0
0
R
R
R
The value written to this register must be considered in conjunction with the
contents of register SG0FL. The register SG0FL specifies the maximum value
of the counter SG0FL.
For the calculation of the resulting duty cycle refer to "PWM calculations" on
page 852.
The setting takes effect after the SG0PWM buffer has been updated (see
"Updating the volume buffer value" on page 851).
Note
1.
The bits 15:9 are not used.
2.
The value read from this register does not necessarily reflect the current
volume, because the value of counter SG0FL is compared with the
contents of the volume buffer. The buffer might not be updated yet.
3.
The sound stops immediately when this register is cleared.
Preliminary User's Manual U17566EE1V2UM00
12
11
10
9
8
7
0
0
0
0
R
R
R
R
Sound Generator (SG)
6
5
4
3
2
1
Sound volume target value
R/W
0

Advertisement

Table of Contents
loading

Table of Contents