Select your language

In recent years in the pages of "Radio" has been described many different musical calls. In most cases, they are quite simple and the result, of course, not entirely satisfactory. We offer our readers the option of using microprocessors - more complex, but has great potential. The device performs the function of a doorbell, however, with a minimum of work and selection of favourite tunes, you can find him and other applications.

Music call is assembled from parts of SPECTRUM-compatible computers. It allowed to achieve good results. Diagram of the device represented in Fig. 1.

(click to enlarge)

On elements DD5.1 - DD5.3 is an oscillator. Elements DD6.1-DD6.3 form the audio port of the coprocessor, for which analyses only the signal A14. Address selection due to the desire of authors to keep compatible with ZX SPECTRUM, which gives the opportunity to use a large number of existing programs and melodies. The control sound the coprocessor has not changed:

LD BC,65533: OUT With And the choice of the register;

LD BC,49149: OUT C,A recording in the register;

LD 60,65533: IN C,A reading from the register.

Purpose registers sound coprocessor is described in detail in [1, 2]. The contents of the register With here plays no role. It is used at its discretion.

On elements DD7, DD5.4, DD5.5 and diodes VD2, VD3 assembled host memory management. It generates the signal RAM RAM activates in the event of a memory access in the range of addresses F800H-FFFFH (63488-65535). Otherwise vybiratsa ROM. If NV want to use a ROM larger than 32 Kbytes, design can be simplified. To do this you must remove the chip DD7, to the cathode of the diode VD2 signal A15 from the CPU (the resistor R5 to leave), to the input of CS ROM DD2 (pin 20) signal MR, a to the input A (pin 22) is the signal A15. Scheme simplified site management memory shown in Fig. 2. It should be borne in mind the memory will now be 16 maps the same RAM. Thus, the address 8000N, N, N-F800H - equivalent.

The design is applicable to any quartz resonator ZQ1 a frequency of 2 MHz. Chip interchangeable on their many counterparts. Diodes - any series KD521, KD522. The resistance values of the resistors and the capacitance allowable change in wide limits. Might have to pick up the resistance of resistors R1 - stable operation of the generator and R18 - for optimal volume level. Blocking capacitors C3-C9 are set to the power conductors chips, preferably closer to their buildings. Switches: SB1 - call button; SF1 is installed on the door jamb, or used any disconnect switch (when the door is closed the circuit is open).

It is best to install the three-pin reed switch, controlled by a magnet, as done in burglar alarms. When opening and closing door sounds bell. It can be disabled by connecting the output R (pin 19) sound coprocessor with the common wire. The effect is implemented in the software (table. 1).

The device collect on the finished Board from SPECTRUM-compatible computer or wow Aona. On it already there is space to install RAM, ROM and CPU as well as summed up the power conductors, information and address lines. Ready device, power supply and amplifier are conveniently placed in the radio housing or recorder.

The establishment of call to begin with inspection of the installation. Connect the power supply and amplifier. Next, you need to write a TEST program (table. 2) in any ROM volume (see [3]). If after the filing of the processor RESET command will hear the bell - everything is in order (maybe except RAM). Otherwise or not runs the alternator or faulty parts or improper mounting. To check RAM write zero values to the addresses N, N. If the bell will ring, so the RAM is fine, if not, try replacing the diode VD1 two connected in series.

Then, programmed music call. For this perform the following actions.

Using music editor SOUND TRACKER V3.0 need to download any compiled melody at the address 63488, selecting "WITH PLAYER".

In basic to run the CLEAR command 4E4.

From the operating system TR-DOS to execute commands:

  • LOAD "name" CODE (where "name" is the name of the uploaded file);
  • SAVE the "player" CODE 63564,1116;
  • Download tones, selecting "WITHOUT PLAYER";
  • Write the text of the program PROG.

To merge the files into one, placing it in the:

  • the program PROG, starting at address N (00000);
  • the player program starting at address 0200H (00512);
  • compiled ringtones in free memory ROM (except addresses F800H-FFFFH);
  • immediately after the program PROG is a table of addresses melodies, complete word of FFFFH. The length of any table within 2-182 bytes (1-91 melody).

If the free space of the ROM and the address table filled with FFH codes, not erasing firmware", you can add a new ringtone by free space and write it address at the end of the table.

In program PROG used the following constants:

  • 00D7H 00D8H - determines the delay time to eliminate contact bounce switch SB1: 13*{(00D8H)*256+(00D7H)), in microseconds;
  • N N - defines the time period between invocations of the program player 13*{(0087H)*256+(0086H)}, in microseconds (approximately 0.02), then the period between notes in-DELAY - times (here and further in the signs - - signed option music editor SOUND TRACKER);
  • 00F7H - contains the parameter-LENGTH - at-LENGTH PATTERNS is equal to 63, i.e. (00F7H)*64 - number of notes played to self-stop.

For rational memory usage ROM appropriate length tunes well pre-customized in the editor SOUND TRACKER for the cell contents 00F7H. If the tune will be shorter after one loss it will start again and play required (00F7H)*64 notes (of course, provided that the door will remain closed); and if longer, ending melody will not be heard.

Is editor SOUND TRACKER you can use a different version, adjusting, if necessary, some constants in the program PROG:

  • (VN,SN) - length program player;
  • (N,N) - the address to which the initialization procedure is stored the address current song;
  • (N,N) - the address of the initialization procedure;
  • (N,N) - address of the procedure of the player;
  • (SN,SN) - the address of a procedure turn off the sound.

Call sometimes causes interference in the form of stripes on the TV screen. Their level reduce, galvanically unleashing the call and the wires going to the button and the sensor door. This can be realized by using two optocouplers AT, galvanic the element of watches and a few resistors. When the door is closed and not the button is pressed the circuit is open or the battery is not discharged. You can also to recommend to improve the oscillator, the node selection and power RAM, node startup and reset.

Literature

  • Larchenko A., Rodionov N. ZX Spectrum & TR-DOS users, and programmers. - S.-Pb.: PETER, 1994.
  • Kostenevich R. Musical coprocessor AY-3-8910 the Vector-Oz". - Ham, 1995, No. 5, p.25.
  • Borovik O., Parfenov A., seramin V. Exciting games everyday computer. - Tomsk: IHL "Rasko", 1992.
  • Authors: V. Glaznev, V. Tolstikhin, Izhevsk