847
Sound Generator (SG)
Chapter 24
Preliminary User’s Manual U17566EE1V2UM00
(3)
SG0FH - SG0 frequency high register
The 16-bit SG0FH register is used to specify the final tone frequency. It holds
the target value for the 6-bit counter SG0FH.
Access
This register is can be read/written in 16-bit units. It cannot be written if bit
SG0CTL.PWR = 0.
The SG0FH register can also be read/written together with the SG0FL register
by 32-bit access to the SG0FL register via the SG0F register.
Address
<base> + 2
H
Initial Value
0000
H
. This register is cleared by any reset.
For the calculation of the resulting tone frequency refer to
“Tone frequency
calculation“ on page 850
.
Note
1.
The bits SG0FH[15:6] are not used.
2.
Legal values depend on the contents of register SG0FL which defines the
frequency of the input pulse. For example: If the counter SG0FL generates
a frequency of 32.4 KHz, a value of 63 would generate a tone frequency of
253 Hz.
3.
The value read from this register does not necessarily reflect the current
tone frequency, because this frequency is determined by the frequency
compare buffer value. The buffer might not be updated yet.
For details see
“Updating the frequency buffer values“ on page 849
.
(4)
SG0F - SG0 frequency register
The 32-bit register SG0F combines access to the 16-bit registers SG0FL and
SG0H. This makes it possible to change the values for the PWM and tone
frequency with one write access.
Access
This register is can be read/written in 32-bit units. It cannot be written if bit
SG0CTL.PWR = 0.
Address
<base>
Initial Value
0000 0000
H
. This register is cleared by any reset.
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
0
0
0
0
0
0
0
0
0
0
Counter SG0FH target value
R
R
R
R
R
R
R
R
R
R
R/W
31
16
15
0
SG0FH
SG0FL
electronic components distributor