# set BC1/BDIR to Write Data
# and back to Inactive.
You must use 3 OUTs to send a value to an AY register, even if you don't change registers in the meantime. [https://www.cpcwiki.eu/forum/programming/interesting-walkthrough-video-coding-a-pet-to-play-samples-at-60khz/msg250874/#msg250874 Source]
So you have to enter the data on F4. Then on F6, select the type of data (bdir/bc1>>#10) and validate everything (bdir/bc1>>00). Otherwise, the data in other AY registers becomes corrupted quite quickly.
Consult this article for more information: [[How to access the PSG via PPI]]
You can test the PSG sound channels by typing simple SOUND commands in BASIC. You should hear a 440Hz sound for 10 seconds at full volume for each of these commands:
SOUND 1,440142,1000,15 should produce sound in the left speaker. (channel A) SOUND 2,440142,1000,15 should produce sound in both speakers. (channel B) SOUND 4,440142,1000,15 should produce sound in the right speaker. (channel C)
<br>
=== Other Variants ===
Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /mnt/cpcwiki-httpdocs/includes/diff/DairikiDiff.php on line 434
The PSG chip family is composed of 3 variants: * the AY-3-8910 , with two 8-bit I/O ports, and a 40-pin package* the AY-3-8912 , with one 8-bit I/O port and a 28-pin package* the AY-3-8913 , with no I/O port. and a 24-pin packageIn addition to the CPC, these chips were also used in the [[KC Compact]], [[ZX Spectrum]], [[MSX]], [[Oric-1/Atmos|Oric]], [[EG2000 Colour Genie]], [[Vectrex]], [[Intellivision]] and in the Mockingboard expansion for the [[Apple II]].
There are also PSG clones: Toshiba T7766A, Winbond WF19054, JFC 95101 and File KC89C72. [https://wiki.agiri.ninja/sound_chip_clones:index Source]