Hardware - XTR Modem: description and programming.

Breeze #09
And now, dear readers,
li - again excerpt from
ZX-NEWS. It's time to talk
topic              


         M O D E M

(c) Alexey Mikhailov

  This is perhaps the most interesting
fresh news for the Polish
network inviters - coming out
a new modem, a modem that
in my opinion it will become wet
demo of the future in SpbZxNet, and
perhaps in all the rest
country, especially in those re-
gions, where modem communication 
on ZX only raises his head
wow, or haven’t started yet
began its existence.

  As a Coordinator, as a Si-
sOpa, how simple sincleris-
she can't leave me 
indifferent to the fact that
thanks to the development of the network
continues to develop and
Spectrum, and XTR-modem - that
live confirmation. Development
hardware bots
baking, as well as pro-
a lot, always depended on
consumers, and now they
see that the network is growing, that
good old Vikomm
no longer satisfied for any reason
kills people.

  Many people cannot call
day stations because
at work, and in the evening, at the most
convenient time, sometimes it happens 
just can’t get through - some-
which sysops are already forced
stop registering new
users due to the large
number of points and users,
which sometimes suit 
a real PILE UP.   Well
I want to sleep at night... Yes, and
maximum speed of vicom-
mki - 2400 baud: this is not true
too much, at least
I would like more.

  And now the time has come to saysay NO to the primitive   
transformer, which  
costs just a huge amount -
due to the fact that it
produces in the city only 
one person - Sergey Usov,
being in some degree
penalties for the monopolist. It would be nice
pay that kind of money for
normal modem, but not for 
Vikomm after all!

  In a nutshell, that
maybe a new modem.

  First, raise/lower
hang up without the bells and whistles
sa", secondly, to determine
caller number, dial-
automatically by
any number (several
numbers), which provides
unique opportunities for
bbs software and for simple
points: turned on in the evening 
computer, went to bed, modem itself
got through to bbs, lost 
mail and files, sent yours
mail, and you in the morning (or
after work) calm and
sit without any hassle
you read the mail - it’s wrong -
yeah, just great? Not-
bad speed - 3200 both -
They are forgiving even on bad lines,
and for good ones - much higher,
ease of connection - 
plugged into the system connector, 
and that's it! Cost of a new modem 
will not be more expensive than Vicomm. 
So I think it's too early  
or is it too late the whole network is all 
will equally switch to XTR-mo-
dem's, in fact, it's a matter 
only in software...

Well, now - a word from the authors.

 ──────────────────────────

(c)  X-TRADE GROUP

         XTR-modem

  Now the time has come -
make the world SPECCY - XTR
lan, debugged and put into operation 
production. Announcement in ZF#5
was intended to provide information about ourthe benefits of this product for 
market. 
  Satisfying universal in-
Teres, I’ll tell you briefly about 
modem concept.

      ----- IRON -----

  Initially we planned
improve VICOMM and 
make it as de-
sewn Alas, half measures are no good 
what was not given, original
the inferiority of VICOMMa is not allowed
lila to realize all the plans -
ki, namely: opportunity  
automatic (without button)
line occupation, control 
call and line busy. 
All this gives unprecedented 
earlier possibilities, like: 
pulse and tone
dialing, possibility 
auto dialer, definition of no-
measure gained from parallel
telephone, auto-
technical number identification
calling subscriber (Caller ID), and
in modem mode improved 
service and increased quality
reception/transmission.

  It’s not for nothing that I focus on
side function of the modem - 
Caller ID, because I think caller ID is useless
like a useful and necessary function
function in the modem.

  Therefore, software compatibility
The relationship with VICOMMom was satisfying
healed, but not completely.

  When communicating online, the process
looks like this:
you turn on the car,
launch the program, turn it off
turn off the monitor  
telephones so as not to ring,
and go to bed. And in the morning,
over a cup of tea and a plate 
semolina porridge, you are scrolling to
escaped messages.

  The modem has become internal  
(this makes the design cheaper)
-it sticks into the SCORPI slot-
ON/KAY and its connection is not 
accompanied by warming upsoldering iron Connection to 
other SPECTRUM-compatible
the machines will be accompanied by
soldering iron and use
its implementation according to the instructions
tions.

  The modem has a galvanic
what kind of junction with the line (pro-
beating voltage 1.5 Kv). 
The decoupling was made through
vom optocouplers, not transformers
matora, as in VICOMMe, that 
again reduces the cost of const.
ruction and reduces its dimensions
you.

  All standards are met 
to the terminal device
phone network (maximum
leakage 250 µA, maximum
voltage - 220 V, max.
low current - 100 mA).

  When the computer is turned off,
when the modem is not in use,
and also by pressing RESET,
the modem disconnects from the line
and has no effect on her
whom influence.

  Signal part of the modem 
has a frequency band of
transmission over 20 kHz, at
reception - more than 10 kHz, which
more than enough for
exchange to 3200 baud (if
line and station will allow). 
Maximum tested
speed - 3900 baud, result
tats are encouraging.

  An important detail: real
hardware support is available
ka exchange with a modem in the face
gating the process
often chosen quartz
that by means of a signal  
WAIT. The idea is this program
written to the clock frequency
that CPU SPECCY is not lower, 
let's say 3.2 MHz, and all machines
we are supplied with greater frequency
are slowed down to the required level. K
unfortunately, there is a limitation -
no more than 7.0 MHz (typical 
TURBO mode).

  It's very convenient -quality
in connection does not depend on time
change the car and don’t need to use it
call the TURBO button, that's it
and it works like this, including CON-
NECT SCORPION-PENTAGON.

  Line transmission possible
analog signal with quantum
moving through 16 levels of construction
by means of PWM modulation with 
sampling frequency up to 23
KHz (voice capabilities
AON RUS-16 and higher, as well as
DIGITAL STUDIO).

  Structurally the device 
is a printed 
board size 75*70 mm and 
contains a connector in the form of a layer
that SCORPION/KAY and connector 
telephone line. Consumption
current from the power source
SPECCY is about 100 mA.
+12 V is not required.

       ----- SOFT -----

  While the modem is in production,
we adapt existing ones 
terminal programs and 
We also write new ones. Already pe-
redone MODEM 3.6 and wrote
sana program Caller ID.

  Converted MODEM 3.6 mo-
can be used for 
XTR-VICOMM communications.

  This project is supported
OMEGA GROUP and program  
Macro-Modem will be adapted
van under XTR.

  We are confident that XTR is fully
will completely displace all VICOMMs
and will become a standard on boards
form ZX-SPECTRUM.

   ----- WISHES -----

  We know that for today,
except St. Petersburg and Moscow, nowhere
There are no modems in sight. A
Therefore, we suggest - try it -
this product is also in your re-
Gione, you won't regret it.

----- PROGRAMMING -----

  For curious users
we inform the necessary 
minimum information. Communication 
with modemhappens through 
the only port with an address
#B7 (183).


 IN A,(#B7), if the line is not 
             busy with modem

 Bit7 BitO
  0 0 line not connected
           money to the modem
  0 1 off-hook pa-
           rally apparatus
  1 0 call (possible
           glitches)
  1 1 line free


  IN A,(#B7), if the line is
             connected by modem

 Bit7 is always 0
 BitO goes through it
       taken data


  OUT (#B7),A

 BitO when the line is busy - 
       transmitted data,
       when taking d.b. =1
       with freed
       NI is not relevant
 Bit1 1 - take line
       0-release line

 Bit The bits determine the time
       to whom
 BitS hardware will stretch
       time interval between
 Bit7 two neighboring 
 Bit commands IN A,(#B7) 
       or OUT (#B7),A

 Bit7-BitH
 #00 time .000002*16 sec
 #10 time .000002*15 sec
 ...
 #E0 time .000002*1 sec
 #F0 asynchronous mode, NO 
      WAIT

  For case #F0 nothing
stretches, everything is done
is the same as for port #FE in 
VICOMM emulation mode.

  What are bits 7-4 for?

         example:

       LD A,#?0 *
       OUT (#B7),A *
       IN A,(#B7) !
       POP AF
       IN A,(#B7) !

without hardware support for
commands marked with !, 
The execution period will be:

                   bars

  PENTAGON 11+10=21
  TURBO PENTAGON 11+10=21*
  SCORPION12+10=22
  TURBO SCORPION 12+10=22*
  KAY 12+10=22
  TURBO KAY 12+12=24

                    seconds

  PENTAGON .000006
  TURBO PENTAGON .000004 !
  SCORPION .0000063
  TURBO SCORPION .000004 !
  KAY .0000063
  TURBO KAY .0000034

  * plus WAIT
  ! approximately

  For the case of XTR, the period 
for all cars is equalized,
increasing (!) to a value
tion, set in bits 
7-4 (except for #F0 value).

  The same is true for  
OUT (#B7),A and for any 
IN/OUT combinations with port 
#B7.

Note_1: naturally 
the program must be written
sana for a worse car, 
so that the execution time
mand on this car was  
less than specified 
the time until which everyone
stretches (otherwise it will be
compression!).

note_2: period without 
there should be no stretching
less than .00000229 sec, (8 so-
Comrade heTURBO PENTAGONa, 16 
TURBO PENTAGON cycles), 
otherwise no stretching will occur
will do.

Example of a pause of .002 seconds:

W002 XOR A
       OUT (#B7),A ; period
                      32 µS
       LD B,62
W0021 IN A,(#B7) ; 

          62*.000032=.001984

       DJNZ W0021
       ...

  This will happen on any car.
.002 sec, regardless of TUR-
BO/heTURBO.

  Programming examples:

  release
  OUT line (#B7),#F0
  occupy the OUT line (#B7),#F3

Dialing (WAIT ... in se-
kundah):

ADRNUM DB "1234567"DIAL OUT (#B7),#00 ;reset
                       lines
        WAIT 0.5
        OUT (#B7),#02 ; for-
                  pick up the line
        LD HL,ADRNUM
        LD C,7
DIAL7 WAIT 0.5
        LD A,(HL)
        SUB #30
        JR NZ,DIAL7_0
        LD A,10 ; for 
                 zero-ten
DIAL7_0 LD B,A
        INC HL
        PUSH HL
        PUSH BC
        CALL DIALN ;dial
                       numbers
        POP B.C.
        POP HL
        DEC C
        JR NZ,DIAL7
        WAIT 0.5
        OUT (#B7),#03
        RET

DIALN OUT (#B7),#00
        WAIT .06
        OUT (#B7),#02
        WAIT .04
        DJNZ DIALN1
        RET

Data transfer (principle VI-
COMM):

        OUT (#B7),#F2
        WAIT
        OUT (#B7),#F3
        WAIT
   repeat according to the algorithm

      Waiting for a call:

WTCALL LD DE,#8180
        XOR A
        OUT (#B7),A
WTCLO LD BC,#FFOO
WTCL1 WAIT .002
        IN A,(#B7)
        AND D
        CP E
        JR NZ,WTCL2
        INC C
WTCL2 DJNZ WTCL1
        LD A,C
        CP 30; anti-
                        glitch
        JR C,WTCLO ; no 
                      call
WTCLЗ LD B,0 ;waiting
                       end
WTCLЧ WAIT .002; call
        IN A,(#B7)
        AND D
        CP E
        JR Z,WTCLЗ
        DJNZ WTCL
; you can take a line
        RET

  !  it is not recommended to
mother line at the time of the call
(after all120 volts!!!),
you need to wait for a pause between
calls (said right
valid for any end-
telephone device 
lines).

____________________________
   ──────────────────────

Share your thoughts about the article