From: sc5h+@andrew.cmu.edu (Shawn James Cokus)
Newsgroups: rec.radio.shortwave
Subject: Re: SoundBlaster as TNC ?
Date: 1 Sep 92 14:02:35 GMT
	<1992Aug31.210455.24024@e3u001.ped.pto.ford.com>
Organization: Sophomore, Math/Computer Science, Carnegie Mellon, Pittsburgh, PA


I had sort-of the same idea for the Macintosh-- the newer models all
have built-in sound input capabilities like the SoundBlaster card
(22kHz, etc...), and I decided I'd try my hand at decoding some of the
digital modes with it.

RECEPTION---------------------------------------

    IT IS VERY DIFFICULT!    ;-)

The problem is a 22kHz sampling rate is way too low and 8-bit of audio
information per sample is too much information in the wrong place.  What
is really needed is a zero-crossing detector that operates much faster;
what I ended up doing is using my old Color Computer 3's cassette port,
which has a built-in zero-crossing detector.  I tied the output of the
detector to an (essentially) unused interrupt line inside it and with
some tricky code was able to get an equivalent 0.89MHz sampling rate
zero-crossing detector.  Currently, the samples are saved in memory and
later uploaded to the Macintosh for signal processing and decoding; I
hope to figure out how to externally clock the serial pak for the CoCo
to get a high enough baud rate to real-time send the information to the
Mac, but I haven't been able to do that yet.

I've experimented the most so far with slow-scan TV (the only format I
have specs. for is the 8 sec/frame grayscale 120-lines format; if anyone
knows the timings and frequencies used for other formats I would
appreciate it!).  Reception is pretty good-- although there is quite a
bit of processing that has to be done on the Mac side to get a good
picture.  A big problem is proper detection of the end of the horizontal
sync. pulse, otherwise the picture's vertical lines get wavy.  I
currently am using a few formulas that try to determine the phase of the
sync. pulse relative to the video information using the information that
sync. pulses are on different frequencies than the video and that as the
signal goes from sync. to video there is a short time that one gets
frequencies outside video but below sync.

I have been looking at packet (I know nothing about it except for what
I've been able to ascertain by looking at FFT's and sampled recordings
of it) at it seems tough.  I haven't been able to get clean data in from
the zero-crossing detector from it, and right now that's probably
because I have absolutely no filtering in-between the radio and the
CoCo.  (Slow-scan seems to be more immune; no filtering isn't so much of
a problem, but of course, the loss of a picture element is far less
damaging than the loss of a bit, byte, or worse on packet.)

RTTY is quite possible and I just haven't had the time yet to play with
it.  RTTY IS THE ONLY MODE I BELIEVE YOU CAN RELIABLY DO FROM 22-KHZ
8-BIT SAMPLES.  That's because you've got lots and lots of samples per
RTTY bit because RTTY is usually sets very slowly.

Whoops-- I almost forgot at CW!  <gasp! ;->  CW IS THE EASIEST TO DO
FROM 22-KHZ 8-BIT SAMPLES.  How robust a program is at receiving it is
basically a function of how creative you are and how much effort you
want to spent programming an intelligent decoder.  I don't have much
experience here yet, although I'll probably work on CW after SSTV but
before RTTY.  Again, just no time yet...

Along the lines of something that isn't really a digital mode but is
very useful is that after I got back to school here I decided I finally
wanted the Mac to talk to my radio.  (I have a Kenwood TR-2600A 2-meter
HT and an Icom IC-211 all-mode 2-meter base; both are older radios.) 
Fairly easy: radio phone jack -> Mac audio in, Mac audio out -> simple
attenuator -> radio mic. in, control line on unused Mac serial port ->
transistor -> push-to-talk switch.  (I've had these dreams of owning a
repeater, you see.  You know, I want to hear "Welcome to the K-B-2-G-O-H
repeater..." in one of those synthesized monotones... ;-)  So it was
natural to consider TouchTones (tm).  Currently, I'm using 8 DFT filters
with pre-computed coefficients for the 8 tone frequencies and then a
noise/voice reject scheme to determine if a TouchTone (tm) is present. 
It works REALLY WELL!  (I was surprised... I don't really have a clue
what I'm doing in signal processing, or electronics for that matter --
I'm a software person -- so I'm always surprised when something I write
for communications works! ;-)  So if you want to call this a third mode,
TOUCHTONES (tm) CAN ALSO BE DONE FROM 22-KHZ (EVEN 11-KHZ) 8-BIT
SAMPLES.  

Quick summary:
    o Using 22 kHz 8-bit samples is hard for digital communications reception.
    o SSTV reception -- probably requires zero-crossing detector at high rate.
    o Packet reception -- probably requires filtering & zero-crossing detector.
    o RTTY -- probably possible from 22 kHz 8-bit, easier from zero-crossing.
    o CW -- possible from 22 kHz 8-bit, easy -> hard, depending on robustness.
    o TouchTones(tm) -- possible & easy from 22/11 kHz 8-bit samples.

If anyone is interested in a mode not listed above, please send me the
specs. on it and I'll see what I can do.


TRANSMISSION------------------------------------

    ...is a completely different matter!

It is possible -- even easy -- to use hardware like the SoundBlaster and
the built-in audio on the Macintosh to produces the tones for
TRANSMISSION of these modes.  Indeed, the SSTV signals for testing and
transmission I generate from the Macintosh.  I've also tried RTTY
transmission, which seems to work, and CW is, of course, very easy to
transmit.  So are TouchTones (tm) because you can just loop a small
pre-computed (may not even be necessary to pre-compute) snipped of the
two proper sine waves mixed.  The only difficulty may be packet and
until I know more about it I'll say that it is probably easy to transmit
packet, but definately harder than any of the other modes listed here
for transmission.

Quick summary:
    o Using 22 kHz 8-bit samples is great for digital comm. transmission.
    o SSTV transmission -- easy, CPU used depends on hardware (On Mac,
low CPU).
    o RTTY transmission -- easier than SSTV, CPU used depends on
hardware again.
    o CW   transmission -- easier than RTTY (but not by much), low CPU used.
    o TouchTone (tm) transmission -- ease hardware dependent, but not
difficult.
    o Packet transmission -- unknown, probably hardest of above.


Hope that helps!  Any experiences with digital communications,
frequencies (esp. 2-meters since that's all I have), specifications for
digital modes, neet ideas, and ways to get free pizza desired!  ;-)

--Shawn, KB2GOH.
--sc5h+@andrew.cmu.edu.

p.s. Now if only someone could tell me what format the "Daily Solar
Geophysical Data" is in...

-- Shawn Cokus
--   sc5h+@andrew.cmu.edu
--   Carnegie-Mellon University, Pittsburgh, PA
--   (Witty phrase temporarily out of order.)
Newsgroups: rec.radio.shortwave