Design of DSP asynchronous serial communication based on VK3366

Publisher:快乐旅行Latest update time:2014-04-15 Source: EEPWKeywords:VK3366  DSP Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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.

Design of DSP asynchronous serial communication based on VK3366

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.

Design of DSP asynchronous serial communication based on VK3366

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.

Design of DSP asynchronous serial communication based on VK3366

Design of DSP asynchronous serial communication based on VK3366

The specific code is as follows:

Design of DSP asynchronous serial communication based on VK3366

The actual signal processing card circuit board is shown in Figure 5.

Design of DSP asynchronous serial communication based on VK3366

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.

Keywords:VK3366  DSP Reference address:Design of DSP asynchronous serial communication based on VK3366

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

Optimization of speech codec algorithm G.723.1 on DSP
1 Introduction G.723.1 is a low-bit-rate speech coding algorithm standard launched by the organization in 1996. It is also the lowest bit-rate standard among the speech compression standards issued by the organization. G.723.1 is mainly used for compressing speech and other multimedia sound signals. It is c
[Embedded]
A LCD display technology based on DSP
  1 Introduction   With the development of electronic product integration, liquid crystal displays are more widely used in portable instruments to display images or texts.   At the same time, in today's information age, digital image processing technology has increasingly higher requirements for real-time performanc
[Embedded]
DSP filters are used to expand the performance of digital instruments
DSP has many functions in digital measurement systems that are widely used. They can improve the frequency response, phase response, noise performance, bandwidth expansion and other indicators caused by limited sampling rate. The DSP configuration of digital measurement systems (such as digitizers and digital oscill
[Embedded]
DSP filters are used to expand the performance of digital instruments
The design architecture and circuit diagram of the car navigation system are here
The goal of this paper is to develop an inertial navigation system for a wheeled vehicle, which can control the movement of the wheeled vehicle and transmit the data collected by the vehicle through wifi via PC terminal and handheld terminal. The system shown in Figure 1 is built, and TI's floating-point DSP  TMS320F2
[Automotive Electronics]
The design architecture and circuit diagram of the car navigation system are here
Deadbeat control inverter based on DSP
As computers and various precision automation equipment and electronic equipment are widely used in communications, industrial automation control, office automation and other fields , inverters, as an important component of UPS, have developed rapidly in recent years. The control of the inverter has become the focus of
[Embedded]
Design of wireless subsystem based on DSP+FPGA co-processing architecture
You can significantly improve the performance of signal processing functions in wireless systems. How? By taking advantage of the flexibility of the FPGA fabric and the embedded DSP blocks in today's FPGA architecture that benefit from parallel processing. Such processing commonly found in wireless applications inclu
[Embedded]
Design of wireless subsystem based on DSP+FPGA co-processing architecture
How to use the DSP library provided by STM32 for FFT
  A few days ago, because I needed to perform FFT on the collected audio signal on the STM32F103 series processor, I spent some time studying how to implement FFT on the STM32F103 series processor efficiently and accurately. I found a lot of information on this topic online to do experiments and comparisons, and final
[Microcontroller]
How to use the DSP library provided by STM32 for FFT
Bayer format image preprocessing based on FPGA+DSP technology
Real-time processing of high-resolution images has been widely used and developed in the fields of communications, medicine, military, aerospace, information security, etc. In the process of real-time image processing, the lower layer Image preprocessing has a large amount of data and simple calculati
[Security Electronics]
Bayer format image preprocessing based on FPGA+DSP technology
Latest Embedded Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号