[time-nuts] RS 232

Chris Albertson albertson.chris at gmail.com
Sat Jul 27 01:46:51 UTC 2013


On Fri, Jul 26, 2013 at 12:50 PM, Didier Juges <shalimr9 at gmail.com> wrote:

>
> It is trivial to do on a microcontroller running at 1MHz but surprisingly
> harder to do on a 2GHz Windows machine.
>
> It is not just a matter of time stamping the key closure, you have to get
> the sound system starting and stopping.


The problem is the Windows sound system is designed for  media playback.
 WIth Windows you can use ASIO drivers.  These are used by every musician
and anyone who does recording.  MS Windows as it comes out of the box is
just not suited to serious audio work.   The other OSes alradi have
something like this and a few ms of latency is very easy.
http://en.wikipedia.org/wiki/Audio_Stream_Input/Output

Although you can get it, you really don't need latency below about 20ms.
 You can't notice it.   Sound moves at about 1 foot per 1ms.  So try this,
have someone tape a table top with their fingernails 20 feet away and see
if you can detct the speed of sound delay.   Or have him speak and see if
you see the lips out of sync with the sound.   For most people the distance
needs to about over 50 feet to detect any of this.

The more code example is not right because people learn to send by muscle
memory.  I bet they can send with not feedback at all.

Using standard PC hardware and the standard Linux kernal the latency from
on the control lines is WAY below the millisecond level, it's a handfull of
microseconds.   The pins goes directly to an interrupt handler and it is
very. fast.   Looks atr the douce code there is not a dozen lines of code
to handle it.

-- 

Chris Albertson
Redondo Beach, California



More information about the Time-nuts_lists.febo.com mailing list