Design of wireless real-time QQVGA video and shooting system[Copy link]
At present, most wireless RF chips are used to transmit control signals or static images. The data throughput is not large, and the high data transmission rate of RF chips is generally not fully utilized. With the improvement of semiconductor manufacturing technology, RF chips with Mbps-level air data transmission rates and low power consumption have emerged, making it possible to continuously transmit multiple images. In addition, wireless communication technology is developing rapidly, and people are no longer satisfied with the wireless transmission of audio and images. The demand for wireless video has also begun to emerge. Therefore, video systems using high-speed RF chips will be a major hot spot in future digital wireless communications. For digital video (actually containing multiple images per second), various display standards have been formulated internationally, such as QCIF (176×144), QQVGA (160×120), QVGA (320×240), CTF (352×288), VGA (640×480), SXGA (1 280×1 024), etc. At present, wireless transmission of high-resolution video is not technically realistic and unnecessary, because high resolution means a large area of display material. Usually, only a certain display area is required in portable wireless communication devices, so low-resolution QCIF and QQVGA are most popular in camera phones, digital cameras, PDAs and other devices. This wireless system is a video communication system based on a high-speed RF chip, and has an instant shooting function; in video (continuous) mode, QQVGA resolution is used to transmit video data, which is 160×120 (@13fps), which can basically achieve real-time video. In actual applications, users can watch the scenery near the (distant) sending end on the LCD of the receiving end. When you see the scenery of interest, press the button and wait for a while to get a 1.3M pixel image, which is convenient and practical. To simplify the design, the system only uses 8-bit color depth and RGB data format, and does not use CCD camera chips or FPGA chips for logic control, saving costs. The following focuses on the wireless video communication system with TMS320VC5402 DSP as the control core, describes in detail the interface design of the two major parts of DSP and camera chip and DSP and RF chip, analyzes the key points in the design, and finally gives some DSP assembly code. 1 Composition and working principle of wireless real-time video system 1.1 Introduction to OV9640 camera chip OV9640 is a high-performance CMOS image sensor chip launched by OmniVision of the United States. It supports 1.3 million pixel image photography and multiple resolutions, including l280×960, VGA, QQVGA, CIF, QCIF, etc. and multiple data output formats, such as Raw RGB, YUV (4:2:2), YcbCr (4:2:2), etc.; supports 8-bit or 16-bit data output; through the SC-CB interface, it can realize various basic functions of image processing, such as exposure control, white balance, color saturation, gamma control, etc.; the chip voltage requirement is low and can be used in embedded mobile devices. 1.2 Introduction to NRF24L01 RF chip NRF24L01 is a single-chip wireless GFSK transceiver chip from Nordic, Norway. It operates in the ISM band of 2.4-2.5 GHz, with a maximum wireless transmission rate of 2Mbps. It uses an SPI interface with the MCU for control and data transmission. Compared with its previous generation product nRF2401, nRF24LOl has better performance and lower power consumption. It can support up to 6 data channels, and each channel supports Enhanced ShockBurst (ESB) technology, with automatic response (AACK) and automatic retransmission (ART) functions, which reduces the burden on the MCU, reduces the packet loss rate of wireless data, and improves the efficiency of two-way transmission. When ESB is turned on, nRF24L01 will automatically switch to the receiving mode after sending the data packet to wait for the other party's response. It will also implement automatic retransmission according to the register settings. 1.3 System Hardware Circuit The hardware circuit consists of two parts: the transmitter (acquisition) end and the receiver (storage and display) end. The wireless link in the 2.4 GHz frequency band is realized through a high-speed RF chip. The transmitter uses the TMS320VC5402 DSP as the control core, the OV9610 camera chip as the video (or image) acquisition front end, the AT29LV1024 Flash ROM as the DSP boot program storage chip, and the K4S161622H IMB capacity SDRAM as the program running space and video data buffer. The video data is finally transmitted through the RF chip nRF24LOl; the hardware structure of the receiver is basically the same as that of the transmitter, and the OV9640 at the front end is replaced with the LCD display at the back end. 1.4 System Working Principle and Flow 1.4.1 The transmitter works in the video stream mode The transmitter uses the DSP as the core control chip. The DSP is powered on and initialized, and the code in the Flash ROM is loaded into the SDRAM through the BootLoader to realize the high-speed operation of the system to speed up the data processing speed, and the HPI interface is set as a general I/O. Then, nRF24L01 is set to the transmission mode through the McBSPO buffered serial port, and the data packet containing the predetermined address is sent out to detect the receiving end. NRF24L01 will automatically switch to the mode of waiting for the response signal. If there is a correct receiving end (the address matches), NRF24L01 notifies the DSP through the INTO interrupt, so that the DSP sets NRF24L01 to the transmission mode again, and immediately initializes the OV9640, implements the SCCB bus through the McBSPl buffered serial port, starts the camera and sets it to the continuous frame mode. The resolution at this time is standard QQVGA, that is, 160×120 (@8bit). Finally, the DSP converts the 8-bit parallel data obtained from D[7:O] into a serial format, and sends it to NRF24L01 through the SDRAM buffer and McBSP0 to transmit the video data. If the correct receiving end is not detected (no INTO interrupt occurs), the DSP will wait for INTO to occur or until the user turns off the power. 1.4.2 The transmitter works in the shooting mode During the video stream transmission, nRF24LOl can monitor the air signal and automatically respond at the same time. If a photo notification is received from the receiver (press the button), OV9640 is set to the standard shooting mode with a resolution of l280×960 (@8bit). Then, DSP sets NRF24L01 to the sending mode and sends out the frame data at this time. After the image data is sent and the confirmation signal is received, the system will return to the video streaming mode. If the reception is unsuccessful, the automatic retransmission function of nRF24LOl will ensure the integrity of the data transmission. 1.4.3 The work flow of the receiving end The power-on initialization of the receiving end is basically the same as that of the sending end, but nRF2dL01 (according to the predetermined address) must be set to the receiving mode to receive the detection signal. After detecting the matching address, the automatic response function of nRF24L0l will send a response signal to the sending end to confirm the receipt of the signal. At this time, the "handshake" between the two parties is successful. Then, the DSP is notified through the INTO interrupt, so that the DSP sets nRF24LOl to the receiving mode again to receive the continuous video stream from the transmitter, and turns on the LCD module to display the video. Finally, the DSP buffers the video stream through SDRAM and sends it to the LCD for display (if the LCD and other back-end modules are parallel interfaces, the data needs to be converted into parallel data format). At this point, the system can realize the wireless transmission of real-time video data, and the resolution of the real-time video stream is QQVGA60×120 (@13fps). During the display of the video stream, if the user presses the photo button, an INTl interrupt is generated to notify the DSP, and the DSP will set nRF24LOl to the sending mode and send a photo notification signal. After receiving the response signal, nRP24L0l returns to the receiving mode to prepare to receive the image data. After the reception is completed, it will automatically send a confirmation signal to indicate that the image data has been successfully received. Finally, the DSP hands the image data to the back-end module for processing. At this point, the system has realized the wireless shooting function of the image, and the photo effect is 1280×960 (@1.3 million pixels), which basically meets the photo requirements. 2 DSP interface design 2.1 Interface design between DSP and OV9640 This chip is controlled by the SCCB bus independently developed by OmniVision, using three-wire connection. SCCB_E is the serial port enable/disable signal line, SIO_C and SIO_D are the serial port clock line and data line respectively. The system only controls OV9640 without knowing its status. The McBSPO port of DSP is used for connection, where HD3 is used to open the serial port, BCLKX0 and HDX0 are used to send clock signals and control data respectively.
无线实时的QQVGA视频和拍摄系统设计.pdf(168.31 KB, downloads: 5)