Data acquisition of computer-Port with VC + +

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.