ST2202A
14. PSG
14.1 Function description
TheꢀbuiltꢁinꢀdualꢀchannelꢀProgrammableꢀSoundꢀGeneratorꢀ
(PSG)ꢀisꢀcontrolledꢀbyꢀregisterꢀfileꢀdirectly.ꢀItsꢀflexibilityꢀmakesꢀitꢀ
usefulꢀinꢀapplicationsꢀsuchꢀasꢀmusicꢀsynthesis,ꢀsoundꢀeffectsꢀ
generation,ꢀaudibleꢀalarmsꢀandꢀtoneꢀsignaling.ꢀInꢀorderꢀtoꢀ
generateꢀsoundꢀeffectsꢀwhileꢀallowingꢀtheꢀprocessorꢀtoꢀperformꢀ
otherꢀtasks,ꢀtheꢀPSGꢀcanꢀcontinueꢀtoꢀproduceꢀsoundꢀafterꢀtheꢀ
initialꢀcommandsꢀhaveꢀbeenꢀgivenꢀbyꢀtheꢀCPU.ꢀTheꢀstructureꢀofꢀ
ꢀ
PSGꢀwasꢀshownꢀinꢀFIGUREꢀ14ꢁ2ꢀandꢀtheꢀPSGꢀclockꢀsourceꢀisꢀ
shownꢀinꢀFIGUREꢀ14ꢁ1.ꢀTheꢀST2202ꢀhasꢀthreeꢀPSGꢀplayingꢀ
type.ꢀOneꢀforꢀchannel0(C0)ꢀ&ꢀchannel1(C1)ꢀsquareꢀtypeꢀtoneꢀ
soundꢀplaying.ꢀSecondꢀforꢀch0ꢀsquareꢀtoneꢀsoundꢀandꢀch1ꢀ
noiseꢀsound.ꢀTheꢀthirdꢀsoundꢀplayingꢀtypeꢀisꢀDACꢀPCMꢀplaying.ꢀ
PSGC
PSGꢀSelector
PSGCK
PSGCK
ꢀꢀꢀꢀ
B6 B5 B4
RC
IN0
IN1
Output
SYSCK/2
SYSCK/4
SYSCK/8
SYSCK/16
SYSCK
0
X
X
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
OSCX
Select
PSGC[6~4]
OSCX
ꢀ
FIGURE 14-1 PSG Clock Source Control
ꢀ
ꢀ
PreloadꢀDataꢀBeforeꢀFirstꢀCount
C1TEN
ꢀꢀDACE
Channelꢀ1ꢀTone
Enable Output
MUX2
OUTPUT
C1Tone
C1out
IN0
IN1
ꢀꢀDACE
PSGC[2]
LOAD
SEL
Channelꢀ1ꢀNoise
Enable Output
C1NEN
PSGC[3]
C1Noise
MIXER
Output
MUX2
IN0
IN1
OUTPUT
PSG0
PSG1
C1out
CH1
SEL
Vol_CH1
ToꢀPortꢀB
ꢀVOL[1~0]
MUX2
OUTPUT
IN0
IN1
BD
BDB
FromꢀDACꢀGenerator
ꢀꢀDACE
SEL
ꢀ
FIGURE 14-2 PSG Block Diagram
ꢀ
ꢀ
Verꢀ2.5ꢀ
32
/75
ꢀ
9/16/2008ꢀ