diff --git a/AY8930_rig.jpg b/AY8930_rig.jpg new file mode 100644 index 0000000..cb86a21 Binary files /dev/null and b/AY8930_rig.jpg differ diff --git a/README.md b/README.md index 5ddf9ed..0876c61 100644 --- a/README.md +++ b/README.md @@ -8,5 +8,34 @@ noise generator and duty cycle control, amongst other things. This Arduino sketch tests an AY8930 chip by setting up some initial configuration and generating sounds. The Arduino's ADC (analog-to-digital converter) is used, along with a pot, to control the sound generator. +## Test Plan +We want to verify both that the chip works and that it has the +enhanced functionality (i.e. that it really is an AY8930). +So the Arduino sketch switches the chip into enhanced mode by setting the +upper four bits of the ENVELOPE register (R13) to 1010 or 1011. +The function 'aywrite()' that accesses the chip must keep track of +which bank is selected and change banks if required to allow us to set +up registers beyond the 16 of the AY-3-8910. +'aywrite()' takes register numbers from 0 to 31, with 0-15 being in +Bank A and 16-31 being in Bank B. + +Once we can use the enhanced features of the AY8930, we set it up +in such a way that listening to the output will demonstrate that it +has more than one envelope generator. +Channel A is set up to produce a tone, and Channel B produces noise. +Both channels are fed through envelope generators set to produce a +triangle-wave envelope (rampling up and down alternately). +Channel A tone frequency and envelope period are controllable via +pots connected to the Arduino analog inputs 0 and 1. +Channel B envelope period and noise parameters are fixed. + +When the sketch runs, we should hear a pulsating tone and a pulsating +noise. +Only the tone should be controllable by the pots; the noise should +be unaffected. + ## AY8930 Chip ![AY8930 chip](AY8930.jpg "AY8930 chip") + +## AY8930 on Breadboard +![AY8930 rig](AY8930_rig.jpg "AY8930 rig")