introduction

Large-scale programmable logic devices CPLD and FPGA are the two most widely used types of programmable logic devices today. Electronic design engineers can use it to design the special chips and special products they need in the office or laboratory, thereby greatly shortening the product. Time to market reduces development costs. In addition, the programmable logic device also has the characteristics of static repeatable programming and dynamic reconfiguration in the system, so that the functions of the hardware can be modified by programming like software, which greatly improves the flexibility and versatility of electronic system design .

1 Working principle

MIDI music is a kind of synthetic music under Windows. Because it records a piece of music by notation, it can greatly reduce the storage capacity compared to wave music. The basic principle of MIDI music: the frequency value (tone) and the duration (tone length) of each note making up the music are two basic data that the music can play continuously, so as long as the frequency of the excitation signal output to the speaker is controlled High and low and the duration of each frequency signal can make the speaker emit continuous music.

Figure 1 is a functional block diagram of the music player designed in this article. The music encoder stores the preset codes of four songs. By changing the state of the music selection switch, it is possible to decide which music is to be played. The music encoder controls the tone generator and the flashing light controller. Whenever the music rhythm clock sends a clock pulse to the music encoder, the music encoder sends the encoding of the currently played note to the tone generator and the lantern Flash the controller. The tone generator divides the 2MHz reference clock according to the frequency division coefficient corresponding to the code to obtain a pulse corresponding to the frequency of the current note to be played, and then uses this pulse to excite the speaker to obtain the sound of the note. The flashing controller of the colored lights sends the colored lights corresponding to the currently played note to the colored lights according to the code.

Among them, the three functions of tone generator, music encoder, and color light controller can be completed by ALTERA's programmable logic device (CPLD) EPF10LC84-4 chip, using VHDL language [1-3]. Audio amplifiers, colored lights, and various clocks can be realized by specific peripheral circuits.

2. Design of MIDI music generator chip

The key of this design is to accurately generate the frequency signal corresponding to each note in the music, and output it according to the beat according to the requirements of the music. In order to reduce the complexity of the system, this design changes the preset number of the counter regularly according to the requirements of the music according to the principle of the variable modulus counter, so that the frequency signal required by the music can be generated. The principle block diagram of the chip is shown in Figure 2. The chip is designed in the MUXPLUS II environment using VHDL hardware description language.

\

The beat control circuit in the figure generates the beat timing signal; the note generation circuit generates the notes required for the music according to the beat requirements; the pre-number generation circuit is controlled by the note, generates the preset number corresponding to the note frequency, and sends the counter to the data input end. The note frequency generator generates corresponding frequency signals according to different preset numbers, thereby completing the performance function of the music.

3 peripheral circuit design

3.1 Music rhythm clock and colorful lights flashing rhythm clock generation circuit

The music rhythm clock we need is a clock pulse of about 4Hz, and its frequency is very low, which can be generated by using a multivibrator composed of a 555 timer, as shown in Figure 3.

The 555 integrated timer is a hybrid integrated circuit that cleverly combines analog functions and logic functions. The multivibrator circuit diagram formed by the 555 timer is shown in Figure 3, and the calculation formula of the pulse frequency output by pin 3 is:

Changing the resistance of the variable resistor can change the output frequency. We require the output frequency to be 4Hz and C = 47Uf, so R1 + R2 should be 7.66K.

The music rhythm clock is very important to the entire music player. It is required that the music rhythm clock pulse is very stable, so as to ensure the smooth playback of music, otherwise it will be a messy sound, not music but noise. In order to make the output pulse more stable and reduce external interference, the output pulse is sent to the CPLD chip after the D flip-flop (7474), so the pulse frequency output by the 555 timer pin should be doubled (ie 8Hz), so R1 The resistance of + R2 should be 3.83K.

The flashing rhythm clock generating circuit of the colored lights has the same principle as the music rhythm clock generating circuit, and is also realized by a multivibrator composed of 555 timers, but the frequency of the colored lights controlling clock generating circuit is higher than that of the music rhythm clock generating circuit. In the range of dozens to tens of hertz, its R2 value is indefinite, and it can be determined according to its own requirements. If you want the color lights to flash faster, the frequency will be higher, and if you want to blink slowly, the frequency will be lower.

7g Taper Color Candle also called Color Spiral Taper Candle , it is colorful and unscented,materails of Unscented Color Taper Candle is 100%paraffin waxn .also the proprotion of materails can be to your order. we make sure it is high quality with fast shipment .  Color Spiral Taper Candle 's melting point is 58-60degree. if goods delivery to your country , Unscented Color Taper Candle not easily deformed. it have six colors. such as red ,green,blue,yellow,organe. red candle called Red Color Taper Candle.  Brand can do your own brand . 

Welcome to new and old customer to inquiry and order .we always online waiting your repoponse. all the clients are our important person.



 

 


7G Taper Color Candle

7G Taper Color Candle,Color Spiral Taper Candle,Red Color Taper Candle,Unscented Color Taper Candle

Shijiazhuang Zhongya Candle Co,. Ltd. , https://www.zycandlefactory.com