Help with shortest path cogs and pins wiring
average joe
Posts: 795
I was reading in a post awhile ago about the connections between cogs and pins. There was some mention of the wiring but I can't seem to find it. I have done a few tests and determined my setup has an unsuitable noise floor using cog0 and pins 24 and 27 as output. I WILL be revising this but I do not have time before the expo. So, what I'm basically asking is this, which cog has the shortest wires to pins 24 and 27 so I can run Stereo Spatializer in this cog for now. Hopefully this will provide some improvement while working on the new hardware. Thanks again.
Joe
Joe
Comments
Great work as always and thanks again kuroneko!
Anyway, a plea from someone who has to explain this stuff to beginners: if you're not going with a "standardized" pin layout for audio out (consider PropBOE and Demo board the main reference designs), consider documenting the pin change requirements for the major sound-generating objects. Authors of these objects should be encouraged to not hard code the pin assignments throughout the program, but if that's not possible, then to fully comment those areas that need to be changed.
No, I don't ask for much...
-- Gordon
I have not tried Ray's code yet since I've been working on other things. The only layout I've encountered that REALLY doesn't work is pin24 and cog7. I will be trying some experiments soon and will try out Ray's code. I wonder what the pop is, and what we could do to NIX it?
It would be good to get a consensus which cog is best for pins 26 and 27 since that is the new "primary reference"
I agree that documentation is very important and hard-coding should be avoided at all costs!
The pop occurs when the cog is created, before any bytes are fetched from the SD card. It sounds a lot like the same kind of pop you get when you plug in a patch cord to an amp, which suggests an impedance issue. The (excellent, BTW) headphone amp circuit is hardwired in the PropBOE, so there's no changing it (if that's even needed). You can always directly attach a new circuit to the DAC pins for 26 and 27 should that be necessary, but as the headphone amp is still in-circuit, its input impedance needs to be factored in.
JonnyMac's wavdacs demo pops, too, though not as loudly. But curiously, it's very noisy on *my* PropBOE -- you can hear it because the demo pauses at the start to ask if you want to play the clip. The might be due do its selection of cogs. I haven't yet looked closely at the program to follow what it does. My understanding is that its noise floor is supposed to be very low.
All of the other WAV object examples pop, too. This includes Kwabena's and David Sloan's, though David's is not as objectionable (sadly, his object apparently misreads the higher bitrates and plays 44.1 kHz and 48 kHz files too slowly). Kwabena's also exhibits noise in the form of background hiss, the same as Jon's.
I haven't yet played with WAV sound on other Propeller platforms, but it would be interesting to know if this is a general PropBOE issue, an issue just with the pre-release version I have, or is endemic to the way the objects work.
-- Gordon
In the case of Ray's stuff he's assuming a more experienced user, which is what these examples are for. But I think it's also a good idea to avoid hard-coding any pins, whenever possible, especially if the hard-coding is in the object itself, and not the demo program.
Now, one could rightfully ask, why did they change the pins for the PropBOE? The pin assignments on the Demo board seem perfectly fine. The thing about the BOEs is that, by design, the first 16 pins are available for use to the breadboard. That means the special function pins need to be pin 16 and higher. So it all makes perfect sense, though it can cause consternation to people just discovering the Propeller, and using the PropBOE for trying out objects written for previous boards.
I'm hoping there can be a selection of PropBOE-specific objects -- like a top 50 or something -- available on the learn.parallax.com site (or other location). I think that would reduce the frustration level for the newcomers.
-- Gordon
Before the sound object are started, the sound pins are floating and has got a "random voltage level" if nothing is connected.
If something is connected (RC filter + amplifier), the voltage level will be whatever the "high impedance amplifier input" + capacitator + "air voltage" settles to.
As soon as the objects starts it will force the voltage level to about 3.3V / 2 = 1.65V (DC offset) from whatever it was before in "about no time at all" and this will generate an irritating "all frequencies at once" pop.
/Johannes
-- Gordon
repeat 1000
..output high 'brief high pulse
..output low 'brief low pulse
..input (high impedance)
..decreasing delay ' perhaps an exponentially decreasing delay
start audio cog
@Ahle2, The Parallax guys were kind enough to provide me with some space INDOORS!! to give a few "side" demos of SidSynth, as well as a a bit of the screen work. There seemed to be some interest, although proper presentation materials would have helped. I was not quite as prepared as I would have liked. I had postulated the "floating pin" problem, but it's nice to have verification on that. I will try the workaround shortly.
My other thought, would a "bleed" resistor help? Say 1M across gnd and audio out?
@kuroneko and Tubular
Great minds thinks alike!
@average joe
That was my other solution. A high resistance resistor between audio pin and gnd.
Then gradually increase the duty voltage to the desired DC offset before starting synthesis or sample playback.
/Johannes