Re: A89: >1-bit sound on the 89


[Prev][Next][Index][Thread]

Re: A89: >1-bit sound on the 89




The only way you could increase the resolution of the sound in hardware is to
use both i/o of the linkport, and set up a two-bit resister ladder.  This would
give you two bits of control (4 levels of voltage).  Which would sound much
better than current 1 bit, but would be mono (single channel).

When you need to make sound with embedded processors, needing to stay away from
more then one i/o, and no external parts, you generally use PWM to create a
software DAC.

PWM is Pulse Width Modulation.  If you have squarewave running at 100kHz, with a
50% duty cycle (ie, it is high for the same amount of time as it is low), you
can, using a slow meter, expect to read 1/2 the voltage a fully on signal
produces.  At 5v, this would be 2.5v.  By changing the duty cycle (on time/off
time) you can expect a roughly equivilant voltage output.  90% -> 4.5v.  this
can be considered a cheap digital to analog converter when you want to create
sound.  100kHz is above the human range of hearing(not to mention the dynamic
range of most speakers) so you could feed this signal straight to a speaker,
headphone, etc, and it would be as if you were only sending the voltage level to
the speaker.

There are still minor issues:
You are sending a squarewave, which has all sorts of nasty harmonics and other
junk.  A filter network would be of good use here.
It takes a lot of processor time when you aren't using a dedicated PWM in
hardware.

-Adam

Seth Peelle wrote:
> 
> Forgive me for my lack of calc hardware knowledge... I understand that
> link port 1-bit sound is created by rapidly switching the link on and
> off (correct me if I'm wrong).  Are there any possible methods for
> making sound with greater bit-depth (i.e. 2-bit, 4-bit, 8-bit, etc.)?
> That would create some interesting potential for sound/music synthesis.
> 
> On a side note, and out of sheer curiosity, is there any reason in
> particular why a disproportionate amount of TI calc programmers are
> French?  Not trying to discriminate or anything, just simply wondering
> :)
> 
> BeaT (Seth Peelle)
> beat@drigon.com
> http://www.drigon.com/~beat



References: