Audio and video acquisition system based on MPC5200

Publisher:TranquilVibesLatest update time:2012-11-29 Source: 21icKeywords:MPC5200 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

introduction

Video surveillance system is an important part of security system. In the domestic and foreign markets, the main applications are analog and digital video surveillance systems controlled by digital signals. The former technology has gone through two stages: microprocessor-based video switching control plus PC multimedia management type and PC-based switching, control and multimedia management of matrix host; the latter technology has gone through two stages: digital surveillance recording system and embedded video Web server mode. At present, the video surveillance system is in the stage of mixed application of numerical control analog system and digital system, and will gradually transition to digital system. In the future, the two characteristics of video surveillance development are digitization and networking.

Hardware Design of Audio and Video Acquisition System Based on MPC5200

MPC5200 Overview

MPC5200 integrates a high-performance 603eG2_LE core and an input/output subsystem with a DMA unit. Therefore, MPC5200 can respond to external interrupts independently of the 603eG2_LE core and provide low-level peripheral management, protocol processing, and external data movement functions.

MPC5200 supports dual peripheral bus structure, including: SDRAM bus; multi-function LocalPlus bus.

Embedded 603eG2_LE core: This core is a PowerPC superscalar architecture. The MPC5200 has 16KB of instruction cache, 16KB of data cache, a floating-point unit, a data buffer memory management unit, an instruction buffer memory management unit, critical interrupts, and an MMU with an additional 16 registers and 1KB of page management.

Bestcomm input/output subsystem: including programmable serial controller, 10/100M Ethernet controller, universal serial bus, I2C interface, serial peripheral interface, MSCAN interface.

System Interface Unit (SIU): Integrates the most common system interfaces and signals, namely chip select signals, interrupt controllers, counters, common input/output ports, and real-time clock.

SDRAM controller and LocalPlus bus: MPC5200 has a high-speed SDRAM controller that supports single data rate and double data rate SDRAM devices, with a maximum operating frequency of 132MHz and 32-bit data lines. The LocalPlus bus is used to connect BOOTROM, SRAM, Flash, peripheral devices, ATA and PCI devices, and has two operating modes: non-multiplexed data access mode and multiplexed data access mode.

Overall Design

The audio and video acquisition and processing system based on MPC5200 realizes the functions of 4-channel audio and video acquisition and composite, MPEG-4 compression, local storage of hard disk, network transmission, etc. The system mainly includes audio and video acquisition and composite compression, MPC5200 basic system, hard disk storage and network interface. The system completes MPEG-4 compression of 4-channel audio and video through the audio and video acquisition and composite compression module. The compressed MPEG-4 data is stored in the local hard disk through the ATA interface provided by the system, and the network transmission of data is realized by using the Ethernet interface provided by the system.

The hardware structure of the audio and video acquisition and processing system based on MPC5200 is shown in Figure 1. In addition to MPC5200, the design description of each module is as follows:

Figure 1 Hardware structure of audio and video acquisition and processing system based on MPC5200

5V conversion logic and pin allocation for USB and Ethernet: Since the ATA and CAN interfaces in this design are 5V and the MPC5200 is 3.3V, it is necessary to add a 5V conversion device 74LVXC3245 when connecting. In the pin allocation of USB and Ethernet, considering the scalability of system functions, an external SN74CBTLV3384 switch chip is used to make these pins work as ordinary input/output ports.

Audio and video acquisition composite compression: 4-channel SAA7114 completes video acquisition, each video is 8-bit data, and 4-channel audio acquisition is completed through 2 MC4558s and 1 IDT821024. 4-channel video and 4-channel audio are converted into 1 16-bit video data and 1 audio data required by IME6400 through 1 FPGA model XC2S200-PQ208. IME6400 is a chip that supports the MPEG-4 standard. Both FPGA and IME6400 need to be connected to 32MB SDRAM (model K4S643232C) to complete the buffering and storage of audio and video data. The connection between IME6400 and MPC5200 adopts synchronous burst mode 1, and IME6400 is uniformly addressed as an external device of MPC5200. This design connects A[1:5] to the address line Ha[0:4] of IME6400 and uses 74LVXC3245 to convert A[6:21] into the data line Hd[0:15] of IME6400.

Hard disk storage and network interface: MPC5200 has its own ATA controller. The ATA interface of this design is 5V. CS4 and CS5 of LocalPlus bus correspond to CS0 and CS1 of ATA respectively. 74LVXC3245 is used to convert A[0:15] into ATA data signal line ATA_5V_DD[0:15], and A[16:18] into ATA address signal line ATA_5V_DA[0:2]. MPC5200 has its own Ethernet controller, which provides RJ45 Ethernet interface by connecting LXT971.

The basic system of MPC5200 is composed of 8MB Flash with 24-bit address/8-bit data (the chip select and read/write logic generated by 74LVT04 and 74LVT32 can expand the Flash to 16MB, 64MB MT48LC16M16A2 with 13-bit address/32-bit data, and PSC1 port realizes RS-232 function through MAX3233E.

Rich expansion interface: MPC5200 has a PCI controller, providing a 33MHz, 32-bit, 3.3V PCI connector, so that you can connect a mature, PCI-based 3.3V or 3.3V/5V compatible video capture card in the system. MPC5200 has a USB controller, and the USB interface is expanded through the external power management chip MIC2025 and the USB transceiver chip ISP1107DH, which makes it convenient for users to extract and save important data in the monitoring system. MPC5200 has a CAN controller, which can provide a CAN interface through an external TJA1050T, so that the system can be easily connected to a system based on the CAN bus. The PSC3 of the MPC5200 system can be used as a common input/output port, so that it is convenient to access external switch quantities. This system includes two switch input quantities and two switch output quantities; MPC5200 connects to the 256B E2PROM (PCF8582C) through the I2C interface, and saves serial port baud rate, IP address, MAC address and other information in the E2PROM.

Figure 2 Overall software block diagram

In this system, the audio acquisition clock is 2.048MHz, the video acquisition clock is 24.576MHz, the clock of FPGA and IME6400 is 27MHz, the clock of MPC5200 is 33MHz, the core frequency is 264MHz, the clock of RTC is 32.768KHz, and the clock of Ethernet LXT971 is 25MHz.

Software Design of Audio and Video Acquisition System Based on MPC5200

The block diagram of the system software is shown in Figure 2. It includes PPCBoot, kernel initialization, system call function and capture function, device driver and file system.

Driver design

System call: When a system call occurs, the parameters are placed on the stack and a trap handler is called. The operating system also takes the parameters from the stack and calls the trap handler, and then completes the relevant work based on the parameters.

Calling peripheral device hardware processing functions: Programs for peripheral devices are placed in the device driver module. For the kernel, calling the device driver module can only be done through some interface functions. In actual applications, it is necessary to establish communication between user programs and these programs. [page]

The Linux operating system uses the file system to complete the communication between the device driver module and the user application. The device driver looks more like an ordinary file, and the user can open, close, read and write it. The operating system will analyze the objects of such operations and map them to the relevant device driver code. |

File Operations

super_block{

super_operations;/*pointer structure*/

inode_operations;/*File node operations*/

file_operations;/*File operations*/

}

The driver you write yourself registers your own file_operations structure in VFS.

Hardware drivers are divided into character device modules, block device modules and network interface modules.

The following uses IME6400 as an example to illustrate the design of the driver: The IME6400 driver is treated as a character device module. The usage is as follows:

InsmodIME6400. o

Fd=open("/dev/IME6400", O_RDWR);

…. ;/*Use IME6400*/

close(fd)

rmmodIME6400

The driver of IME6400 provides the following functions: IME6400_open, IME6400_read, IME6400_ioctl, IME6400_release, IME6400_init, IME6400_exit, IME6400_interrupt, IME6400_reset, IME6400_download, IME6400_boot, queue_init, queue_empty, get_queue_len, update_queue, queue_to_user, Write32, Read32. Each function has a corresponding parsed implementation of the relevant function.

Application Design

First, the Dserver process reads media data from IME6400, and when the data is a full frame, puts the data on the queue. Then the Dsend process is executed, and the Cserver process receives and processes the request from PCviewer to determine whether the hard disk storage or network transmission is completed.

System Application

The images generated by the system are transmitted using the standard TCP/IP protocol, which makes it particularly suitable for use in remote video surveillance environments across network segments and with routers. Real-time monitoring and viewing of remote sites can be achieved through client software, and cameras and PTZ can be remotely controlled. This can also be achieved by downloading special plug-ins through Internet Explorer, which enhances the versatility of the system. The system uses MPEG-4 encoding to greatly improve encoding efficiency, allowing longer recording time under the same hard disk capacity conditions. The software can flexibly and conveniently retrieve and playback historical videos and perform multi-screen patrol operations. The software also provides some other flexible management and configuration functions.

Conclusion

This paper introduces the implementation of an embedded audio and video acquisition system based on MPC5200, from both hardware and software aspects. In terms of hardware, the hardware structure of the system and the basic characteristics of MPC5200 as the main processor are emphasized, and in terms of software, the design of drivers and applications is emphasized.

Keywords:MPC5200 Reference address:Audio and video acquisition system based on MPC5200

Previous article:How to write low-level drivers based on LCD timing diagrams
Next article:Design of Simulating Home Gateway Using SX52 Single Chip Microcomputer

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
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号