Document recent measurements done on the AY8910. [Couriersud]

This commit is contained in:
Couriersud 2014-07-06 16:53:47 +00:00
parent ee2361327f
commit 2b523257ca

View File

@ -1,3 +1,126 @@
/*
* Couriersud, July 2014:
*
* This documents recent work on the AY8910. A YM2149 is now on it's way from
* Hong Kong as well.
*
* TODO:
*
* - Create a true sound device nAY8910 driver.
* - implement approach outlined below in this driver.
*
* For years I had a AY8910 in my drawer. Arduinos were around as well.
* Using the approach documented in this blog post
* http://www.986-studio.com/2014/05/18/another-ay-entry/#more-476
* I measured the output voltages using a Extech 520.
*
* Measurement Setup
*
* Laptop <--> Arduino <---> AY8910
*
* AY8910 Registers:
* 0x07: 3f
* 0x08: RV
* 0x09: RV
* 0x0A: RV
*
* Output was measured on Analog Output B with a resistor RD to
* ground.
*
* Measurement results:
*
* RD 983 9.830k 99.5k 1.001M open
*
* RV B B B B B
* 0 0.0000 0.0000 0.0001 0.0011 0.0616
* 1 0.0106 0.0998 0.6680 1.8150 2.7260
* 2 0.0150 0.1377 0.8320 1.9890 2.8120
* 3 0.0222 0.1960 1.0260 2.1740 2.9000
* 4 0.0320 0.2708 1.2320 2.3360 2.9760
* 5 0.0466 0.3719 1.4530 2.4880 3.0440
* 6 0.0665 0.4938 1.6680 2.6280 3.1130
* 7 0.1039 0.6910 1.9500 2.7900 3.1860
* 8 0.1237 0.7790 2.0500 2.8590 3.2340
* 9 0.1986 1.0660 2.3320 3.0090 3.3090
* 10 0.2803 1.3010 2.5050 3.0850 3.3380
* 11 0.3548 1.4740 2.6170 3.1340 3.3590
* 12 0.4702 1.6870 2.7340 3.1800 3.3730
* 13 0.6030 1.8870 2.8410 3.2300 3.4050
* 14 0.7530 2.0740 2.9280 3.2580 3.4170
* 15 0.9250 2.2510 3.0040 3.2940 3.4380
*
* Using an equivalent model approach with two resistors
*
* 5V
* |
* Z
* Z Resistor Value for RV
* Z
* |
* +---> Output signal
* |
* Z
* Z External RD
* Z
* |
* GND
*
* will NOT work out of the box since RV = RV(RD).
*
* The following approach will be used going forward based on die pictures
* of the AY8910 done by Dr Stack van Hay:
*
*
*
* 5V
* _| D
* G | NMOS
* Vg ---||
* |_ S Vs
* |
* Z
* Z Resistor Value for RV
* Z
* |
* +---> VO Output signal
* |
* Z
* Z External RD
* Z
* |
* GND
*
* Whilst conducting, the FET operates in saturation mode:
*
* Id = Kn * (Vgs - Vtn)^2
*
* Using Id = Vs / (RV + RD)
*
* Vs = Kn * (RV + RD) * (Vg - Vs - Vtn)^2
*
* finally using Vg' = Vg - Vtn
*
* Vs = Vg' + 1 / (2 * Kn * (RV + RD)) - sqrt((Vg' + 1 / (2 * Kn * (RV + RD)))^2 - Vg'^2)
*
* and thus
*
* VO = Vs * RD / (RV + RD)
*
* and this can be used to re-Thenevin to 5V
*
* RVequiv = RD * ( 5V / VO - 1)
*
* The RV and Kn parameter are derived using least squares to match
* calculation results with measurements.
*
*
* FIXME:
* There is voltage of 60 mV measured with the EX520 (Ri ~ 10M). This may
* be induced by cutoff currents from the 15 FETs.
*
*/
/***************************************************************************
ay8910.c