Basic LPT pins direction by script

  • There is 12 output pins in the LPT port.
  • We can use 12 characters to specify required combination of output states.
  • WndLpt allows regularly set a combination of LPT port digital output signals in strict accordance with the script commands.
  • See also "Extended LPT pins direction".

If we need set all 12 LPT outputs to HIGH state (3..5 V) - we must specify this command:
111111111111 ; Turn ON all 12 LEDs
If we connect 12 LEDs to the LPT output pins, we can see such view:
on_l.png
on_r.png
If we need reset all 12 LPT outputs to LOW state (0 V) - we must specify this command:
000000000000 ; Turn OFF all 12 LEDs
Then we get next view on the 12 LEDs panel:
off_l.png
off_r.png

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:
oo.mlh_r.10.gif
oo.mr_r.10.gif

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)
oo.mlh_r.50.gif
oo.mr_r.50.gif

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:
rol_f.mlh_r.gif

The end.

See also "Extended LPT pins direction".