Sending Serial Data via Audio - Dumb Idea??
Sending Serial Data via Audio - Dumb Idea??
- Subject: Sending Serial Data via Audio - Dumb Idea??
- From: Peter <email@hidden>
- Date: Sat, 18 Jun 2005 12:28:05 +1000
Hi,
I need to send a continuous stream of a specialized form of serial data
( a DCC signal for model railways ) to some external electronics. For
various reasons using a serial port is more or less out of the
question, so I got to thinking about using audio and detecting the
signal through say the headphone jack. I know this sounds dumb (and may
not even be possible), but I remember reading about this method years
ago as an alternative to using a serial port, so I thought I would ask
here if it would be do-able.
The DCC standard (which I wont go into here though the basics are
covered at http://www.dcctrains.com/tonystips/dccprimer/index.htm)
basically places modified AC onto the track which is then detected by a
decoder in each loco. In DCC a 1 is represented by 01 and an 0 is
represented by 0011 (ie each 'bit' is twice as long) where each 'bit'
should be close to 55 microseconds long. In essence a continuous stream
of '1's would be a ~18KHz square wave (01010101010...) while a stream
of '0's would be square wave at half that frequency (001100110011...).
A real data stream would of course be a combination of the two - thus
no danger of the resulting waveform being outside audio frequencies( I
think!).
This is why I was thinking an audio solution may be practical. The
signal would appear to within audio specs and OS X was designed to give
audio a high priority - it is important that the data be sent
continuously as when a new command packet isnt being sent idle packets
have to be sent to maintain current on the track.
So my questions are these:
Is there something here that makes the whole idea impractical or
impossible?
If it isnt so dumb, I would be basically generating my own waveform
from input data so any suggestions where the best place to start would
be?
thanks for any advice,
Peter
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden