With the continuous development of digital signal processing technology and integrated circuit technology, the reliability of digital signal processors is getting higher and higher, and their applications are becoming more and more extensive. In DSP application systems, DSP usually needs to receive control signals from the host computer or communicate with the lower computer. The most common way is to use asynchronous serial interface RS 232 or RS4 22 to achieve this. The signal acquisition module in this article uses TMS320C6713B chip as an example, but there is no integrated UART interface, so an asynchronous serial communication chip is expanded or McBSP is configured to achieve high-speed asynchronous communication with other serial devices. This article chooses the asynchronous serial port expansion chip VK3366 for expansion.
1 Data Acquisition Hardware System Design
The data acquisition circuit system mainly includes: data signal processing TMS320C6713B subsystem, AIC32 audio acquisition circuit subsystem and asynchronous serial port expansion chip VK3366 system, etc. Its logic block diagram is shown in Figure 1. The audio acquisition circuit subsystem is responsible for collecting external voice signals, the digital signal processor TMS320C6713B subsystem performs signal processing of the collected data, and the VK3366 subsystem is responsible for system interface expansion for data transmission.
1.1 Digital Signal Processor Subsystem
TMS320C6713B (C6713 for short) is a 32-bit floating-point high-speed digital processor DSP launched by Texas Instruments (TI) in the United States. It can achieve 1 800 MIPS/2 400 MFLOPS of fixed-point and floating-point operations at a clock frequency of 300 MHz, which greatly meets the signal processing speed requirements of high-speed data acquisition and real-time control systems. It adopts a 2-level cache structure and has a total of 264K×8 b memory on the chip. C6713 has a wealth of on-chip peripherals and has been widely used in image processing, digital signal processing, and automatic control. The McASP interface can expand the audio chip, and the 32 b external memory interface (EMIF) can connect asynchronous devices and external memory devices, and can address 512 MB of off-chip storage space. The rich peripheral interfaces meet the requirements of this design.
1.2 Basic features of UART chip VK3366
The asynchronous serial port expansion chip VK3366 is the industry's first 4-channel UART expansion device with I2C/UART/SPI/8-bit parallel bus interface developed by Chengdu Weiken Technology. The chip has good application effects in communication systems and other occasions with high real-time requirements. The UART of its extended sub-channel has the following functional features: the baud rate, word length, and check format of each sub-channel UART are independently set, providing a maximum communication rate of 1 Mb/s. Each sub-channel independently sets the working mode, including IrDA infrared communication, RS 485 automatic transceiver control, 9-bit network address automatic identification, software/hardware automatic flow control and broadcast reception and other advanced working modes. Each sub-channel has an independent 16 BYTE FIFO for transceiver and receiver, and the interrupt of the FIFO is a 4-level programmable conditional trigger point. Provide a modem control signal for a sub-channel. There is no need to use the address line to control the serial port expansion method, but to achieve multi-serial port expansion through the built-in protocol processor of the chip to reduce the number of C6713 general I/Os used and reduce the difficulty of system wiring. This design uses mode selection to enable VK3366 to realize the function of converting between an 8-bit parallel data bus and a 4-channel UART serial bus data communication.
1.3 VK3366 Communication Interface Hardware Design
The 2-way SPI and I2C interfaces of C6713B in the data acquisition circuit module have been used by other interfaces, so the external memory (EMIF) interface of C6713 is selected to implement 4-channel UART serial bus data expansion.
The 32-bit EMIF interface of C6713 is used to expand peripheral asynchronous devices. The EMIF interface includes data lines, address lines, read/write control signals, chip select space, etc. The EMIF on C6713 provides a total of 4 peripheral chip select spaces CE[3:0].
The UART chip VK3366 is powered by a 3.3 V power supply, which allows the VK3366 to be directly connected to the EMIF of the C6713B without connecting an additional level conversion chip, saving space. The VK3366 selection signal CS is directly connected to the CE3 of the C6713B, and the read/write signals WR and RD are directly connected to the ARE and AWE of the C6713B, thereby allocating the system address 0xB0000000~0xBFFFFFFF to the VK3366 chip, so that the VK3366 register can be read/written according to the unified addressing.
The M0 and M1 pins of VK3366 are connected to high level and ground [1:0] respectively, that is, the main interface of VK3366 is set to the working mode of converting between 8-bit parallel data bus mode and 4-channel UART serial bus data communication mode. The reset pin is connected to the 3.3 V power supply through a pull-up resistor, and the pin is kept at a high level at ordinary times. In order to ensure the reliability of reset, the reset signal time must be maintained for more than 20 ms. The interrupt pin is connected to the 3.3 V power supply through a pull-up resistor and maintained at a high level. When a global interrupt occurs, the pin signal becomes a low level. The interrupt signal pin of VK3366 is connected to INT5 of C6713.
The 8-bit parallel port command and data of VK3366 share the 8-bit address bus, which is switched through its A0 (data/control) signal pin. The selection of the 4 sub-channels is controlled by the command word, which only occupies 2 address spaces in the system, and no additional channel indication signal line is required. In the circuit designed in this paper, the general I/O port GP11 pin of C6713 is connected to the A0 pin of VK336 to control the data/address selection. The VK3366 expansion module uses an 11.059 2 MHz crystal oscillator. The 4 sub-serial ports of VK3366 are respectively connected to the voice module, GPS positioning module, wireless communication module and handheld display device. The specific module circuit connection is shown in Figure 2.
2 VK3366 Asynchronous Communication Software Design
The VK3366 asynchronous communication software design mainly includes DSP initialization, main function, VK3366 initialization and data sending/receiving. As a high-level language, C language has the advantages of clarity, maintainability, portability, and versatility, especially for easier algorithm writing. Therefore, this paper uses C language for software design under the TI company CCS 3.3 compilation environment.
2.1 DSP Initialization
After C6713 is powered on, the DSP's EMIF must be configured first.
This design uses CE3 as the chip select of VK3366. The code is as follows:
*(int *)EMIF_CE3 = 0xffffff03;
That is, set the CE3 part to 8-bit data format extension, and then configure the phase-locked loop PLL register to generate different clocks in different parts, such as DSP core, internal peripheral control and external memory interface.
2.2 VK3366 Initialization
VK3366 initialization mainly includes the following two parts:
(1) VK3366 reset
VK3366 is reset at low level. During or after reset, each slave serial port is in a state of prohibiting sending and receiving. The reset process of VK3366 is achieved by connecting external resistors and capacitors after power-on.
(2) Sub-serial port configuration
C6713B first selects the register address through the GP11 port, and then configures VK3366 through the interface global control register.
The registers of VK3366 are 6-bit address numbers, ranging from 000000 to 111111, including 7 global registers and 10 slave serial port registers.
In order to achieve accurate control of VK3366 by DSPTMS320c6713, the corresponding registers of VK3366 should be configured. At the same time, the write timing of VK3366 should be strictly followed, as shown in Figure 3. The read timing is shown in Figure 4.
The specific code is as follows:
The actual signal processing card circuit board is shown in Figure 5.
3 Conclusion
This article mainly describes the design and implementation of a serial port card based on the asynchronous serial port chip VK3366 to expand C6713. The driver of VK3366 is written in C language and compiled on the CCS3.3 compiler to realize the serial port expansion of C6713. This design has been applied in actual projects and provides a new transmission method and approach for DSP to expand serial port communication.
Previous article:Design of a high-frequency and high-voltage power supply for electrostatic precipitator based on DSP
Next article:Experts share their FPGA design experience
Recommended ReadingLatest update time:2024-11-16 14:29
- Popular Resources
- Popular amplifiers
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- EEWORLD University ---- RT-Thread Studio
- Invite you to make an appointment for TI live broadcast: Analysis of the classic and innovative TI ultrasonic gas flow meter solution + the latest SimpleLink platform wireless products
- Wireless charging solution "XS016 fully integrated MCU + micro IPM architecture"
- TI Industrial Month Reading Check-in Plan Three lucky draw opportunities are waiting for you~
- There is a section of LCD code in the atomic stm32f1 tutorial that is not clear, please help me take a look
- GD32E231 DIY Competition (1)——KEIL platform built
- 2019 Altium "Mobile Weekend Lab Class" Free Tickets- Shanghai Station
- EEWORLD University - Common techniques for designing low-power DC-DC converters
- 【DFRobot wireless communication module】Hardware analysis
- Popular Science: Why is the PPS charger not compatible with laptop batteries?