A/D Converter interface circuit, using VC + + provided by the ready-made function, can directly control and read and write standard and the mouth, with no need to open the chassis, low development costs, easy to make and other characteristics.
Keywords computer and port; Analog-to-digital conversion; Vc
Objective
Computer and peripherals connection, there are a variety of interface methods: Serial, USB, SCSI, parallel, and so on, each interface has its advantages and disadvantages, due to the serial and USB interface strong anti-interference ability, transmission distance, so in the data communication, the more use of the above two ways. However, some applications, such as CCD, video data acquisition card, the request of the transmission distance near, this time using parallel interface, and the use of data processing speed as people will increase the demand for more and more.
In addition, when the computer for analog signal detection, the need to configure A/D conversion interface circuit, the commercialization of data acquisition card price is more expensive, and their own development of a traditional data acquisition card requires a lot of knowledge of the reserve, especially related to low-level driver development, the difficulty is relatively large.
Definition of the foot position of a parallel interface
1. Physical Interface Description
Computer adapter or data acquisition card is basically a multi mode control chip, and the work of the adapter can be set in the CMOS. Parallel port working modes are: Standard concurrent Interface (SPP), Simple bidirectional Interface (PS/2), enhanced Parallel Interface (EPP1.9), extended function Interface (ECP), etc.
The physical interface uses the IEEE1284 standard to describe the DSUB25 pin inner hole type connector. Pin signals vary depending on the working mode, and the default work is described in the SPP mode (see table 1).
where s corresponds to the State register, c corresponding control registers, their corresponding addresses are base address (378H) + 1, base (378H) +2.
Table 1 Introduction to physical wiring and output direction in the concurrent Port SPP mode
2. Related Register description
Figure 1 is the control register for the printer adapter, which uses only the lower 5 bits.
Figure 1 Control Registers
Figure 2 is the status register for the printer adapter, which uses only a high of 5 bits.
Figure 2 Status Register
Each of the pins corresponds to the pin as shown in table 1.