Another hypermelanosis on the microcontroller.

Here scheme:


Difficult nothing. The output of this circuit can connect any speaker impedance from 4 Ohms to infinity. In basically, you can just switch between the 15 foot chip and the ground high impedance speaker (more than 1K) - and quietly listen.

And here is the source program of the controller: patriot.asm

Look in the program text. Looking for a large array called HymnUSSR. In this array contains music Anthem of the USSR aka Russia. After flashing it will immediately begin to delight your hearing.

How? It does not please you??? Oh please - you can easily to write a melody. It is very easy to do.

Immediately after the array lists the notes and the corresponding number. The first line corresponds to the average octave, 2 - large, 3-I first.

In addition, the numbers in the array are indicated duration. Then there, at the entry of each note is two numbers. First, the code notes, the second the duration (in arbitrary units). Experiment with this.

There are still pauses. Pause has a code 254. It also written in tandem with the duration.

At the end of the melody must be 255, otherwise the program will continue to read memory outside of the array and the result - happily zaglyuchit :(

Also, remember that each row of the array should contain an even number of values, otherwise the same will be glitch-S.


How can we upgrade?

We can add a module to select a ringing tone (if a few). To choose the melody you can either sequential switching, either by entering the number with the keyboard or something. In addition, if to do this doorbell - you can write a module recognition "style" button (like Morse code), and in accordance with this to include certain melody.

Yes actually a lot of things... fantasy.

Finally I want to ask: if you write some music for this device or something upgradethe it - please share with us. Do not be greedy. I'm not greedy? :)

Upd. Our colleague nick masya13 sent us a couple of tunes that can be downloaded here and still here.


Add comment


Service manuals

Copyright © 2020 Electrical circuits.