
                        MODEM EMULATION

The text below is based on two articles which I published in OSCAR
News August & October 1995.  A copy of the diagram is available,
please e-mail me for details.

Although the program EM1200M2 is usually called EMBAYCOM, it really
has nothing to do with BAYCOM.  It is a stand alone MODEM EMULATOR
program.   It can be used with various programs, including BAYCOM.

                 ......................

Some time ago there were rumours that it  was  possible  to  use  the
BAYCOM  program with the very simple HAMCOM interface, which consists
of a 741 op-amp, and a few diodes.  I have now managed  to  obtain  a
copy  of  some new software which was written by Nick Fedoseev RT4UZ,
with modifications by George Yastrebov UT5UDE. The software  consists
of  a  small  program  EM1200M2.COM and a batch file EMBAY.BAT.  When
EM1200M2.COM runs, it sets up serial  port  2  to  emulate  a  BAYCOM
modem.   The program then executes EMBAY.BAT, which starts the normal
BAYCOM program running on serial port 1. There are  some  connections
between the two ports, and to the simple interface.

The connections to the emulated modem on port 2 are -

        DSR     Received Audio (after squaring)
        DTR     Demodulated data OUT
        DCD     DATA IN
        TXD     Audio OUT (square wave)
        RI      Direction (+ SEND, - RECEIVE)

If RI is  disconnected  or  connected  to  a  negative  voltage,  the
emulated  modem  is in the receive mode, ie.  DSR and DTR are active.
For reception the clipped/squared audio signal is  fed  into  DSR  on
port  2.  DTR is the demodulated output, which is connected to CTS on
port 1.


DCD and TXD on port 2 are only used for transmitting and  are  active
when  RI  is connected to a positive voltage.  The circuit diagram of
the HAMCOM  interface,  and  its  connection  to  the  two  ports  is
contained in the documentation supplied with the software.

One interesting possibility is to use the emulated modem for decoding
OSCAR-11.   I  have  had some success with this, and will describe it
next time.

        MORE ON EMBAYCOM

In  the last OSCAR News I outlined the features of the small but very
effective program called EM1200M2.COM.  Unfortunately there are  many
things  which  can  go  wrong  with the set up, which prevent it from
working, and when things go  wrong,  usually  nothing  happens!   The
following hints and tips may be useful.

Firstly carefully check the connections. These are rather complicated
since  TWO  serial  ports  are used. The drawing shows how the simple
HAMCOM interface is connected to both PORT 1 and PORT 2.  The code in
EM1200M2.COM uses PORT  2  as  the  emulated  modem,  and  cannot  be
changed.   I  recommend  that  you  initially  use PORT 1 for BAYCOM,
although it may be possible to use ports 3 or 4.

The software requires 'COMMAND.COM' to be in your root directory.  If
you  use some other DOS shell, such as 4DOS, COMMAND.COM must also be
present, otherwise the program  reports  an  error,  and  terminates.
Check  that  the  BAYCOM configuration file is set up for port 1, and
1200 baud.

With the software RUNNING,  check  the  power  supplies  to  the  741
op-amp.   The voltage on pin 7 should be positive, the voltage on pin
4 should be negative.  The two levels should be seven or more  volts,
but  they  do  not  have  to  be  equal.  The interface will not work
without these voltages being present!

Feed audio signals into the HAMCOM interface, and check  that  larger
squared up signals appear at the output of the interface. Demodulated

signals  should  also appear at the output of the emulated modem, ie.
DTR on port 2.  These tests are best done with an  oscilloscope,  and
audio  signal generator, but an indication can be obtained using high
impedence headphones, and audio signals  from  a  receiver,  or  tape
recorder.  With an audio signal generator you should be able to check
that  at  1200  Hz,  DTR  on  port  2  is POSITIVE, and at 2200 Hz is
NEGATIVE. There should be a  change-over  point  somewhere  near  the
middle of these two frequencies.

If  you  feed  packet  signals  into  the  interface, these should be
displayed on the screen. A convenient source of packet signals is the
terrestrial packet mail boxes on 144.650, 432.650,  or  433.650  MHz.
NBFM.   Alternatively  signals  from  DOVE  can be tape recorded, for
convenience.


        EXTENDING EM1200M2 TO OSCAR-11

When program EM1200M2.COM runs, it sets up  port  2  as  an  emulated
modem,  and  then executes the batch file EMBAY.BAT, which causes the
main BAYCOM software to be executed.  The contents of EMBAY.BAT are -

        @echo off
        l2
        scc
        off

Note  that  'off'  is  a  small routine (off.com) which turns off the
Baycom interrupt program l2. This file may be changed, to call  other
software  instead  of  BAYCOM,  such  as  a  communications  program,
terminal emulator, or capture  program.   In  the  previous  articles
about  low  cost  decoding  we found that the polarity of the modem's
data  output  was  the  same  for  BAYCOM  use   and   for   OSCAR-11
storage/display.   It therefore follows that the polarity of the data
from the emulated modem will be correct for OSCAR-11.

To demodulate OSCAR-11, simply replace the contents of  EMBAY.BAT  by
the  name of your favourite terminal program, such as PROCOMM PLUS or
TELIX. You can even include programs written in BASIC.  In this  case
you would change the file to QBASIC /RUN TERMPROG, where TERMPROG.BAS
is  the  name of a terminal program written in QBASIC.  Note that the
batch file MUST use the name EMBAY.BAT,  as  this  is  fixed  in  the
program EM1200M2.COM.

There  are  some  problems  which  can  occur  when  using a standard
communication program for displaying, and  capturing  OSCAR-11  data.
For  receiving  binary  data  it  is  necessary to set the program to
receive 8 data bits, no parity.  Unfortunately this raw data can play
havoc with the screen display, due to non text characters and lack of
carriage returns and/or line feeds. When  receiving  ASCII  text  and
data,  the 8th bit is always set, and there is a continuous stream of
bytes (80 hex), even when no text characters are being sent. This  is
the  steady  background  buzz,  which can be heard on OSCAR-11, it is
particularly  noticeable  during  the  transmission  of  the   status
messages,  and  during gaps in the WOD.  Therefore it is necessary to
set the program to receive 7 bits.  This  usually  cures  the  screen

display  problem,  but if the data is captured on disk, the file gets
filled up with a lot of nulls (ie. 80 hex cut down to 7 bits).  These
nulls may also cause problems if the file is subsequently edited.

Standard communication programs may be configured to overcome some or
all of these problems.   Another  solution  is  to  use  a  dedicated
OSCAR-11 capture program.  The following features are desirable -

          Display valid text characters only
          Automatic wrap-round on display
          Select ASCII display, or HEX codes
          Capture binary or ASCII data
          Toggle capture

I  have  been  using such a program (called UOSAT) on my BBC computer
for many years, and have now developed a PC version, called CTERM.


        WARNING
There is always a possibility of damaging your computer by connecting
equipment  to  its  interfaces.   Neither AMSAT-UK nor the author can
accept responsibility for any damage to your equipment.


Clive Wallis, G3CWV @ GB7ZPU

              g3cwv@amsat.org
                                                 27th October 1996
