Design of a new type of video character overlay

Publisher:巳午未Latest update time:2006-05-07 Source: 电子技术应用 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

    Abstract: This paper proposes a design scheme for a new type of video character overlay, which uses the RS-485 bus method and a microcomputer as the control platform to realize the superposition of any characters in video images. This scheme has been applied to multimedia surveillance systems.

    Keywords: multimedia surveillance system character overlay RS-485 serial communication

In a multimedia surveillance system, there are many video signals being switched, and it is difficult for the operator to quickly identify where a certain image comes from. Therefore, location information, such as cameras or place names in Chinese characters, need to be superimposed on the image. Most of the existing surveillance systems can only superimpose limited Chinese characters, which have a narrow application range and poor versatility. This article proposes a new video character overlay scheme. It uses a microcomputer as the control host and adopts the RS-485 serial communication protocol. It can superimpose arbitrary characters on the video signal without changing any hardware circuits. , change the characters as needed.

1 Video character overlay design scheme

Since the RS-485 bus has the characteristics of long transmission distance and can connect up to 256 terminals using only ordinary twisted pairs, this solution uses the RS-485 bus, using a microcomputer as the control host and 16 AT89C52 microcontrollers as Slave machine. The host transmits the dot matrix data and control signals of the characters to be superimposed to each slave machine in real time. The microcontroller receives the character dot matrix data and stores it in the character memory, thereby realizing the superposition of any characters. At the same time, the microcontroller also receives control information sent from the host to control the displayed character attributes (such as color, size, etc.). The RS-232 serial port of the host computer is converted into an RS-485 digital signal bus through a heterodyne RS-232/RS-485 converter. The serial port of the microcontroller is converted into the RS-485 protocol through the MAX1483 chip. Serial communication is carried out between the microcomputer and the microcontroller through the RS-485 digital signal bus. The system schematic diagram is shown in Figure 1.

2 Introduction to OSD chip

OSD (On Screen Display) special integrated circuit chip is specially designed for displaying characters on the screen. The MB90092 selected in this solution is an OSD chip produced by FUJITSU. It can be used with various microcontrollers to design character overlays and is easy to use.

2.1 Main features of OSD chip

·The number of displayed characters is 12 rows and 24 columns, a total of 288 characters;

·Can display up to 8192 characters;

·There are 5 types of character sizes;

·There are 8 character colors: black, blue, green, cyan, red, brown, yellow, and white;

·Character background colors include black, blue, green, cyan, red, brown, yellow, and white;

·Character background display methods: 3 types;

·Character dot matrix: 24 (horizontal) × 32 (vertical) points;

·Display position control: horizontal, vertical, and line spacing are adjustable;

·Flash: Two flashing states, ON/OFF, can be selected. The flicker ratio is 1:1, the flicker ratio is 1:1, and the flicker frequency can be selected from 1Hz, 2Hz, and 0.5Hz;

·Video format: NTSC/PAL;

·Can be directly interfaced with the microcontroller, with an 8-bit serial input interface;

·Package form: QFP-80

2.2 Internal functional structure of OSD chip

MB90092 is composed of seven main parts: serial input control unit, synchronous separation circuit, video signal generator, VRAM, external character memory control unit, analog switch and clock oscillator. Its internal functional structure block diagram is shown in Figure 2.

2.3 Programming commands

The control command of MB90092 is a double-byte command in the form of 8-bit serial input. The microcontroller controls MB90092 through CS, SCLK and SIN. The control commands are mainly to set the internal VRAM and registers, including setting the characters to be displayed, the color of the characters and character background scenery, character size, synchronization method, screen background color, video signal format and character display position, etc.

3 Hardware design of character display module

The hardware circuit of the character display module is shown in Figure 3. MB90092 requires an external character memory, which stores the dot matrix (24×32 dot matrix) of characters to be superimposed that can be recognized by MB90092. According to the command sent by the machine, MB90092 automatically sends the read signal READ, reads the dot matrix in the character memory and displayed on the screen. Since the location of the monitoring site may change, it is required that the character dot matrix stored in the character memory can also change accordingly, so an electrically erasable memory Flash Memory is selected. Its biggest advantage is that it supports online programming, allowing the chip to perform curing and erasing operations without leaving the circuit board. It can be repeatedly erased and written more than 100,000 times, and the stored data will not be lost when power is turned off, so it can be guaranteed to be stored in the The character matrix can be changed as needed and will not be lost.

The dot matrix of characters to be superimposed is transmitted from the microcomputer to the microcontroller through the serial port, and then transmitted to the character memory by the microcontroller. There is a problem in this. Since the data bus, address bus and read and write signal lines of the microcontroller, MB90092 and character memory Flash Memory are all connected together, bus conflicts will occur during use. To solve this problem, an isolation circuit is added to the design to isolate them. When the microcontroller transmits the dot matrix to the character memory, set the data line, address line and read signal line of MB90092 to high impedance to ensure that the microcontroller transmits the dot matrix correctly; when the character memory transmits the dot matrix to MB90092, the data of the microcontroller Lines, address lines, and read and write signal lines are set to high impedance to ensure that MB90092 reads the dot matrix correctly.

The capacity of the character memory Flash Momory is 256K, but using the 16-bit address line of the microcontroller 89C52, it can only address 64K bytes of memory. Therefore, the highest two addresses of the Flash Momory are connected to the output terminals P1.0 and 89C52 of the 89C52. The method on P1.1. This actually divides the 256K-byte Flash Momory into four parts, each part is 64K bytes, and transmits data to each part in turn.

In addition, an external synchronization separation circuit is required to send the horizontal and vertical synchronization signals of the input video signal to the MB90092 to ensure the synchronization of the video signal and character information. After the input composite video signal is converted from 1Vp-p (peak-to-peak) to 2Vp-p (peak-to-peak) through the video amplification phone, it is then sent to the video signal input terminal of MB90092, and the voltage output from the video signal output terminal of MB90092 The composite video signal with a voltage of 2Vp-p (peak-to-peak) must be converted into a voltage of 1Vp-p (peak-to-peak) before being sent to the display device.

4 Software design of video character overlay

The software mainly includes system reset initialization module, serial communication module and character display module. Since the key technology of this solution is to realize the superposition of any characters by transmitting the dot matrix data of the characters to be superimposed from the host to each slave, the serial communication module is the core of the entire software.

The task of the serial communication program is to transmit the 256K character lattice data from the microcomputer to the microcontroller. It includes two aspects: on the one hand, the communication program of the 89C52 microcontroller, and on the other hand, the communication program of the PC. The serial communication program of the PC host is programmed using Visual Basic (VB for short), and the program block diagram is shown in Figure 4. Use MSCOMM, a communication control with powerful functions provided by VB, to set the data transmission and reception of serial communication, and set the status of the serial port and the information format and protocol of the serial communication.

The single-chip computer 89C52 is programmed using the assembly language of the MCS51 series, and the program block diagram is shown in Figure 5. Its data communication is completed by the serial port. Timer 1 is used as a baud rate generator, its working mode is set to mode 2, and the serial port is set to working mode 1. Each single-chip computer in the system is given a certain address code. When the address code of a single-chip computer is the same as the address code sent by the PC host, this single-chip computer sends a response signal to the PC, and other unaddressed single-chip computers No response signal is sent. Therefore, at a certain moment, the PC communicates with only one microcontroller, fundamentally avoiding competition on the communication bus.

This article proposes a solution to the shortcomings of most current character overlays that display a limited number of characters that cannot be changed, and enables the superposition of any characters in video images. This solution has been successfully applied in multimedia surveillance systems, and the equipment operates stably and has good performance.

Reference address:Design of a new type of video character overlay

Previous article:High performance motor controller ADMC401
Next article:Voice data processing of IP telephony gateway

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号