ENCYCLOPEDIA OF RADIO ELECTRONICS AND ELECTRICAL ENGINEERING Musical call for 120 melodies. Encyclopedia of radio electronics and electrical engineering Encyclopedia of radio electronics and electrical engineering / Microcontrollers On the pages of magazines you can find many schemes and descriptions of musical calls, but they all have one drawback - the number of melodies is limited (no more than 16), so they are quickly remembered and bored. The proposed device is capable of synthesizing up to 120 melodies, which are played sequentially with each next press of the bell button. Schematic diagram of the call is shown in the figure. Its basis is the AT90S8515-8PI microcontroller from ATMEL. When the bell button SB 1 is pressed, the device is powered on, the program stored in the microcontroller memory starts working, and a log voltage appears at pin 39 (RAO). 1. As a result, transistor VT1 opens, relay K1 is activated and with its contacts K 1.1 blocks the call button. To form 3H oscillations, the microcontroller timer is used and its operation mode is to switch the external output PD5 (to obtain the desired audio frequency, the timer frequency must be multiplied by two). The signal taken from this output is amplified by the composite transistor VT2VT3, in the collector circuit of which the dynamic head BA1 is included. To control the volume in series with it, you can turn on the tuning resistor R5 (depicted by a dashed line). After playing the melody, the program writes a pointer to the next melody into the non-volatile memory (EEPROM) of the microcontroller, the high level at its output 39 is replaced by a low one and the relay breaks the power circuit until the next press of the SB1 button. The melodies for the call are taken from the Melody Player for Motorola program (located in the mp4m.rar archive). To convert melodies into assembly language, the motcvt program was written (located in the motcvt.gag archive). Using it, it is easy to change/add/remove any melody. When launched, the command line specifies the name of the file with melodies from mp4m and the name under which the resulting file should be written (for example, mel.inc). The source texts of the program for the microcontroller are in the zvonok.rar archive, the main points are commented. When using a quartz resonator for a different frequency, it is necessary to change the frequency value (3618400) to the one actually used (in hertz) in the .equ fsck = 3618400 line of the zvonok.asm file. Everything else will be calculated by the assembler. The program was written and debugged using AVRStudio 4.0 Build 181. Power supply U1 - any stabilized with an output voltage of 5 V (you can also use a battery made up of galvanic cells or batteries). Instead of BESTAR BT-5S, it is possible to use any relay with an operating voltage of not more than 4,5 V and contacts designed for switching mains voltage of 220 V. In the process of debugging the device, it was found that the contents of the non-volatile data memory of the microcontroller can be corrupted if, after turning off, the supply voltage drops to 0 slowly (more than 10 ms). The fact is that when it is smoothly lowered, the microcontroller continues to work for some time, and this can cause incorrect decoding and (or) fetching of commands, which, in turn, can provoke unauthorized writing to EEPROM. To prevent damage to the contents of the memory, you can use the so-called supply voltage drop detector (domestic KR1171SP47 or its foreign analogue PST529), which, when the supply voltage drops below the set threshold, issues a Reset signal, thereby stopping the operation of the microcontroller. For this purpose, the author used the resistor R6 connected to the output of the power source as an additional load (shown in the diagram with a dashed line). Author: M.Beletsky, Ufa See other articles Section Microcontrollers. Read and write useful comments on this article. Latest news of science and technology, new electronics: Artificial leather for touch emulation
15.04.2024 Petgugu Global cat litter
15.04.2024 The attractiveness of caring men
14.04.2024
Other interesting news: ▪ TPA6211A1 - audio amplifier chip ▪ The world's oceans set a new temperature record ▪ Dream Chaser spaceplane tested ▪ Greenland ice is melting fast News feed of science and technology, new electronics
Interesting materials of the Free Technical Library: ▪ section of the Radio Control website. Article selection ▪ article by Pasteur Louis. Biography of a scientist ▪ article What does historical science study? Detailed answer ▪ article Teacher-psychologist. Job description ▪ The Appearance of the Magic Wand. Focus Secret
Leave your comment on this article: Comments on the article: Alexander What fuse bits do you need to set or can you leave the factory defaults? puh57 Repeated your call. Thanks, everything is fine All languages of this page Home page | Library | Articles | Website map | Site Reviews www.diagram.com.ua |