Synchronization of audio, video and lighting is very important in performance. This paper introduces the design scheme of time code distributor based on microcontroller to solve the synchronization problem. The single channel time code generator is transformed into multi-channel time code. The design takes the microprocessor PIC MCU as the core, and mainly consists of the MCU microprocessor, the time code receiving and sending module, the driving circuit of the digital tube and the key scan circuit. The hardware circuit design is simple, the software design is modular, the cost is reduced and the volume is reduced.
At present, the equipment runs steadily in the debugging stage.
In the process of performance programming, a prominent problem is that it is difficult to control the coordination and synchronization among different majors (audio, video, lighting, etc.). A large-scale performance, in the case of relative independence of each major, requires a relatively large team to ensure the smooth arrangement and performance of the performance. In the process of programming, most of the time is spent on professional coordination, and it may be much more time than really focusing on the program. From a technical point of view, the coupling of these units is very low. They can work alone without interacting with each other. The only outstanding link is “time”, that is, when to broadcast something.
From the user’s point of view, the “time” relationship is what they are most concerned about. If the states of these units can be viewed and managed together, users will save a lot of unnecessary trouble. Such as coordinating the synchronization between different units, mutual reference and comparative revision of different professions in program editing, etc. The use of time code allocation equipment will solve the difficult problems of coordination and synchronization among various professions (referring to audio, video, lighting) and reduce the personnel and time of arranging and performing in the performance. PIC MCU is a CMOS MCU, which simplifies instructions to greatly improve its execution efficiency. It has a unique RISC structure, a Harvard bus structure which separates data bus from instruction bus and runs fast. The I/O port of PIC MCU is bidirectional, and its output circuit is CMOS complementary push-pull output circuit. The low-level inhalation current of I/O port reaches 25 mA, which is high. The output current of the level can reach 20 mA. It has the function of on-line debugging and programming (ISP). It also has the characteristics of low operating voltage and low power consumption. The products based on PIC MCU have low power consumption, high quality, low cost and good confidentiality. At the same time, it has abundant internal resources and is widely used in the field of industrial control. There are three kinds of time codes: SMPTE/EBU time code, MIDI time code (MTC) and IEC time code.
SMPTE code is the time code used in NTSC system, while EBU code is the time code used in PAL system.
In these two time code systems, both of them are used in complex video production process. SMPTE is more common in audio. MTC is a time code widely used between MIDI devices. IEC time code is used in R-DAT, which is rarely used. Now we use the time code between devices, that is, the MIDI time code. Here is a brief introduction of the MIDI time code. MIDI time code has two specific functions: one is to convert the general SMPTE time code into the data format specified in MIDI protocol and then distribute it to MIDI devices in MIDI system network; the other is to provide a method of transmitting so-called “set” information, so that the control computer can synchronize the receiving devices at a certain time. 。 MTC exists as a real-time reference standard. It does not send commands such as start and end, and does not change the speed of the music. It provides absolute time reference in minutes and seconds, not in bars and beats. A large number of multi-port MIDI interface devices have SMPTE/EBU time code ports, which are often used to read and write LTC, thermostatic element but it usually needs to be transformed into MTC in order to be accepted by the corresponding computer software. Audio workstation software uses MTC as synchronization benchmark, especially when the workstation adopts the combination of digital audio and MIDI. Multiplexer is a circuit that distributes single input MIDI time code data to 8 output channels. The distributor here is different from the distributor on the market. The distributor on the market refers to the circuit that can transmit one input data to any output terminal of the M output terminals according to the need. The distributor here refers to the circuit that can transmit one input data to the M output terminals and output data at the same time. This device has 8 output channels, which can connect 8 devices with MIDI time code interface at the same time, so that 8 devices can receive MIDI time code data at the same time, so that 8 devices can work synchronously. Hardware design needs to be based on actual needs, control the cost scientifically, reduce the difficulty of development; this study uses 16-bit PIC microcontroller, flexible definition function can adapt to different control requirements. There is no need to add additional IC chips.
In this way, the circuit structure is simple and the development cycle will be greatly shortened. The time code distributor equipment uses external power supply to provide a stable DC 5V voltage. The microprocessor PIC MCU is the core. It mainly consists of the main control module, the time code receiving and sending module, the digital tube driving circuit and the key scan circuit. The main control module mainly uses PIC MCU as the processor of the device, which controls the encoding and decoding of MIDI protocol and other functional modules. Communication and control processing of time code chip, display control of digital tube and processing of key scan are carried out. The receiving and sending module of time code is composed of time code chip, 74HCT 244 and single chip computer. MCU can communicate with time code chips and control their internal registers by configuring interfaces, so as to process the input and output signals of MIDI time codes. It can generate four kinds of time codes with frame rates: 24, 25, 29.9, 30.
By SN74HCT 244DW, the single output signals of time code chips are converted into eight output signals, so as to achieve eight channels. The purpose of synchronous output. The driver circuit of digital tube consists of three I/O ports of 74LS47, 74HC595D and single chip computer. 74HC595D is a shift register, 74LS47 is a display chip driven by digital tube. The MCU can transmit the data to 74HC595D through three I/O ports and output it to QA-QH pin. The output of 74LS47 is controlled by controlling QA-QH pin, thus realizing the display control of digital tube.
Six 74HC595Ds are cascaded to control the output of eight 74LS47, thus realizing the dynamic control of eight-bit digital transistors. The keys are used for various functional settings of the time code allocator, such as source selection, frame rate selection, time setting, time addition, time subtraction, playback/pause and stop functions. The key scan circuit consists of three rows and three columns, which need six I/O ports of single chip computer. Scanning row and column keys to determine which keys are operated, thereby determining the user’s settings. In the process of designing with PIC MCU, the characteristics of PIC MCU are noticed, and the detours can be avoided as far as possible, thus shortening the development cycle. Similarly, the appropriate method in software design can make the whole program run stably, and the use of program space will be reduced, avoiding the Bug in debugging.
In the design of this equipment, the characteristics of PIC MCU are adopted, which greatly simplifies the design circuit, reduces the cost, reduces the volume, and improves the stability and reliability of operation. In use, the problem of coordination and synchronization between different equipments is effectively solved, and the personnel and time for arranging and performing in the performance are also reduced.