Basic LPT pins direction by script
If we need set all 12 LPT outputs to HIGH state (3..5 V) - we must specify this command: 111111111111 ; Turn ON all 12 LEDsIf we connect 12 LEDs to the LPT output pins, we can see such view: ![]() ![]() 000000000000 ; Turn OFF all 12 LEDsThen we get next view on the 12 LEDs panel: ![]() ![]() Now, if we need that all the LEDs are twinkle: CYCLE: ; Define the Label named as "CYCLE" 111111111111 ; Turn ON all 12 LEDs 000000000000 ; Turn OFF all 12 LEDs goto CYCLE ; Goto the "CYCLE" Label (Infinite cycle)Then, we save this sctipt to the file "script.txt" and "Drag and Drop" it to the WndLpt window. Now we get twinkles of LEDs: ![]() ![]() What? Is it flashing too quickly? sleeps 500 ; Specify regular pause between steps (pause = 500 ms) CYCLE: ; Define the Label named as "CYCLE" 111111111111 ; Turn ON all 12 LEDs 000000000000 ; Turn OFF all 12 LEDs goto CYCLE ; Goto the "CYCLE" Label (Infinite cycle) ![]() ![]() Fine. Let's try a more complex script. sleeps 500 ; Specify regular pause between steps (pause = 500 ms) CYCLE: ; Define the Label named as "CYCLE" 100000000000 ; Engage only LED №1 010000000000 ; Engage only LED №2 001000000000 ; Engage only LED №3 000100000000 ; Engage only LED №4 goto CYCLE ; Goto the "CYCLE" Label (Infinite cycle)See: ![]() The end. See also "Extended LPT pins direction".
|