![[AY-3-8910 Pin Configuration]](http://cpctech.cpc-live.com/docs/ay38912/psg14.gif) 
![[AY-3-8912 Pin Configuration]](http://cpctech.cpc-live.com/docs/ay38912/psg12.gif) 
![[AY-3-8913 Pin Configuration]](http://cpctech.cpc-live.com/docs/ay38912/psg13.gif) 
| BDIR | BC2 | BC1 | CP1610 FUNCTION | PSG FUNCTION | 
|---|---|---|---|---|
| 0 | 0 | 0 | NACT | INACTIVE. See 010 (IAB) | 
| 0 | 0 | 1 | ADAR | LATCH ADDRESS. See 111 (INTAK) | 
| 0 | 1 | 0 | IAB | INACTIVE: The PSG/CPU bus is inactive, DA7--DA0 are in high impedence state | 
| 0 | 1 | 1 | DTB | READ FROM PSG. This signal causes the contents of the register which is currently addressed to appear on the PSG/CPU bus. DA7--DA0 are in output mode. | 
| 1 | 0 | 0 | BAR | LATCH ADDRESS. See 111 (INTAK) | 
| 1 | 0 | 1 | DW | INACTIVE. See 010 (IAB) | 
| 1 | 1 | 0 | DWS | WRITE TO PSG. This signal indicates that the bus contains register data which should be latched into the currently addressed register DA7--DA0 are in input mode. | 
| 1 | 1 | 1 | INTAK | LATCH ADDRESS. This signal indicates that the bus contains a register address which should be latched in the PSG. DA7--DA0 are in the input mode. | 
| BDIR | BC2 | BC1 | PSG FUNCTION | 
|---|---|---|---|
| 0 | 1 | 0 | INACTIVE | 
| 0 | 1 | 1 | READ FROM PSG | 
| 1 | 1 | 0 | WRITE TO PSG | 
| 1 | 1 | 1 | LATCH ADDRESS | 
![[Illustration of table]](http://cpctech.cpc-live.com/docs/ay38912/psg10.gif) 
| /A9* | A8 | DA7 | DA6 | DA5 | DA4 | DA3 | DA2 | DA1 | DA0 | 
|---|---|---|---|---|---|---|---|---|---|
| 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 
| 0 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 
| Tone Generators | produce the basic square wave tone frequencies for each channel (A,B,C) | 
| Noise Generator | produces a frequency modulated pseudo random pulse width square wave output. | 
| Mixers | combine the outputs of the Tone Generators and the Noise Generator. One for each channel (A,B,C) | 
| Amplitude Control | provides the D/A Converters with either a fixed or variable amplitude pattern. The fixed amplitude is under direct CPU control; the variable amplitude is accomplished by using, the output of the Envelope Generator. | 
| Envelope Generator | produces an evelope pattern which can be used to amplitude modulate the output of each Mixer. | 
| D/A Converters | the three D/A Converters each produce up to a 16 level output signal as determined by the Amplitude Control. | 
![[PSG Block Diagram]](http://cpctech.cpc-live.com/docs/ay38912/psg16.gif) 
| Operation | Registers | Function | 
|---|---|---|
| Tone Generator Control | R0--R5 | Program tone periods. | 
| Noise Generator Control | R6 | Program noise period. | 
| Mixer Control | R7 | Enable tone and/or noise on selected channels. | 
| Amplitude Control | R8--R10 | Select "fixed" or "envelope-variable" amplitudes. | 
| Envelope Generator Control | R11--R13 | Program envelope period and select envelope pattern. | 
| Course Tone Register | Channel | Fine Tune Register | 
|---|---|---|
| R1 | A | R0 | 
| R3 | B | R2 | 
| R5 | C | R4 | 
| Course Tone Register | Fine Tune Register | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| B7 | B6 | B5 | B4 | B3 | B2 | B1 | B0 | B7 | B6 | B5 | B4 | B3 | B2 | B1 | B0 | 
| TP11 | TP10 | TP9 | TP8 | TP7 | TP6 | TP5 | TP4 | TP3 | TP2 | TP1 | TP0 | ||||
| B7 | B6 | B5 | B4 | B3 | B2 | B1 | B0 | 
| B7 | B6 | B5 | B4 | B3 | B2 | B1 | B0 | 
| B | A | C | B | A | C | B | A | 
| Amplitude Control Register | Channel | 
|---|---|
| R8 | A | 
| R9 | B | 
| R10 | C | 
| B7 | B6 | B5 | B4 | B3 | B2 | B1 | B0 | 
| M | L3 | L2 | L1 | L0 | |||
| amplitude "mode" | |||||||
| Envelope Coarse Tune Register R12 | Envelope Fine Tune Register R11 | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| B7 | B6 | B5 | B4 | B3 | B2 | B1 | B0 | B7 | B6 | B5 | B4 | B3 | B2 | B1 | B0 | 
| EP15 | EP14 | EP13 | EP12 | EP11 | EP10 | EP9 | EP8 | EP7 | EP6 | EP5 | EP4 | EP3 | EP2 | EP1 | EP0 | 
| B7 | B6 | B5 | B4 | B3 | B2 | B1 | B0 | 
| Hold | Alternate | Attack | Continue | ||||
| R13 Bits | GRAPHICAL REPRESENTATION OF ENVELOPE GENERATOR OUTPUT (E3 E2 E1 E0) | |||
|---|---|---|---|---|
| B3 | B2 | B1 | B0 | |
| Continue | Attack | Alternate | Hold | |
| 0 | 0 | x | x | ![[Envelope shape 00xx]](http://cpctech.cpc-live.com/docs/ay38912/psg1.gif) | 
| 0 | 1 | x | x | ![[Envelope shape 01xx]](http://cpctech.cpc-live.com/docs/ay38912/psg3.gif) | 
| 1 | 0 | 0 | 0 | ![[Envelope shape 1000]](http://cpctech.cpc-live.com/docs/ay38912/psg5.gif) | 
| 1 | 0 | 0 | 1 | ![[Envelope shape 1001]](http://cpctech.cpc-live.com/docs/ay38912/psg1.gif) | 
| 1 | 0 | 1 | 0 | ![[Envelope shape 1010]](http://cpctech.cpc-live.com/docs/ay38912/psg8.gif) | 
| 1 | 0 | 1 | 1 | ![[Envelope shape 1011]](http://cpctech.cpc-live.com/docs/ay38912/psg4.gif) | 
| 1 | 1 | 0 | 0 | ![[Envelope shape 1100]](http://cpctech.cpc-live.com/docs/ay38912/psg6.gif) | 
| 1 | 1 | 0 | 1 | ![[Envelope shape 1101]](http://cpctech.cpc-live.com/docs/ay38912/psg2.gif) | 
| 1 | 1 | 1 | 0 | ![[Envelope shape 1110]](http://cpctech.cpc-live.com/docs/ay38912/psg7.gif) | 
| 1 | 1 | 1 | 1 | ![[Envelope shape 1111]](http://cpctech.cpc-live.com/docs/ay38912/psg3.gif) | 
| ![[Envelope Period Note]](http://cpctech.cpc-live.com/docs/ay38912/psg15.gif) | ||||
![[Two cycles of waveform 1010]](http://cpctech.cpc-live.com/docs/ay38912/psg9.gif) 
| Storage Temperature | ...... | -55°C to +150°C | 
| Operating Temperature | ...... | 0°C to 40°C | 
| Vcc and all other input/Output Voltages with Respect to Vss | ...... | -0.3V to +8.0V | 
| Characteristics | Sym | Min | Typ** | Max | Units | Conditions | 
|---|---|---|---|---|---|---|
| DC CHARACTERISTICS | ||||||
| All inputs | ||||||
| Low level | Vil | 0 | - | 0.6 | V | |
| High level | Vih | 2.4 | - | Vcc | V | |
| All Outputs (except Analog Channel Outputs | ||||||
| Low level | Vol | 0 | - | 0.5 | V | Iol = 1.6mA, 20pF | 
| High level | Voh | 2.4 | - | Vcc | V | Ioh = 100uA, 20pF | 
| Analog Channel Outputs | Vo | 0 | - | 60 | dB | Test Curcuit: Fig 6 | 
| Power Supply Current | Icc | - | 45 | 85 | mA | |
| AC CHARACTERISTICS | ||||||
| Clock Input | Fig 7. | |||||
| Frequency | fc | 1 | - | 2 | MHz | |
| Rise Time | tr | - | - | 50 | ns | |
| Fall Time | tf | - | - | 50 | ns | |
| Duty Cycle | - | 25 | 50 | 85 | % | |
| Bus Signals (BDIR,BC2,BC1) | ||||||
| Associative Delay Time | tao | - | - | 50 | ns | |
| Reset | Fig. 8 | |||||
| Reset Pulse Width | trw | 500 | - | - | ns | |
| Reset to Bus Control Delay Time | trb | 100 | - | - | ns | |
| A9, A8, DA7--DA0 (Address Mode) | Fig 9 | |||||
| Address Setup Time | tas | 400 | - | - | ns | |
| Address Hold Time | tah | 100 | - | - | ns | |
| DA7--DA0 (Write Mode) | Fig. 10 | |||||
| Write Data Pulse Width | tdw | 500 | - | 10,000 | ns | |
| Write Data Setup Time | tds | 50 | - | - | ns | |
| Write Data Hold Time | tdh | 100 | - | - | ns | |
| DA7--DA0 (Read Mode) | Fig. 11 | |||||
| Read Data Access Time | tda | - | 250 | 500 | ns | |
| DA7--DA0 (Inactive Mode) | ||||||
| Tristate Delay Time | tts | - | 100 | 200 | ns | |
![[Analogue channel Output Test Circuit]](http://cpctech.cpc-live.com/docs/ay38912/psg11.gif) 
| Storage Temperature | ...... | -55°C to +150°C | 
| Operating Temperature | ...... | 0°C to 70°C | 
| Vcc and all other input/Output Voltages with Respect to Vss | ...... | -0.3V to +8.0V | 
| Characteristics | Min | Sym | Max | Units | Conditions | 
|---|---|---|---|---|---|
| DC CHARACTERISTICS | |||||
| All inputs | |||||
| Low level | Vil | 0 | 0.7 | V | |
| High level | Vih | 2.2 | Vcc | V | |
| All Outputs (except Analog Channel Outputs | |||||
| Low level | Vol | 0 | 0.4 | V | 1 TTL Load | 
| High level | Voh | 2.4 | Vcc | V | +100pf | 
| Analog Channel Outputs | Vo | 0 | 2000 | uA | Test Curcuit: Fig 6 | 
| Power Supply Current | Icc | - | 85 | mA | |
| AC CHARACTERISTICS | |||||
| Clock Input | Fig 7. | ||||
| Frequency | fc | 1 | 2.5 | MHz | |
| Rise Time | tr | - | 50 | ns | |
| Fall Time | tf | - | 50 | ns | |
| Duty Cycle | - | 40 | 60 | % | |
| Bus Signals (BDIR,BC2,BC1) | |||||
| Associative Delay Time | tao | - | 50 | ns | |
| Reset | Fig. 8 | ||||
| Reset Pulse Width | trw | 5 | - | us | |
| Reset to Bus Control Delay Time | trb | 100 | - | ns | |
| A9, A8, DA7--DA0 (Address Mode) | Fig 9 | ||||
| Address Setup Time | tas | 300 | - | ns | |
| Address Hold Time | tah | 50 | - | ns | |
| DA7--DA0 (Write Mode) | Fig. 10 | ||||
| Write Data Pulse Width | tdw | 1800 | - | ns | |
| Write Data Setup Time | tds | 50 | - | ns | |
| Write Data Hold Time | tdh | 100 | - | ns | |
| DA7--DA0 (Read Mode) | Fig. 11 | ||||
| Read Data Access Time | tda | - | 350 | ns | |
| DA7--DA0 (Inactive Mode) | |||||
| Tristate Delay Time | tts | - | 400 | ns | |