Automatically obtain the parallel address

Source: Internet
Author: User

At present, there are few parallel ports in the notebook, but many customers in the measurement equipment industry will also use the parallel port for collection, control, and measurement equipment.

Although there is a USB-to-parallel port, the USB-to-parallel port is based on the simulation of parallel bus on the serial bus. In practice, it is difficult to control the timing of the Parallel Port Pin, so it cannot meet the requirements of high-precision measurement control.

Expresscard to parallel port can solve this problem, but expresscard to the address allocated to the base address is not the same as the PC address, for example, the address of the PC with its own is 378-37f, the extension of the parallel port address may be DC00-DC08. Function on DC00-378 (data port), DC01-379 (input port), DC02-37A (control port ).

 

However, the address of the extension port is uncertain. I have compiled a DLL function to automatically obtain the port address.

 

DLL function description (VC and VB can be called ):

If the port is a self-configured parallel port, the port 378 is returned. If the port is an extended parallel port, the actual address of the parallel port is returned.

 

This function is successfully tested on the expresscard of hengtong brand (the interlace card of hengtong brand is currently the most compatible and mostly used for industrial control.

 

If necessary, contact me. Yangcong_n@126.com

 

 

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.