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.

TMS320LF2407 DSP控制器的串行通信设计

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.

TMS320LF2407 DSP控制器的串行通信设计

Solar energy is a new kind of clean energy, solar panels is born v effect using light convert sunlight directly into electricity of semiconductor devices, then assembled into a different voltage, current and power device, so as to enable us to get (obtain) new energy, solar panels are widely used in space technology, station, AIDS to navigation, home appliances and other power shortage in remote areas without electricity, which are due to the low cost of crystalline silicon cells become the mainstream of commercial product.
But the existing solar panels, mostly can't fold, making solar panels covering an area of big, cannot make full use of space, the utilization of solar energy is also very low, cannot satisfy the needs of people at present stage, and USES the manual rotation, so time-consuming, laborious and install and use up is very inconvenient, bring us a lot of trouble. So the FIZZ GLOBAL designed a new kind of foldable solar panel that solved our current problem.

Folding Solar Panel

Folding Solar Panel,Solar Folding Panels,Customizable Solar Folding Panels,Small Solar Folding Panel

ZHEJIANG FIZZ NEW ENERGY CO.,LTD , http://www.ywfizz.com