Home Generator Sound control on a microcontroller. Electronic volume control on Microchip PIC18F2550 and DS1868. Electrical diagram of a push-button regulator

Sound control on a microcontroller. Electronic volume control on Microchip PIC18F2550 and DS1868. Electrical diagram of a push-button regulator

Share to:
In the currently widespread analog electronic equipment (REA), elements of digital technology are increasingly used, especially in units that have low reliability. One of the most reliable elements of REA are variable resistors (potentiometers). A number of companies have developed a wide range of digital potentiometers, but such elements require microprocessor control for their normal operation, i.e. it is necessary to use microcontrollers (MC). Considering the far from always low cost of both MKs and digital potentiometers, the urgent task is to develop simple, cheap digital regulators based on the microcontrollers themselves. As you know, a potentiometer is an adjustable voltage divider and contains two arms: upper and lower. In the design considered in this article, the upper arm of each divider has a constant resistance, and the resistance of the lower arm is changed by switching resistors (to the body) using an MK (Fig. 1). The schematic diagram of a simple two-channel digital potentiometer based on an inexpensive PIC16F628A microcontroller is shown in Fig. 2. It can be used as a stereo volume control.
To switch the resistors of the lower arms of the dividers, 6 lines of port A are used for one channel of the digital potentiometer, and 6 lines of port B are used for the other. Six precision resistors R1-R6 and R7-R12 are connected to the pins of ports A and B, and the values ​​of adjacent resistors differ by two times. Considering that there are six resistors used, the variable resistor they form can have 64 “switch” positions. Changes in the resistance of the lower arm of each divider, with selected resistor values, range from 5 to 316 kOhm. When using precise (or precisely selected) resistors R1-R12, the adjustment can be no worse than in industrial samples of digital potentiometers, for example, MCP4021. A smooth change in the division coefficients in both channels is carried out by pressing the S1 button by smoothly increasing or decreasing the digital code, which ensures switching of the resistors of the lower arms of the dividers. Using the S2 button, you can adjust the stereo balance. The main difficulty in developing a program for the controller was that the pins of ports A and B need to be constantly reformatted either as inputs or outputs. Moreover, when port lines operate in output mode, it is necessary to programmatically set only log levels on them. "0". If in addition to log. “0” the log level will be sent to the port pins. “1”, then the potentials at the analog outputs of the device will be formed in an unpredictable way. The operating algorithm of the MK is chosen so that with each subsequent button press the direction of adjustment changes (the time intervals between button presses are selected empirically). While holding the button, the codes change smoothly (increase or decrease). After releasing the button, the code values ​​are saved. The device can be used in a wide variety of radio-electronic devices: generators, radio receiving and transmitting devices, automation devices, measuring devices, as well as amplification devices as a dual digital variable resistor and balance regulator in stereophonic sound reproduction equipment. The developed device can also be used in automatic gain control (AGC) systems. To do this, it must be supplemented with a scaling amplifier, a diode rectifier and a comparator. The schematic diagram of such a digital potentiometer is shown in Fig. 3.
If the level of the comparator input signal exceeds the level set by changing the resistor R23, then the comparator is triggered and a constant positive voltage appears at its output. The response threshold of the comparator OP2 (as well as the required signal amplification) is adjusted by variable resistor R23. The signal level is monitored automatically. Initially, the code increases, and after the comparator is triggered, it begins to decrease, and then vice versa. This regulator can be used in various devices, including measuring ones. The peculiarity of such a digital AGC is the absence of an additional increase in the nonlinear distortion coefficient associated with control circuits in analog systems. Resistors R1-R12 in the circuits of Fig. 1 and Fig. 2 should be more precise, for example, type C2-29V. You can use resistors of similar values, but the corresponding resistors in one and the second channel must be the same. It is also possible to use ordinary resistors, but they must be selected. It is better to use non-polar oxide or film capacitors C1-C4. Input wires must be shielded. The device supply voltage is +5 V. The regulator is designed so that it operates in micro-consumption mode (internal built-in microprocessor oscillator, low clock purity - 37 kHz with a consumption current of 15 μA). Therefore, the device can be designed as a self-contained small-sized unit, which can be included in the break of the connecting signal cable. This significantly expands the scope of use of the device. It can be used both as a built-in unit and in conjunction with long-used amplifiers. In this case, the standard volume controls of these amplifiers do not need to be used. Disadvantage of the device: the resistance does not reach 0, but, according to the author, this drawback is not significant. However, the adjustment range can be reduced to 2.5 kOhm by using an additional seventh resistor with a nominal value of 5 kOhm, while the “variable” resistor will have 128 positions, but the program can be adjusted. Anyone who understands this can do it themselves. If you use a 28-pin MK type PIC16F876A, then you can use eight resistors, such a potentiometer will have 256 positions. For comparison, note that commercially produced digital potentiometers usually have 64 positions, and their minimum resistance is 1.2 kOhm (with the maximum possible - 316 kOhm). If desired, you can expand the capabilities and ease of use of the device. If pin 3 MK is connected to +5 V through a 10 kOhm resistor, then rectangular pulses of audio frequency with an amplitude of 5 V will appear on it. By applying these pulses through a voltage divider to the outputs of the device, we get an audible alarm that will work when the buttons are pressed.

Below are schematic diagrams and articles on the topic “volume control” on the radio electronics website and radio hobby website.

What is a “volume control” and where is it used, schematic diagrams of homemade devices that relate to the term “volume control”.

Each of the device channels consists of an emitter follower (VT1, VT2), an attenuator (R5, R6), an active bandpass filter (VT3, VT4) and an analog summing amplifier (VT5, VT6). Emitter followers match the output impedance of the previous reproducing... There are many different types of regulators, from a simple variable resistor to a modern digital regulator. Each of them has certain advantages and disadvantages. The advantage of a simple resistor is that it does not introduce distortion, but the disadvantage... The two-channel circuit for adjusting volume, timbre, and balance is intended for use in portable and stationary audio-producing equipment of the middle and high classes. Purpose of the pins of the KA2107 microcircuit... It is used in automobile, portable and stationary sound-reproducing radio and television equipment of medium and high class. An additional control input provides easy control of volume compensation. Four control inputs... The LM1040 microcircuit is used in automotive, portable and stationary audio reproducing radio and television equipment of medium and high class. An additional control input provides easy control of volume compensation. Four control... An image of the printed circuit board is shown in Fig. 3.1. One of the options for an external electronic volume control is shown in Fig. 3.2. The arrangement of elements is shown in Fig. 3.3. Rice. 3.1. Printed circuit board image... Used in portable and stationary household equipment of medium and high class. The chip is a two-channel digital volume control with push-button control. Typical connection diagram... Since the volume control KA2250 (TS9153) contains two stereo controls with different adjustment steps (2 dB and 10 dB), you can try to use it in a four-channel connection. By supplementing the standard circuit with a simple generator... Features: high stability of operation thanks to the built-in zener diode; low level of dispersion; compact SIP9 housing. This amplifier provides output protection... Two-channel bridge low-frequency power amplifier with electronic volume control. The amplifier provides protection for the output stage against short circuits, as well as protection against voltage surges and static electrical discharges. This amplifier can be used as... The high-fidelity UMZCH described in publications was developed for subjective examination of the sound of digital laser CD players (PDCs). During the examination, powerful high-quality acoustic systems (AS) were connected to the output of the UMZCH, and its input was connected to the output of the PCD in order to ensure minimal phase and nonlinear... A fine-compensated volume control on a variable resistor of group B without taps can be made according to the diagram below. The rise in frequency response at lower and higher frequencies, which is necessary when the volume is reduced, is created by successive oscillating circuits L1C1 and L2C2, tuned respectively to... The circuit of a homemade volume control with touch control is designed to work with a power amplifier having an input impedance of at least 10 kOhm and a nominal input voltage is within 0.1-0.7 V. The device is assembled on the basis of a five-channel integrated switch K190KT1. Two of those included in... Schematic diagram of the stereo effect depth regulator on the K140UD1B operational amplifier chip. In a small room it is not always possible to place speakers at the required distance (2...3 m) from each other, so the stereophonic effect is weak. The described device allows you to electrically double the width of the stereo base and thereby improve the sound... In electronic musical instruments, where the sound volume has to be continuously changed during playing, conventional regulators on variable resistors cannot be used, since they create significant interference that degrades the sound quality . The contactless volume control is free... The SSM2160, SSM2160P, SSM2160S, SSM2161, SSM2161P, SSM2161S chip is a four/six-channel volume and balance control with digital control. Supply voltage = +10...+20 (+5...±10) V; SSM2161 = four channels; SSM2160 = six channels; 7-bit... The TC9210P, TC9211P chip is a two-channel attenuator with digital control. Supply voltage: with unipolar supply (Vgnd = 0 V) ​​Vcc = 6...17 V, with bipolar supply (Vgnd = 0 V) ​​Vcc = ±6...±17 V; Total Harmonic Distortion = 0.005%; Range... The TC9235P, TC9235F chip is a two-channel attenuator with digital control. Supply voltage = 4.5...12V; Total Harmonic Distortion = 0.01%; Gain adjustment range = 100 dB; Built-in DAC to control the level indicator; ... The TC9260P, TC9260F chip is a two-channel attenuator with digital control. Supply voltage = 4.5...12 V; Total Harmonic Distortion = 0.01%; Gain adjustment range = 100 dB; 40 volume levels; Coefficient of mutual influence of channels. .. The TC9421F chip is a two-channel volume, balance and tone control controlled via a three-wire bus. Supply voltage = 6...12 V; Total Harmonic Distortion = 0.005%; Transmission ratio adjustment range. .0...-78dB; Adjustment step in range...

This regulator is designed for use in a tube amplifier. Allows you to control the volume, input selection and power on/off of the amplifier from any remote control, and a delay in the supply of anode voltage is also implemented. All remote control settings and codes are stored in non-volatile memory.

Device diagram.

Work algorithm:

1. After power is applied (connected to the network), the amplifier remains turned off, incl. after a power failure.

2. When turned on using the remote control button or the “NETWORK” button on the case, the lamps turn on, the volume control is rotated as quickly as possible until the minimum volume is set.

The NETWORK LED flashes slowly.

3. After the set warm-up time has passed, the anode voltage is connected, and the volume control is smoothly adjusted to a small level. This operation serves to prevent accidental sudden activation at full volume. The “NETWORK” LED is constantly on.

4. With the amplifier turned on, you can select the desired input using the button on the case or on the remote control. The selected input is remembered and does not change when the power is turned off.

5. Pressing the volume button once shifts the knob by the amount set in the 3rd EEPROM cell; when you hold the volume button, the knob rotates constantly

6. When you press the “mute” button, the control rotates at maximum speed to minimum.

When pressed again, it increases the volume by the amount set in the 5th EEPROM cell.

Pressing any volume button while moving the knob on the “mute” command cancels the “mute” action and goes into volume control mode.

At the time of flashing the microcontroller, you independently set the required values ​​for the program (by entering the required values ​​in the EEPROM cells)

Programming a new remote control.

When you turn it on for the first time, you should program (flash) your remote control. Any remote control encoded by NEC is suitable, this is the majority of “Chinese” remote controls, as well as remote controls from household set-top boxes and TVs (except Samsung and Sony)

Remote control firmware:

1. Disconnect the power supply to the microcontroller for a few seconds.

2. Apply power to the microcontroller and within one minute, but no later than turning on the anode power, press and hold the “POWER” button on the amplifier body for several seconds until the “POWER” LED begins to flash slowly once per second, this is the programming mode for the new remote control DU.

3. Press the remote control buttons in a certain sequence; when the code is received, the “NETWORK” LED will blink several times, indicating acceptance and recording of the command.

The order of pressing the buttons is as follows:

1. Food

2. Input selection

3. Volume is higher

4. Volume is lower

5. Mute the sound

(you can press any convenient buttons on the remote control)

4. Turn off the power for a few seconds. After turning on, check the correct operation of the remote control buttons, if necessary, repeat the firmware process from the very beginning.

Microcontroller firmware

Before flashing the MK firmware, enter the values ​​you need into the EEPROM cells.

EEPROM cells:

1 - anode supply delay time (in seconds)

2 - rotation speed of the volume control motor (1–255, where 255 is the maximum speed)

3 - one-click step (rotation angle when pressing the volume button once, 0-255)

4 - travel time from min. up to max. loud (in seconds, measure and register)

5 - volume level when turned on (in seconds)

6* – flag, use of functions. setting low volume - step 5. and item 6 (1 – on, 0 – off)

7** - flag, blinking LED. “NETWORK” during lamp warm-up, 1 – YES, 0 – NO

All values ​​in the EEPROM cells are entered in the hexadecimal system; for this you can use the attached program or any online calculator.

4th cell - time equal to or slightly longer than the time it takes to pass from maximum to minimum volume, in order to set a guaranteed minimum level, measure when turning on the amplifier, because at this moment the speed is maximum.

5th cell – volume level, which will smoothly settle after applying anode power,

set the desired level.

*If the above functions are not required, then set the flag in the 6th cell to “0”.

**If the “NETWORK” LED blinking flag is set to “0”, the LED will light constantly.

You can flash the MK in any convenient way, example of a programmer

Parts List:

PIC16F628A – 1 pc.

ULN2003 (ULN2004) – 1 pc.

Quartz resonator 4 MHz – 1 pc.

Low-current relays with two groups of contacts (input selector) – 2 pcs.

Relay with one or two groups of contacts for switching on the anode – 1 pc.

Relay with one group of contacts for turning on the network (connecting a power transformer) – 1 pc.

All relays are 12 volt.

Bipolar transistor MPSA 42 – 2 pcs.

Bipolar transistor MPSA92 – 2 pcs.

Bipolar transistors can be replaced with any low-power analog or field-effect transistors

Photodetector TSOP or any compatible.

Low-power stabilizer 7805 for 5 volts – 1 pc.

Stabilizer 1 ampere 7812 at 12 volts – 1 pc.

Capacitor

470uF*25 volts – 1 pc.

470uF*16 volts – 1 pc.

470uF*6.3 volts – 1 pc.

4pcs diodes or rectifier bridge.

Low-power transformer for several watts 220/12(14) volts – 1 pc.

You can use any low-power power supply with a voltage of +5 and +12 volts at the output

Resistors (0.125 W):

20 rooms – 2 pcs.

1 room – 4 pcs.

10 rooms – 1 pc.

Buttons – 2 pcs.

LED – 4 pcs.

The attached archive contains a commented source programs, firmware file, diagram in PDF and diagram in Proteus, as well as a binary to hexadecimal converter program (the program should use the numeric keypad above the letter keys)


Due to the simplicity of the circuit, a printed circuit board was not developed; the circuit was assembled on a breadboard.

The board with the input relays is located in close proximity to the input sockets.

Any questions you may have can be asked at.

With the development and improvement of microcircuits for audio amplifiers (both preliminary and final), there is a desire to modernize control. The best way to do this is to use a controller. This project interested me very much in terms of functionality; the author of the controller circuit and the firmware itself put a lot of effort into bringing the control program to perfection (for which many thanks to him!). Next, I copy the author’s description with minor abbreviations.

Schematic diagram of the main unit

Microcontroller controlled preamplifier Atmega16 It is built on a modular principle, that is, everyone can create individual modules according to their wishes and preferences. This especially applies to output power amplifiers, power supplies, and speaker protection. In this material we will look at the input module on the chip TDA7313 and a processor control unit. Chip TDA7313 is included according to the standard scheme and has no special features. The unit is powered by a +9 Volt power source. This block has no more features. PCB files for this and other modules archived on the forum, there are also schematic diagrams for connecting a keyboard, final amplifier and power supply.

Main module parameters:

1. Volume adjustment (16 levels);
2. Gain adjustment (4 levels);
3. Bass tone adjustment (16 levels);
4. HF tone control (16 levels);
5. Adjustment of the balance of the front speakers (16 levels);
6. Adjustment of the balance of the rear speakers (16 levels);
7. LOUDNESS - On/off loudness;
8. MUTE mode;
9. STANDBY mode;
10. Show time in mode MUTE And STANDBY and also after 10 seconds, when there were no keystrokes or other control inputs;
11. Control of all functions from the keyboard, remote control (RC) The remote control operates according to the RC-5 standard, as one of the most common;
12. Control using the Valcoder (encoder);
13. Monitoring the temperature of radiators or internal temperature in the case via two channels based on sensors from DALLAS DS18x20. When the set control temperature is exceeded, the cooling fan turns on.

The module uses mainly SMD elements. Microcircuits in DIP packages. The VD10 diode is installed on the opposite side of the board. The amplifier is controlled using a keyboard, encoder and remote control. You can use any remote control that works according to the standard. The keyboard is built in the form of a matrix of 12 buttons (4x3):

INPUT1- selection of 1 channel;
INPUT2- selection of channel 2;
INPUT3- selection of channel 3;
LOUDNESS- enable/disable loudness mode;
MUTE- turn off the sound (the shutdown occurs smoothly, not abruptly). Pressing again turns on the sound;
STANDBY- turn off the amplifier. The power amplifier and its power supply are turned off, the processor module operates in standby mode;
MENU- a button to enter the additional menu, in which you can set additional parameters, such as time, date, response temperature of radiator control temperature sensors. Pressing this button again in this mode returns to the main amplifier control menu without saving the parameters. In order for the new parameters to be saved, you need to click on the button SET.
SET- as stated above, this is saving the new parameters entered in the submenu. Basically, when you press a key SET You can see the temperature of the radiators, information is displayed within 3 seconds.
UP/DOWN- move to the previous/next menu item or submenu;
LEFT/RIGHT- decrease/increase the corresponding parameter, which is displayed on the indicator.

The main buttons are processed by the program almost instantly, but pressing and responding to the button STANDBY requires pressing for approximately 3 seconds. Buttons MUTE And LOUDNESS about 1 second. This is done to prevent activation when these buttons are accidentally pressed, especially if the remote control is used. The main menu of the amplifier control program consists of the following items:

Volume(Volume)
Attens(Gain)
Bass(LF tone)
Treble(HF tone)
Balans F(Front speaker balance)
Balans R(Balance of rear speakers)

The key also works in this mode SET, when pressed, temperature values ​​from the sensors are displayed for 3 seconds. When you press the button MENU we will be taken to an additional menu to set the time, date and maximum temperature parameters for temperature protection to trigger. This menu consists of the following items:

"Set Time: Hour" (time setting - clock),
"Set Time: Min" (time setting - minutes),
"Set Time: Sec" (time setting - seconds),
"Set Date: Day" (setting the date - day),
"Set Date: Months" (setting the date - month),
"Set Date: Year" (setting the date - year),
"Set MAX DS18x20" (setting the thermal protection response temperature).

In this mode, movement through the menu is carried out using the keys UP/DOWN(and the remote control keys), and parameter adjustment using the keys LEFT/RIGHT(and encoder). At any of the points, if we press the key MENU, then we will return to the main menu without writing new values, and if we press the key SET, then saving the entered parameters. For convenience, the author provided firmware in English, Russian and Ukrainian. As an option, I decided for myself to control only the remote control, so I don’t want to assemble and install the encoder and keyboard. The payment that the author provided was made for himself, so he decided to make his own.

I finished assembling the preamplifier - everything opens and is adjustable. Since there are no sensors, they are not defined (in the form of dashes in standby mode). I built my board for SMD, but the processor is in a Dip package, so the board fits it according to the size of the indicator - this is the main reason why I don’t put the board in Lay.

The second board will be the pre-amplifier itself on the TDA7313. The third board is a power supply control module and standby mode. Here is a photo:

It's time for testing. Plays great! I'm pleased with the depth of adjustment of the bass and treble, the bass is soft, the high-pitched tweeters are so loud (although with OM it will certainly be more fun), I especially liked the loudness compensation with its very impressive rise in the low frequencies. In general, I can only say one thing about the device so far - continuous advantages!

After driving for half a day, I did not find any flaws in the firmware, the operation of the remote control is clear, in general, if anyone decides to repeat this scheme, they will not regret it! Author of the scheme - Andrey Doinikov. Assembly and testing - GOVERNOR.

Discuss the article MICROCONTROLLER CONTROL IN ULF

This article describes how, using audio processor and microcontroller chips, you can make a block of digital volume and tone controls for a surround sound system if you have a computer or DVD player. It makes sense to assemble such a device yourself if someone has amplifiers with the good old AC S-30, AC-25 and various S-90 variants.

The described digital tone, volume, balance control provides adjustment of the overall volume and the volume of each channel of the 5.1 surround sound system separately. Tone control - separate in the front, rear and center speakers, as well as changing the bass level, separately in the front, rear and subwoofer channel. In the block, you can select three additional modes: “Stereo”, “Extended stereo 1” (+30%), “Extended stereo 2” (+52%) - separately for each pair of speakers. There is also a version of the control unit where it is possible to select signal sources from three separate inputs of each controller chip.

Picture 1

The “brain” of the adjustment block, the functional diagram of which is shown in Fig. 1, is a microcontroller PIC16F628A, which controls three TDA9860 audio processors via the l2C bus (SDA and CLK signals). In addition, it processes signals from the remote control received through the IR receiver of the SDU (B1), and displays all information on the LCD indicator.

Figure 2

A schematic diagram of connecting the TDA9860 audio processor is shown in Fig. 2. The analog inputs of the sound processor are connected to sources of multi-channel or stereo audio signals - a VHF receiver ("FM"), a sound card ("PC"), audio outputs of a TV or DVD player ("TV"). The outputs LO, R0 of the audio processors (A1-A3 in Fig. 1) are connected, respectively, to the UMZCH of the left and right channels for the front (A1) and rear (A2) speakers or the central and subwoofer channels (A3). It should be noted the peculiarity of connecting pin 25 of the TDA9860 chip. For six channels, three printed circuit boards with audio processors are required, and for two of them (A1 and A2 in Fig. 1) it is connected to a common wire, and for the third (central and low-frequency channels) it is connected to a positive power wire. The voltage level at this pin determines the device address. On printed circuit boards this selection is made using jumpers.

The technical characteristics of the control unit and the system as a whole are determined by the TDA9860 audio processors, as well as the power amplifiers used. The TDA9860 connection circuit differs from the standard one by introducing emitter followers on transistors VT1, VT2, which are switched on at the output of the device. They provide better pairing with a power amplifier (the author used five TDA7294 microcircuits and two TDA7293 in “tandem” connection for the subwoofer as the UMZCH).

class="eliadunit">

The block provides storage of all controller presets; When the unit is turned on, the volume gradually increases to the previously set level. There is a mode for reducing (turning off) the volume - Mute. All adjustment modes are displayed by a liquid crystal indicator in Russian.

All adjustments are possible using four buttons on the front panel of the unit, as well as from a regular TV remote control. I would like to note that almost all inscriptions are “hardwired” into the EEPROM of the microcontroller, so they can be changed without affecting the main program. The exception is the greeting, as well as the names of the modes, which are displayed in English. This is due to the limited EEPROM memory capacity of the microcontroller, as well as for the purpose of maximum compatibility of LCD indicators. If someone does not find a Russified indicator, in this case it is enough to change the Russian inscriptions to English in the EEPROM of the microcontroller; information about this is presented below.

Using the "1", "2" and "3" buttons on the remote control, it is possible to select between three inputs of the audio processor, and switching occurs simultaneously of all three pairs of inputs. But using the buttons on the front panel of the unit, you can select the input separately for each audio processor, as a result, if desired, a radio broadcast will be played in one pair of speakers, music from the computer in the other, and sound from the TV or DVD player in the third. Much depends on the option used for switching input connectors, connecting cables and your imagination.

It makes no sense to describe in detail how to navigate the menu; it is enough to list the actual functions of the remote control buttons used:
"1" - switching three audio processors to the first input (for example, FM tuner);
"2" - switching three audio processors to the second input (for example, a TV receiver);
"3" - switching three audio processors to the third input (for example, a PC);
"M" - recording all presets into memory;
"SL" - call the main menu;
"P+" - move up the menu;
"R-" - move down the menu; "+" - increase the selected parameter;
"-" - decrease the selected parameter;
"Mute" - turns the sound on and off.

Figure 3

The control unit diagram shown in Fig. 3 is simple and does not require any special explanation. An LCD indicator SC1602EULT-SH-GB with screen dimensions of 106x35 mm (visible part - 99x24 mm), in which the backlight current reaches 750 mA, is used. We can also recommend the SC1602BULT-SH-HS-G indicator with screen dimensions of 71x25 mm (visible part - 65x16 mm). In order not to unnecessarily load the power supply, it was decided to introduce software to turn off the backlight when it is not needed. To smoothly change the backlight, elements VT1, VD1, SZ, R2-R4 are introduced into the device. Resistor R4 should be selected both in terms of resistance and power, or do without it altogether, taking into account the existing indicator. For a large indicator, the power of resistor R4 can reach up to 2 W, for a smaller one - 0.5 W is enough. In addition, transistor VT1 with a current of 750 mA should be used with a heat sink, for example, an aluminum plate measuring 20x30 mm.

The controller's RA0 output can be used to control the "Mute" mode. After turning on the audio system, while the indicator is initializing, memory is being read and greeting is taking place, transient processes in the amplification path end and the RA0 pin is set to a high level, allowing the operation of the amplifiers. This eliminates the characteristic click at the moment of switching on (let me remind you that the TDA7294 microcircuit has pins for controlling the “Mute” and “St-by” modes).

Now about programming the microcontroller. The HEX file does not contain a configuration word (byte), so it must be set in the programmer options: WDT - disabled, PWRTE - enabled, generator type - XT.

In table 1 (located in the archive) presents the codes of the Russified indicator, which will be needed if you need to change the inscriptions displayed on the indicator. Each inscription (Table 2) begins with a specific address and necessarily ends with zero. This limits the number of characters of the replaced inscription. The newly entered inscription must not exceed the number of characters in the one being replaced. For example, let's change the inscription "VOLUME" to "VOLUME". The word "VOLUME" consists of nine characters, and "VOLUME" - of six, so there will be no problems with replacement. According to table. 1, in hexadecimal representation the word “VOLUME” looks like this: 0xA1, 0x50, 0x4F, 0x4D, 0x4B, 0x4F, 0x54, 0x62. The word "VOLUME" is written like this: 0x20, 0x56, 0x4F, 0x4C, 0x55, 0x4D, 0x45, 0x20, 0x20. Codes "0x20" are spaces (see Table 1). We find the EEPROM address from which the inscription begins, in our example it is 0x27, and successively replace it. Once again, I draw your attention to the fact that codes 0x00 in the EEPROM cannot be changed; the program uses them to determine the end of the inscription!

New on the site

>

Most popular