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.
Previous article:High performance motor controller ADMC401
Next article:Voice data processing of IP telephony gateway
- 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!
- Rambus Launches Industry's First HBM 4 Controller IP: What Are the Technical Details Behind It?
- 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
- The running light delay is realized by the single-chip timer, and the running light style is changed by external interrupt
- Implementation of a Super-resolution Direction Finding Algorithm for Spatial Spectrum Estimation Based on High-speed DSP Series Processors
- IAR FOR MSP430 V7 simulation problem, please solve
- IR2104 drive circuit HO no waveform
- TI C6000 CodecEngine integrated algorithm core calling principle
- Double 11 development board recommendation: MSP430 LaunchPad
- MCU with LCD control
- Working principle of LM393 voltage comparator
- What is the difference between Linux and Android?
- Xunwei iTOP-i.MX6ULL Development Board-Network Communication-Socket TCP