The flicker of light is controlled by various characteristic elements of automobile sound, in which the single chip computer is the main controller to control the modern automobile sound light. MCU belongs to a kind of controller, which is mainly used as a microprocessor. It contains basic hardware and software resources, so it can be used in modern automotive sound and light control.
By applying and improving some control software and methods of other music lights, a scheme suitable for single-chip computer is designed to promote the perfect control of sound and light of automobile audio lights. Audio lighting is a comprehensive situation, which is composed of computer controlled light, sound and combination, producing different colors, shapes and music rhythm. With the beating of music and the flashing of light, there is a certain interaction between music and light.
However, thermostatic element there are two problems in audio lighting: one is how to connect music and lighting; the other is how to synchronize music and lighting. Here the system solves the above two problems by taking the following measures. In the system design, the single chip computer is used as the main controller to realize the integration of sound and light. Firstly, the new music should be analyzed, and the following musical characteristics should be obtained. The time difference between the current event and the previous event, the speed of the music, the current pronunciation name, the intensity of the current pronunciation, the current pronunciation channel and the tone color of each channel should be counted. These data can be listed as channel timbre tables and event tables, and then stored in files as basic information for lighting control. Combining the obtained music characteristic data with the basic flicker Library of light, the light file is formed, and then the control type execution mechanism can be output. The amplification of the signal process output by the single chip computer can push the electronic switch or relay, and the solenoid valve on the lamp can be controlled by it to control the switch of the headlamp.
The light and shade of the lamp change with the change of music, forming the connection between good music and light. The playback program of automobile audio based on MCU is to set up MIDI player module in the system, so that the MIDI music characteristic files stored in a single-row machine can be transmitted to the MIDI player, and finally start the MIDI player to play music. Usually, there is a certain time delay in the transmission of music to light and there is a visual delay in the flicker of light. For the above two cases, the following two solutions can be used.
The solution to the former is to start the controlled light first, and after a period of time, start playing music to achieve the synchronization of sensory music and light. The solution to the latter is to first calculate the value of each audio-visual delay, and to recalculate the schedule of each action, get the light file, the problem of audio-visual delay can be solved. Through the above two methods, the problem of synchronization of music and lighting can be well solved. Because light control and music playing are two independent systems, only music playing smoothly can meet the needs of sound quality. Usually, MIDI files can be input into the system by using the U-disk host system module in the system. In the system, FAT system is usually used to manage files, so U-disk can access files directly through PC to provide MIDI files to the system. At present, the existing system includes MIDI player module, light control module and USB reader module. But if we want to realize man-machine conversation, these are not enough.
On this basis, we need to equip the system with display module and keyboard. In order to control the output of various state parameters. Therefore, the MCU provides P1 port for the light control module, among which P1.
2-P1.7 is used for contacting the digital quantity and controlling the solenoid valve, and P1.0-P1.1 is used for controlling the frequency converter through the digital potentiometer. Q96400 is adopted by MIDI player module as its sound source module.
QS6400 usually supports playing files in MIDI format. It can decode 47 percussion music and 128 timbres to play music.
QS6400 includes one bit address data selection line, eight bit data line, one chip selection signal and three control signal lines (IRQB packet request signal, RDB read operation and WRB write operation). The multiplexing line of 8-bit data line/address line is selected by P0 port, the interrupt mode of external interrupt source 0 can be transmitted by IRQB data package, and the interrupt requester can use P3.
2 and INTO.
WRB and RDB terminals connected to QS6400 can use P3.6, WR, and P3.
7, RD, respectively. The CSB and AS20 terminals of QS6400 can be used to ground the address wire. P 0 and P 2 buses are occupied by MIDI player module, one of which is external interrupt source RD, WR and INT0 control line. By connecting CH375 chip, the USB read-in module can be realized. The universal interface chip of USB is CH375, which not only has built-in firmware of special communication protocol, but also can be used to deal with mass storage devices. The subroutine library supporting FAT management can also be provided by CH375. Through the subroutine library, the single chip computer can read and write the file data in the U disk directly. If sublibraries are to be used, the USB reader module requires more than 600 bytes of RAM and 4 KB of program space. The system can also provide man-machine dialogue system. The system can communicate with 7279A through serial port, promote the establishment of display module and keyboard, and realize man-machine conversation. In conclusion, to form an independent lighting control system, only by equipping MIDI player module, USB reader module, keyboard, display module and lighting control module. MIDI playback module realizes MIDI music playback through Q56400, and communicates with MCS-51 by interruption.
To use QS6400, initialize QS6400 first. Through the initial work of MCS-51, this work can be realized. USB read-write module transmits MIDI files to MCS-51 through CH375, and communicates with MCS-51 by interruption.
The light control module can produce light MCS-51 using water-type file, and the output control light can pass through P1 port. In the keyboard display, the human-computer interaction function has been completed, and the realization of the human-computer interaction function has been promoted through lighting control, MIDI playback and MIDI file input. In the initialization program, the internal resources of QS6400, CH375, X9221, 7279A and MCS-51 (serial port, interrupt system, timer system, etc.
) can be initialized to reset the relevant parameters and initialize to the original value.