sh6614 SinoWealth Micro-Electronics Corp. Ltd, sh6614 Datasheet - Page 16

no-image

sh6614

Manufacturer Part Number
sh6614
Description
4k 4-bit Microcontroller With Lcd Driver
Manufacturer
SinoWealth Micro-Electronics Corp. Ltd
Datasheet
8.2. Function description
PSG as sound generator
The programmable sound is one of the 4 working modes. The software designer can select up to 16 clock sourcees as PSG clk.
And then select the CH1 and CH2 frequency divided value that is controlled by the value of REG C1.6 ~ C1.0 or
C2.14 ~ C2.8.The user can select the 4 volume level controlled by VOL0, VOL1. The music tone can output both PSG and
Example 1: CH1EN = CH2EN = 1
Example 3: CH1EN = CH2EN = 1
So PSG clk = 32kHz; Switch clk = 32kHz
No vol. control, the VOL level is set to 4 by hardware, so software should set VOL0 = VOL1 = 1.
Note: For 32KHz operations, the volume control cannot be used, since the PWM multiplexing frequency is not high enough to
switch sound! If a user wants to turn off the PSG completely, the software must disable both channels. The user should not turn
off the PSG by zero wave from output. Both the CH1EN and CH2EN should be set to "0" for the low power operation mode.
Example 4
If software designer wants to create C2 (Channel 1) mixed with F5 (Channel 2) sound (For the C2, F5 sound frequency please
refer to Music Table 1 and Music Table 2), VOL level = 3.Then the user can select the suggestion as follows:
(1) The user first selects CH1EN = CH2EN = 1, C1M = C2M = 0.
(2) The user can select OSCX = 1.8M and SEL0 = SEL1 = 1, so the PSG CLK = 112.5KHz.
(3) Then The user can select OCT1 = 1 and the value of channel 1 LSFR (C1.6 ~ C1.0) = 23, so the N = 108. Please see the
(4) Then The user can select OCT1 = 0 and the value of channel 1 LSFR (C1.6 ~ C1.0) = 4F, so the N = 81. Please refer to the
(5) Lastly, the user should select the VOL1 = 1 and VOL0 = 0, so the VOL level = 3.
PSG . The user also can control the OCT1, OCT2 bit that shifts the music tone 3 octaves.
Music Table 1.So the channel 1 sound frequency = 112.5Khz/8/ (2 X 108) = 64.10Hz ≒ the C2 sound frequency.
Music Table 1.So the channel 1 sound frequency = 112.5Khz/1/ (2 X 81) = 694.4Hz ≒ the F5 sound frequency .
OSCX = 1.8M, SEL0 = SEL1 = 1
So PSG clk = 112kHz; Switch clk = 28kHz
Vol. Clk = 112kHz
OSC = 32k, SEL0 = SEL1 = 0
16
Example 2: CH1EN = 0; CH2EN = 1
OSCX = 1.8M, SEL0 = SEL1 = 1
So PSG clk = 112kHz; Switch clk = 28kHz;
Vol. Clk = 112kHz
SH6614/B/C

Related parts for sh6614