Could this be a voltage issue?
According to the datasheet, IC# has to be set with 3.5V minimum - I guess that you connected it directly to a 3.3V based J28 output?
No level shifter is required for the remaining pins (VIH=2.2V)
Best Regards, Thorsten.
Nope–I saw that one in advance.
I have #IC connected to J19:RC2, which goes through the buffer on the LPC17 board, and that pin measures at 4.95 volts during operation. Besides, if it was stuck in reset, it wouldn’t be making any noise at all, I would think.
But thanks for taking the time to think of that!
I’m not exactly sure what I fixed, but I am now getting sound out of the OPL3. There’s still a weird bug that the values for some–but not all–registers of the OPL3 have to be sent bit-flipped, or rather, that it interprets the data to be the opposite values for each pin as what I send, but only for certain registers (e.g. ADSR and volume, but my tuning system works fine). But I can work around that in software.
However, I cannot get a sine wave out of the OPL3. I know I am only triggering one channel at a time (because I can trigger twelve or more of them independently); I know it’s not that I have the waveshape set wrong, since setting it to other values gives me something that sounds even less like a sine wave; and it’s not being FM modulated by the other operator because the other operator’s volume and envelope are silent and it’s set to the non-FM mode. So I don’t think it’s a software problem, which led me to the hardware.
Since for my synth I don’t have a +/- 12V power supply and I didn’t want to add one just for the OPL3, I changed the design for the board: the first two op-amp packages I replaced with rail-to-rail op-amps like in the sammichFM and gave them 0/5V, and then kept the last one as a TL074 and gave it +/-5V. (This by itself is not the problem; the chips are getting the right voltages and there are no shorts). In between the buffer immediately after the YAC512 and the second (final) one, I added an electrolytic capacitor in series and then a resistor to ground, to take the waveform from being centered at 2.5V to 0V. I’m pretty sure all this is working fine, since the sound does not get more distorted as the volume is turned up inside the OPL3.
I started thinking that maybe the op-amps I used, TLV2244, actually weren’t quite rail-to-rail and therefore were clipping the signals in the DAC portion (sample-and-hold or whatever it is) of the YAC circuits (not the audio out portion). I didn’t use the OPA4348 from the sammichFM because they are only available as SMD. But the datasheet for the TLV2244 shows that it is legitimately rail-to-rail; the only significant difference between the datasheets is the bandwidth. The OPA4348 is 1MHz and the TLV2244 is 5KHz. Could this be the problem?
Wow - I had to double check that GBW figure. Let’s just say that the TLV2244 needs to be replaced. It’s been optimised for low power (TI talks about micropower application). The low Gain Bandwidth Product and the low slew rate means that this op amp will only work on signals up to 5.5kHz at 1.0 gain. Double the gain and you halve the maximum frequency.
OK, so what will happen with signals with sharper edges (i.e higher frequencies)? If you’re lucky they will become distorted (low pass filtered). The amount of ringing in the signals will vary, but you should consider testing an op-amp with better (ok different) specs - higher bandwidth. It will draw more power, but that shouldn’t be a problem here.
Okay, so they really mean that it won’t work on signals above 5KHz! What’s the use of an op-amp that can’t even work on audio-frequency signals (let alone data)?! But sure, I’ll buy new ones. It does sound kinda cool, though–sort of like twelve 6581 SIDs with their filters and feedback going. Maybe I’ll put up a video with these while I wait for new ones to arrive.
Congratulations on your new special effects machine!