ZX Hard #01
06 мая 1999
  Железо  

COM-port & timer - Serial port for Spectruma!!!

<b>COM-port & timer</b> - Serial port for Spectruma!!!
           COM-port 'timer


(C) VIC, 1997, Kharkov, Ukraina


  Serial port for Spectruma!!!


   Description of improvements, which will allow
connect to your computer any external device, designed for the 
serial port. For example - a mouse, modem or printer.




  A12> 1 A0 DC Q0 15  2 A1 Q1 1914 <7 D1

  A14> 3 A2 Q2 1913 <6 D2

                Q3 1912 <5 D3 CLK0 9

                Q4 1911 <4 D4 G0 11

   A3> 4 E1 Q5 10 <3 D5 OUT0 10> FR1
 OIRQ> 5 E2 Q6 9 <2 D6

  A15> 6 E3 D1 Q7 7 <1 D7 CLK1 15

                                            G1 14

                                   21 CS OUT1 13> FR2

   D1 - 1533ID7 A8> 19 A0

   D2 - 580VI53 A9> 20 18 A1 CLK2

   D3 - 580VV51 (IK51) 22 RD G2 1916

   D4 - K170UP2 WR> WR D2 OUT2 23 17> FR3

   D5, D6 - K170AP2

 1.75Mhz>


 D0> D0 27 USART
 D1> 28 D1 COM2 April 1 X1 Y1 April 13
 D2> D2 1 3 UP1
 D3> 2 D3 Y2 May 12
 D4> 5 D4 May 2 X2
 D5> D5 2 6 UP2 Y3 June 11
 D6> 7 D6
 D7> 8 D7 June 3 X3 15 <+5 V

                                      1 UP3 D4 8

        11 CS RxR 14
 WR> 10 WR TxR 15 TXD
 RD> 13 RD R1> 2
 A8> 12 C / D TxD January 19 1K RXD

                     RTS on March 23 on February 1 X1 1 <3
 FR1 1925 RxC DTR February 24 Y1 7 RTS
> 9 TxC a C D5 <4

                     April 3 RxD CTS

        21 RES CTS June 17 3 <5

        1920 CLK DD3 DSR May 22 on Feb. 2 X1 Y1 7 DCD

                                                     2 <8

                                      1 C SG

                                              Y2 6, 7

                                March 3 X2 D6 DTR

                                                           > 20
 vyv.4 D5 and D6 connected to GND
 Vyv.5 D5 and D6 connected to-12V
 Vyv.8 D5 and D6 connected to +12 V


   Address controller ports:


     # 80F7, # 81F7, # 82F7, # 83F7 - Ports timer

     # 90F7, # 91F7 - interface ports COM1



   When working with the port must first be
programmed timer mode of division
frequency (mode 3). It should be
make sure that the resulting frequency is not
extend beyond the permissible values
(Maximum input frequency RxC / TxC
USART on the passport is 615 KHz).


   Type of application connector - DB-25P
(Standard plug an external modem). For
those who do not know, DB-25P connector means
such as "fork" or "Dad."


   To connect COM2 to use 3 chips (VV51, UP2, An2).
To the inputs 9 and 25 must submit USART
instead of the signal FR1 FR2 signal with the timer, and
the input signal 11 with 13 O ID7. For
TxD signal is necessary to use a free half D5.



(C) Mr.Brain


    We offer you a slight
refinement scheme Com-porta from VIC. Little
History: More When the first
Spectrum it was built-in capability
measure the time intervals with
triggered 50 times per second interruption.
At the end of drawing each frame ULA generates a signal 
interrupts the processor, got it served a small podprogrammku 
located in ROM BASICa at # 0038 (56). This podprogrammka than 
Poll keyboard, increases by 1 the contents of the system 
variable FRAMES. Due to this the opportunity to measure the 
time intervals in increments 1 / 50 seconds. Since the birth of 
Spectrum were years, and this process has remained unchanged

(Except for use in the past
time chip real time clock).
However, it goes on the clock.

    In addition to the interrupt time processes
Speke measured by the cycles of the
CPU - this is read from the tape, and
Data Transfer pomoschyumodema and much,
much more. This causes some difficulties - in some computers
wrong is the time, in some
working in turbo mode, when working with the modem should go to 
the normal mode or use a modem, which suspends the processor 
signal WAIT to the reception / transmission of data, etc. I say 
nothing about the programs, where together with output on 
screen is the output of digital audio (Eg OVER_THE_TOP). And 
then there was idea: make a Sektrume another interruption, the 
frequency of which can be changed software. Which was carried 
out using a small sample to a scheme of COM-port by VIC (Fig. 
1). 



                Figure 1


    HOW TO USE NEW INTERRUPTION?
Very simple. Now the construction of the table is enough to 
divide it in two - one half will take the address of the timer 
interrupt handler, and another senior, addresses the hook from 
the field sweep. Of course, all of the above applies to the 
second interrupt mode (in first any interruption would lead to 
treatment at # 0038, and zero - absolutely nothing, because 
with the data bus at the time of the interrupt handler will be 
read B # 7F (LD A, A), except for a slight decrease in the main 
program). After creating a table in memory, processors and 
conduct of all related transactions, you can set the mode 
timer, and conversion factors. After loading

the last value on the output of 17 m / s D2
pulses appear with a given frequency and
will interrupt is generated. That is, in principle, and 
vse.Ostaetsya add that the region use the timer can be 
extended. For example, use it, not only for vyschityvaniya time 
intervals, but also for DIGITAL-playing music through AY

or COVOX or through anything in
implementation of any program. Of course, when playing a 
melody, say, three channels of free time the processor can 
remain quite a bit, but it does not disappear and will be used. 
K tomuzhe, at this time there is a fairly

large fleet of vehicles, with a clock frequency
CPU greater than 3.5 MHz - they
free time will be longer. With the timer you can even run 
multiple programs simultaneously. Or, for example, to write 
music for AY frequency quantization instead of 50 Hz, as now, 
but for example, 100 or 200 Hz. And who knows what else will 
come to mind our talented compatriots. 

    I almost forgot the main thing: the timer is not
RESET input signal and therefore the output
of your program's, which used timer interrupt, do not forget to 
stop counter, or hang in the SOS is provided to you (no 
response by pressing a key). If, however, the program that uses

timer interrupt, was pressed RESET, then
there will only turn the power off
computer.

    Although there is a simpler way, and (proposed
my good friend D. Kuryachim) - enough to install yet another 
trigger that pressing RESET will stop our

new interrupt and allow it only in
If treatment ktaymeru D2. Scheme of improvements is shown in 
Figure 2. However, there should at the very first

appeal to a timer to give a command to stop the bill in the 
channel 2. 



         Figure 2


    The device is simple to collect and collected
of the healthy elements does not require networking:)

    Well, that's all for today. Send message
and greeting cards to my address
:-). Rotten fruit and vegetables are taken
only tightly rolled in a three-liter
banks, stones, bricks and other heavy
things best not to send - your family
budget can not stand it, ".. well, if
you're at it a barrel roll, it's a container transport are 
obtained by this transagenstvo doing. ":-) 


                   662620 Chernogorsk

                          ul.Rabochaya 28

                          Pavlukhin DA

                          (Mr.Brain)





Other articles:

Entry - the first room zhelezyachnoy newspaper.

Meshaw mail - a letter from: Mongol / Delta Corporation, SANDER / MskZXNet, Mr.Brain, Chirtsov Igor.

Conversation - Nemo & VTS.

COM-port & timer - Serial port for Spectruma!!!

"Iron" ... logic! - educational program of the logical circuits.

Fast Memory Access (FMA) - acceleration scheme with memory.

C-bus - bus is founded on the Centronics interface.

OSP v.0.1 - a new sound card for the Spectrum to replace General Sound.


Темы: Игры, Программное обеспечение, Пресса, Аппаратное обеспечение, Сеть, Демосцена, Люди, Программирование

Similar articles:
Likbez - Some excerpts from the Criminal Code of Russia.
Around the World - News from the MacWorld Expo.
Help - description of a new shell of the newspaper.

В этот день...   7 May