Menu English Ukrainian russian Home

Free technical library for hobbyists and professionals Free technical library


ENCYCLOPEDIA OF RADIO ELECTRONICS AND ELECTRICAL ENGINEERING
Free library / Schemes of radio-electronic and electrical devices

LPTtest program. Encyclopedia of radio electronics and electrical engineering

Free technical library

Encyclopedia of radio electronics and electrical engineering / Microcontrollers

Comments on the article Comments on the article

The proposed program allows the user to set the desired logical signal level at any output of the computer's printer port and find out the status of any input of this port. It will facilitate the establishment of devices connected to the port.

Radio amateurs design devices that work together with a computer and are connected to it via COM, LPT, less often PCI, ISA, USB, etc. There are many examples [1-5]. These are programmers, emulators, analog-to-digital and digital-to-analog converters and more. Although, due to the wide capabilities of the computer, such devices are much simpler than those that work autonomously, they still need to be checked and adjusted after manufacture.

Testing a device connected to a computer using its working program is far from the best option. Usually, it does not provide functions for displaying the values ​​of signals on the input lines of the interface and their manual change at the output. In rare cases, a special test program is attached to the device (for example, [4]), which serves to check the passage of signals through its circuits. But for testing other hardware, such a program, as a rule, is not suitable.

As a result, the assembled device has to be checked without a computer at all, by applying signals to the interface connector that simulate the operation of a PC, which also cannot be called convenient.

To establish devices connected to the computer's COM port, you can use the program TSOM, which makes it possible to control each output signal of the port separately and monitor the levels of all inputs. The description of this program in [6] led the author to the idea of ​​creating a similar one for the parallel port.

This is how the LPTtest program appeared, capable of monitoring all signals of the LPT port. The program has been tested under Windows 98 and Windows XP, there are no contraindications to work in other versions of Windows.

The program accesses the port registers through the software driver LPTwdmlO [7]. When working under Windows 9x/Me, you will need to install this driver manually: run the Add Hardware Wizard from the Control Panel, select Other Devices in the list that appears and specify the folder where the Iptwdmio.sys and Iptwdmio.inf files are located. After installation is complete, you must restart your computer.

And now - a quote from [7]: "When working on Windows 2000/XP, manual installation is also possible in a similar way. But unlike Windows 98/Me, you definitely won't need to reboot during installation, the driver starts immediately. In addition, manual installation There is one advantage: if the client program was run as a non-administrator user, it will still be able to work with ports through the driver."

And one more quote: "Automatic installation is performed when creating an object for working with the driver in the user program if the program runs on an NT family platform, i.e. Windows NT4/2000/XP and the driver were not previously installed manually. When this does not require any additional actions on the part of the user, but if the program starts on behalf of a user who does not have administrative rights, automatic installation will not occur and the program will not be able to manage ports."

Before running the LPTtest program, be sure to copy the Iptwdmio.sys file to the same folder as the LPTtest.exe file. It should also contain the files LPTpins.jpg (the location of the sockets of the DB-25F socket) and LPThelp.mhtml (help on the LPT interface).

The LPTtest program window is shown in fig. 1. It displays the status of five input, four output lines of the port and eight lines of its data bus. The inscriptions Low (low) or High (high) to the right of each button that changes the state of the output line, and to the right of each name of the input line, shows the current logical signal level on the corresponding connector pin.

LPTtest program

On startup, LPTtest sets all outputs low. The current value of the code in the port data register (DR) displayed in the status line in decimal and hexadecimal number systems is updated by the program at a frequency of 100 Hz.

If you bring the mouse pointer to any button or to the name of the input line, a hint pops up with the number of this pin in the standard DB-25F connector for the LPT port.

To see a connector image similar to that shown in Fig. 2, it is enough to select the item Pinout of the connector in the Help menu. The LPT Interface... item of the same menu will display the contents of the help file. The Select Port menu offers two options in this version of the program: LPT1 (base address 378h) and LPT2 (base address 278h).

LPTtest program

The selected port number will be written to the Config.txt file and read from it the next time the program is started. If such a file does not exist, the program will create it in its folder, choosing the LPT1 port by default.

The Outputs and Inputs radio buttons change the state of the fifth bit of the Port Control Register (CR), thereby transferring the data bus to output mode (set by default) or input. The bus is able to work on input in most modern computers, parallel interface adapters of outdated models do not provide such an opportunity.

When the data bus is configured for input, its lines are connected through the resistors provided in the port controller to a +5 V voltage source. Therefore, the logic level on lines that are not connected to external circuits is perceived as high.

When switching the data bus from input to output, the program automatically sets the value to zero in the DR register, as a result of which all lines of the bus will be driven low. The program performs the same operation when changing the port, at startup and at shutdown.

LPTtest program and all files necessary for its operation

Writer

  1. Balakhtar A. LPT-port powered programmer for KR1878BE1. - Radio, 2004, No. 1, p. 29, 30.
  2. Golubkov A. Programmer MK ATMEL series AT89. - Radio, 2003, No. 9, p. 24, 25.
  3. Mikheev V. Parallel port card for PC. - Radio, 2002, No. 3, p. 19, 20.
  4. Ryumik S. "Parallel" programmer for AT89. - Radio, 2004, No. 2, p. 28-31.
  5. Khabarov A. Two-channel oscilloscope attachment to a PC. - Radio, 2003, No. 4, p. 23-25.
  6. Long A. How to test PonyProg. - Radio, 2003, No. 5, p. 25, 26.
  7. Project LPTwdmlO. -progrex.narod.ru/lptwdmio.html.

Author: A. Vakulenko, Tyumen

See other articles Section Microcontrollers.

Read and write useful comments on this article.

<< Back

Latest news of science and technology, new electronics:

Machine for thinning flowers in gardens 02.05.2024

In modern agriculture, technological progress is developing aimed at increasing the efficiency of plant care processes. The innovative Florix flower thinning machine was presented in Italy, designed to optimize the harvesting stage. This tool is equipped with mobile arms, allowing it to be easily adapted to the needs of the garden. The operator can adjust the speed of the thin wires by controlling them from the tractor cab using a joystick. This approach significantly increases the efficiency of the flower thinning process, providing the possibility of individual adjustment to the specific conditions of the garden, as well as the variety and type of fruit grown in it. After testing the Florix machine for two years on various types of fruit, the results were very encouraging. Farmers such as Filiberto Montanari, who has used a Florix machine for several years, have reported a significant reduction in the time and labor required to thin flowers. ... >>

Advanced Infrared Microscope 02.05.2024

Microscopes play an important role in scientific research, allowing scientists to delve into structures and processes invisible to the eye. However, various microscopy methods have their limitations, and among them was the limitation of resolution when using the infrared range. But the latest achievements of Japanese researchers from the University of Tokyo open up new prospects for studying the microworld. Scientists from the University of Tokyo have unveiled a new microscope that will revolutionize the capabilities of infrared microscopy. This advanced instrument allows you to see the internal structures of living bacteria with amazing clarity on the nanometer scale. Typically, mid-infrared microscopes are limited by low resolution, but the latest development from Japanese researchers overcomes these limitations. According to scientists, the developed microscope allows creating images with a resolution of up to 120 nanometers, which is 30 times higher than the resolution of traditional microscopes. ... >>

Air trap for insects 01.05.2024

Agriculture is one of the key sectors of the economy, and pest control is an integral part of this process. A team of scientists from the Indian Council of Agricultural Research-Central Potato Research Institute (ICAR-CPRI), Shimla, has come up with an innovative solution to this problem - a wind-powered insect air trap. This device addresses the shortcomings of traditional pest control methods by providing real-time insect population data. The trap is powered entirely by wind energy, making it an environmentally friendly solution that requires no power. Its unique design allows monitoring of both harmful and beneficial insects, providing a complete overview of the population in any agricultural area. “By assessing target pests at the right time, we can take necessary measures to control both pests and diseases,” says Kapil ... >>

Random news from the Archive

Artificial embryos from stem cells 16.06.2023

Scientists at the University of Cambridge and the California Institute of Technology conducted an experiment in which they used artificial embryos created from stem cells. This approach can help in the study of genetic disorders, but raises serious ethical and legal problems.

Artificial embryos were grown without the use of eggs and sperm. They do not have a heart or the rudimentary brain, but contain the cells that normally form the placenta and yolk sac.

Professor Magdalena Zernitskaya-Goetz, speaking at the annual meeting of the International Stem Cell Research Society in Boston, said: "We can create models similar to human embryos by reprogramming embryonic stem cells."

However, in the near future, synthetic embryos cannot be used in the clinic, as it violates the law, and it is also not known whether these structures have the potential to develop further after the early stages.

The researchers hope these models will help unlock the mysteries of the "black box" of human development - the period after 14 days from fertilization, which is the legally agreed limit for culturing and studying embryos in the lab.

Robin Lovell-Bedge, Head of Stem Cell Biology and Developmental Genetics at the Francis Crick Institute in London, explains: “The idea is that if we can actually model normal human embryonic development with stem cells, we can get a lot of information about the onset of development. and what can go wrong without using early embryos in research.

Other interesting news:

▪ Alloy with giant barymagnetic effect

▪ The Leader Brain Feature Helps Persuade

▪ The driver is hindered not by a mobile phone in his hands, but by talking on it

▪ Electronic noses for livestock farms

▪ Cause of ringing in the ears

News feed of science and technology, new electronics

 

Interesting materials of the Free Technical Library:

▪ website section LEDs. Article selection

▪ article by James Watson. Biography of a scientist

▪ article What is the Romance group of languages? Detailed answer

▪ Svid's article is silvery. Legends, cultivation, methods of application

▪ article History of metal detectors. Encyclopedia of radio electronics and electrical engineering

▪ article Riddles with weighings and transfusions

Leave your comment on this article:

Name:


Email (optional):


A comment:




Comments on the article:

Tractor driver
Why is there no information on the radio magazine server that the authors refer to that is discussed in the article "Program LPTtect ..."?


All languages ​​of this page

Home page | Library | Articles | Website map | Site Reviews

www.diagram.com.ua

www.diagram.com.ua
2000-2024