Preface
CCD (Charge Coupled Device), or charge coupled device, is a new type of solid-state imaging device developed in the early 1970s. With the help of necessary optical systems and appropriate peripheral drive and processing circuits, CCD chips can convert, store and transmit scene images through point-by-point photoelectric signals on the input surface space, generate a time-series video signal at its output end, and synchronously display the image visible to the human eye through the terminal monitor. With the rapid development of CCD technology, the acquisition of CCD signals and how to communicate information with computers after the acquisition have become an important issue in CCD applications. The ability to perform high-speed acquisition of each pixel of the CCD and transmit it to the computer for processing in real time will greatly improve the accuracy of the collected CCD signals and solve the problem of real-time processing.
EPP technology and CPLD technology
EPP technology (Enhanced Parallel Interface Technology) can perform high-speed bidirectional data transmission. It can distinguish two types of information and define them as data and address respectively. It can also achieve high-speed direction conversion, so it is very suitable for the field of data acquisition. EPP can complete the reading and writing of one byte of data, including handshake, in one ISA bus cycle. The data line is bidirectional. One control signal is responsible for determining the direction of the data port, and the other two control signals are used to distinguish the data and address information on the data line. EPP transmission can automatically generate control signals and detect the other party's response. EPP mode supports 4 operations, namely address writing, data writing, address reading and data reading. Data reading and writing are generally used for data transmission between the host and the peripheral, and address reading and writing are generally used for the transmission of address, channel, command and control information. When the EPP mode wants to write a data byte, the data needs to be written to the EPP data register. The write operation will cause the interface to start a complete data write cycle. The hardware of the interface puts the data to be written in D0~D7, and then the interface automatically triggers the handshake signal and detects the response of the peripheral. Reading 1 byte is similar to this. Reading the EPP data register will trigger a complete data read and write cycle. The address transmission process is basically the same as the data transmission process. The base address of EPP is usually 378h, and the addresses used by the interface are 378h to 37fh.
CPLD (Programmable Logic Device) technology can integrate digital circuits into a chip, greatly reducing the size of the circuit board, and its programmability makes the designed circuit very simple and convenient to upgrade and modify. In the acquisition system, the above two technologies will be used and combined with A/D (Analog-to-Digital Converter) and FIFO (First-in-First-out Buffer) to design, which well solves the problem of CCD signal acquisition and processing.
System composition and basic principles
The CCD signal acquisition system consists of the following parts: CCD digital sensor, A/D, FIFO, CPLD, and computer, as shown in Figure 1.
When the A/D receives the CCD signal and converts the voltage value of each pixel of the CCD into a 12-bit digital value, it is sent to the FIFO. The speed mismatch problem between the FIFO and the A/D is solved through the logic control of the CPLD, and the data transmission of the FIFO is controlled to the computer parallel port.
CPLD controls the entire acquisition system, including 2-to-1 data selection circuit, working trigger circuit, CCD integration time selection circuit, and FIFO working state control circuit. The circuit diagram is shown in Figure 2. When the acquisition is ready, the acquisition enable pulse of the CCD initializes each chip of the acquisition card. After that, the acquisition pulse of the CCD sends an acquisition pulse to the AD through the ENCODE terminal of the AD. When the AD completes one acquisition, the DAV sends a high pulse, which serves as the write pulse signal of the FIFO. At the same time, the acquisition pulse also sends a counting pulse to the counter in the digital comparator. The parallel port detects the number of acquisition pulses and read pulses at the same time. When the number of read pulses is less than the number of acquisition pulses, the parallel port reads data from the FIFO. This can ensure that there is no data left in the FIFO, and it can also ensure that the read and write pulses can end in the shortest time, greatly shortening the acquisition time. After one acquisition is completed, wait for the CCD to issue the instruction for the next acquisition. When the parallel port reads data from the FIFO, the data will be read in two parts each time, half of the total number of bits will be read each time, and high and low identification bits will be added so that the computer can identify the high and low bits respectively after the data is read into the computer. [page]
Choosing the right chip in the acquisition system will make the acquisition speed of the acquisition system reach the maximum transmission speed of the parallel port, and the maximum accuracy can reach 14 bits. Since the acquisition system communicates with the computer through the parallel port, it avoids the electromagnetic interference of the computer hardware electronic devices on the acquisition card, so it has good anti-interference performance.
Driver for the acquisition system
VC++ has very powerful underlying operating capabilities. It can easily realize the reading, writing and operation of the parallel port, and it is also very convenient to analyze and process the collected signals later. VC++ encapsulates the dynamic link library (DLL) as the driver of the acquisition system, which mainly encapsulates the following functions.
BOOL PASCAL EXPORT PTC_Open (PTC_HANDLE *phPTC); //Open the parallel port
void PASCAL EXPORT PTC_Close(PTC_HANDLE hPTC); //Close the parallel port
BYTE PASCAL EXPORT PTC_Readdata (PTC_HANDLE hPTC); //Read parallel port data register
void PASCAL EXPORT PTC_Writedata (PTC_HANDLE hPTC, BYTE data); //Write parallel port data register
BYTE PASCAL EXPORT PTC_Readstatus (PTC_HANDLE hPTC); //Read the parallel port status register
BYTE PASCAL EXPORT PTC_Readcontrol (PTC_HANDLE hPTC); //Read parallel port control register
void PASCAL EXPORT PTC_Writecontrol (PTC_HANDLE hPTC, BYTE data); //Write the parallel port control register. The detailed code is not listed one by one due to space constraints.
Conclusion
By utilizing the synchronization of the CCD signal acquisition pulse signal and the data input signal, the acquisition card can realize the acquisition of each pixel of the CCD signal, so that the acquired data can reach a very high precision, and different FIFO reading methods can be realized by flexibly changing the main control circuit of the CPLD to meet the requirements of different jobs. In addition, the speed and precision of the FIFO are very high, and better acquisition effects can be achieved by replacing high-speed, high-precision AD. It is best to communicate with the computer through the parallel port to avoid the influence of the computer's internal circuit on the CCD signal, and also greatly improve the acquisition effect.
Previous article:Design of EPA Field Controller Based on SOPC Technology
Next article:ASIC Implementation of Coordinate Transformation Module in Digital Down Converter
Recommended ReadingLatest update time:2024-11-16 20:24
- Popular Resources
- Popular amplifiers
- Learn CPLD and Verilog HDL programming technology from scratch_Let beginners easily learn CPLD system design technology through practical methods
- Practical Electronic Components and Circuit Basics (4th Edition)_Explanation of basic circuit principles, introduction to electronic components, design of various circuits and practical circuit analysis
- Image acquisition and processing system for panoramic map applications
- Research on plant disease image monitoring system based on DSP
- 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!
- 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
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- ISO7637
- About WiFi module
- MSP430F5438A upgrade failed
- CC2541 (Master UART) - CC2541 (Slave UART) Serial Port Transparent Transmission Experiment
- This is the seminar material.
- PWM output of MSP430 library timer TA
- [RVB2601-demo analysis] CH2601_UART
- Selection of MLCC in Bypass-Decoupling Applications
- Easter egg at the end of the event: Tektronix answers 9 questions from netizens in the USB theme event
- Discuss the voltage problem at a certain point in an op amp circuit