Serial Communication Design of TMS320LF2407 DSP Controller
I. Introduction The asynchronous serial port (SCI) embedded in TI's TMS320LF2407 DSP microcontroller supports digital communication between the CPU and other asynchronous peripherals using standard formats. The RS-232 interface allows easy inter-DSP or PC Asynchronous communication between machines. The Serial Peripheral Interface (SPI) is a high-speed synchronous serial input/output (I/O) port that is commonly used for communication between DSP controllers and external devices or other controllers. This design is to carry out data transmission and communication between two DSPs through the SCI module provided by TMS320LF2407. At the same time, the SPI module and I/O port of DSP2407 are used for display and keyboard expansion circuit, so that data can be monitored and sent in real time. The circuit structure of this example is simple and easy to understand, and is very suitable for beginners who are just in contact with DSP, and has good reference value. Two hardware principle design This design mainly consists of two major modules: one is the serial communication module between DSPs: the other is the serial display interface module of DSP and display and keyboard. The hardware principles and software design of each module are described in detail below. 2.1 SPI Peripheral Display Interface Module: SPI is a high speed synchronous serial input/output port that allows a serial bit stream with programmable serial peripheral interface length (1 to 16 bits) for programmable bit transfer The rate is moved in or out of the device. This design uses the SPI port to connect four 74LS164 as the static display interface of the 4-bit LED display. The SPISIMO pin of the LF2407 is used as the data output line, and the SPICLK pin is used as the shift clock pulse. The 74LS164 is a TTL unidirectional 8-bit shift register that enables serial input and parallel output. Among them, A, B (1st and 2nd feet) are serial data input terminals, and the two pins input signals according to logic and operation rules, and can be connected in parallel when using the same input signal. CLK (pin 8) is the clock input that can be connected to the SPICLK terminal of the serial port. 2.2 Serial Communication Interface (SCI) Module: The receiver and transmitter of the SCI module are double buffered, each with its own enable and interrupt flags. Both can work alone or in full duplex mode. SCI uses parity, timeout, and frame error monitoring to ensure accurate data transmission. The two external pins of the SCI, SCITXD (data transmitting end) and SCIRXD (data receiving end), can be used for normal I/O when not used for communication. The SCI has a 16-bit baud rate selection register. Under a 40M crystal oscillator, different baud rates from 76bps to 1875Kbps can be set. Figure 2 shows the serial communication interface circuit of the TMS320LF2407. The circuit uses the RS232-compliant driver chip MAX232 for serial communication. The MAX232 chip features low power, high integration, +5V supply, and two receive and transmit channels. Since the TMS320LF2407 is powered by +3.3V, a level shifting circuit must be added between the MAX232 and TMS320LF2407. The design system uses a diode (1N4007) and three resistors for level shifting. The entire interface circuit is simple and highly reliable. Figure 2 serial communication interface circuit of TMS320LF2407 Three-system software and communication protocol design The software and communication protocol design mainly includes DSP system initialization, SPI initialization, SCI initialization, SCI transmission and reception data, and SPI display data. 3.1 DSP system initialization This part of the program is designed to bring the DSP into normal working condition. The main design steps are shown below.
The DMX console is the central controller for controlling all stage lights and special effects equipment. Almost all equipment needs to be connected to it, and users use it to issue control commands to all equipment. It can be controlled in real time, or the device can be programmed to display specific effects at a fixed time. Even with the stage equipment, the DMX console is also essential, just like there are more soldiers, the commander still needs to give orders to them. There are also many different types controllers to work for different quantity Stage Lights.
DMX Controller, DMX Consule Guangzhou Cheng Wen Photoelectric Technology Co., Ltd. , https://www.ledscreencw.com