Test 1: Observe the level changes of the computer printer port during the startup process
Specific steps: Use the following circuit, connect it to the computer print port, and observe the changes in the brightness of each LED.
Observation results: During the self-test phase of the machine, the 8 LEDs connected to the output port 378H on the printer port kept flashing; during the Windows 98 startup process, these LEDs also flashed a few times. The LEDs were sometimes on and sometimes off, and the naked eye could not tell the pattern. After Windows 98 was started, the LEDs of each machine were also on and off differently.
Observation conclusion: Due to different machine hardware and operating systems, the electrical levels of the output lines of port 378H on the printer port are irregular.
Experiment 2: Write a program to read data from the printer port
Specific steps: Use the programming software Delphi under Windows 98 to write a code to read the data on the printer port: After starting Delphi , put a button button1 in the design form , double-click the button, switch to the code window, and you can see that Delphi has prepared a framework for us:
procedure Tform1.Button1Click(Sender: Tobject);
begin
end;
We add the variable declaration on the line before begin : var t:byte;
Enter the following code between begin and end :
asm
mov
dx , $378
in
al , dx
mov
t , al
end;
form1.Button1.Caption:=inttostr(t);
After running the program, we can read the data of port 378H on the printer port at any time . [page]
Observation results: Taking one time as an example, after pressing button1 , the number displayed on the button is the data read from the port, which is 108. Using the "Calculator" program that comes with Windows , we convert this decimal number into a binary number, which is " 01101100 "; at the same time, we observe that the on and off conditions of the light emitting diodes connected to the printer port are: "off, off, on, off, on, off, on, off".
Observation conclusion: This time the electrical levels of pins 2 to 9 on the print port are: "low-low-high-high-low-high-low".
Test three: Test the input and output current capabilities of the printer port.
Specific steps: Set the pointer multimeter to the 25 mA position, connect the black test lead to a low-level end of the print port, and momentarily touch the red test lead to a high-level end.
Observation results : If the high and low level terminals are directly connected, the current must be greater than 10 mA.
Now let's go back and look at the circuit that is widely circulated on the Internet, which uses the printer port to read and write memory:
In this circuit, in order to provide enough current to the IC , the 4th , 5th , 6th and 7th pins of the printer port may be connected together.
Potential danger: If the circuit is connected to the computer's printer port when the printer port reading and writing software is not started or even when the computer power is not turned on, then there will be a period of time after the computer is turned on when the levels of the 4567 pins on the printer port are high or low. The high level end tries to output current, and the low level tries to absorb current. Who knows when the printer port will be written off! However, if the printer port reading and writing software is started, I measured that the four pins 4567 on the printer port are all high.
The environment in which I conducted the experiment is:
Mingzhi M748MR motherboard, Celeron 400 CPU
Windows 98 SE
The Delphi versions used were 5.0 , 6.0 and 7.0 , and the above programs were all successful.
I secretly felt lucky that I didn't use my newly bought computer for the test, and I was also lucky that my old motherboard didn't break down. What is the rated input and output current of the printer port? Will the above circuit damage the printer port of the computer? I hope the experts can give me some advice!
Long, long ago, on the computer motherboard, the 378H port of the printer port used an IC such as 74LS374 . This IC is relatively strong, and even if it breaks, it can be replaced. But it seems that this IC is no longer found on the current motherboard. If the printer port is broken one day, it will be a big trouble. If audiophiles are still using the above circuit, I suggest that a diode be connected to each pin 4567 on the computer printer port , and the negative lead end of the diode is connected to the Vcc power supply end of 24cxx , so as to completely prevent current backflow!
Previous article:Design of High-Speed Serial Data Acquisition System Based on McBSP
Next article:Design of multi-channel read-write SDRAM interface
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
- Crazy Shell AI open source drone GPIO (remote control indicator light control)
- Where can I get an evaluation board for Toshiba's rice-sized Bluetooth module?
- 16. Low-power intelligent TWS in-ear detection chip VK233DS, Shenzhen Yongjia Microelectronics is the first choice
- [Atria AT32WB415 Series Bluetooth BLE 5.0 MCU] PWM breathing light
- 30V8A stepper motor driver, step angle 1.8 degrees, required accuracy 0.1 degrees, should I choose chip or H bridge
- Can the 66AK2L06 SoC enable miniaturization of test and measurement equipment?
- Circuit diagram of leakage alarm automatic control socket
- How to detect mosquitoes using ultrasonic sensor circuit
- 2021 National College Student Electronics Competition Released
- Share the application manuals, library functions, routines and selection tables of the full range of MM32 MCU products of Lingdong Microelectronics