flat assembler
Message board for the users of flat assembler.

Index > Projects and Ideas > LPT output with inpout32.dll

Author
Thread Post new topic Reply to topic
shoorick



Joined: 25 Feb 2005
Posts: 1614
Location: Ukraine
shoorick 14 Mar 2008, 14:13
Hi!

This is a very simple example, how to control LPT output under WinNT-based system from fasm project with inpout32.dll by logix4u


Description:
Filesize: 32.28 KB
Viewed: 19357 Time(s)

lpt_led.gif


Description:
Download
Filename: lpt_led.0.0.4.1.zip
Filesize: 5.4 KB
Downloaded: 1344 Time(s)


_________________
UNICODE forever!


Last edited by shoorick on 31 Oct 2008, 06:08; edited 1 time in total
Post 14 Mar 2008, 14:13
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4330
Location: Now
edfed 14 Mar 2008, 14:20
and then, to drive the leds, just connect them to I/O port LPT. via 560 ohm resistors.

then, you can see the image of bits in real.
Post 14 Mar 2008, 14:20
View user's profile Send private message Visit poster's website Reply with quote
shoorick



Joined: 25 Feb 2005
Posts: 1614
Location: Ukraine
shoorick 14 Mar 2008, 14:25
LPT already has resistors on bus (open collector)
Post 14 Mar 2008, 14:25
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4330
Location: Now
edfed 14 Mar 2008, 14:51
yes, but these resistors are not designed for led driving.

the danger is to have too small resistors, and then, too high current, then, leds will burn.

tested and approuved by myself.

to know the value of the resistors on LPT, shortcut the out put with an amperemeter. the value displayed correspond to the the current in the resistor. mesure the voltage without load, then, you know the resistance by R=U/I

if the resistance is less than 560 ohm, your leds will probably burn if directlly connected. or know a shorter life.

typical resistor for red leds on 5V is 560ohms. but it works with 300 ohms too, more bright, and shorter life.
Post 14 Mar 2008, 14:51
View user's profile Send private message Visit poster's website Reply with quote
shoorick



Joined: 25 Feb 2005
Posts: 1614
Location: Ukraine
shoorick 14 Mar 2008, 14:57
sure, i do not mind resistors. but i have not burn anyone on lpt yet. (maybe because i use old russian leds, which need 220V to be burn out Very Happy)
Post 14 Mar 2008, 14:57
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4330
Location: Now
edfed 14 Mar 2008, 15:17
very probable. can you mail me somes? in france, we don't have this kind of immortal components.
Very Happy
Post 14 Mar 2008, 15:17
View user's profile Send private message Visit poster's website Reply with quote
shoorick



Joined: 25 Feb 2005
Posts: 1614
Location: Ukraine
shoorick 15 Mar 2008, 09:02
sure, i have some Very Happy just do not know how to pack it so it will not be lost at mail Very Happy also, it may look like exporting military technologies Very Happy

here they are in use:
Image

also there is a movie where you can see how do they blink Wink

btw, i have inspected stuff what i have and found these resistors to +5V vary from 33 Ohm to 4700 Ohm, also one old LPT board i have has not OC output - it has TTL output without resistors at all.

sure, this way is just for quick testing without soldering anything - for more complex device there should be more correct electronic schema Wink

regards!


Description: an old russian led in bullet-proof case
Filesize: 15.1 KB
Viewed: 19497 Time(s)

AL102.jpg


Description: all what i have of this kind of LEDs ;)
Filesize: 27.24 KB
Viewed: 19498 Time(s)

AL102_.jpg



_________________
UNICODE forever!
Post 15 Mar 2008, 09:02
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4330
Location: Now
edfed 15 Mar 2008, 10:41
so cute. Very Happy
it reminds me my power amplifier. Laughing

if you want, i can write a shema for you, to build a matrix with the leds.

you need some CMOS or TTL logic too. and a holes-board (plaque à trou).
8*8 survivor dot matrix for LPT. plug and play!!!

or with only 8 leds and a motor, we can have a very long message. i made it a long time ago.
Post 15 Mar 2008, 10:41
View user's profile Send private message Visit poster's website Reply with quote
shoorick



Joined: 25 Feb 2005
Posts: 1614
Location: Ukraine
shoorick 16 Mar 2008, 13:45
thanks, but i'm not sure i'll be interesting with power amplifier soon Smile
i have interest in soldering and have a lot of parts for this as before i've been more interesting with electronics then programming, but last years have no time enough for this.
maybe next time i'll make something another intersting Smile

regards!
Post 16 Mar 2008, 13:45
View user's profile Send private message Visit poster's website Reply with quote
selevo



Joined: 12 Jul 2020
Posts: 5
selevo 12 Jul 2020, 05:43
Thank for you prog!
What about add manual input LPT adress ?
And what ASM, FLATASM?
ECP LPT it's bidirection port, how get DATA (swich pins to input)?
Thank's
Post 12 Jul 2020, 05:43
View user's profile Send private message Reply with quote
shoorick



Joined: 25 Feb 2005
Posts: 1614
Location: Ukraine
shoorick 13 Jul 2020, 08:52
selevo wrote:
What about add manual input LPT adress ?

I'm not sure what do you mean

Quote:
And what ASM, FLATASM?

any language which let you to call function from dll (if you mean inpout32.dll). I've been using fasm.

Quote:
ECP LPT it's bidirection port, how get DATA (swich pins to input)?

I had troubles with ECP (enchanced communicaton port) mode, so, I would suggest to use EPP or just bi-directional mode. Control register (say, 37Ah) has bit5 which has no output pin, but switches data port (378h) into input mode when set.

Also, it seems there are more articles about LPT now than PC with hardware LPT Wink
And I have no currently Windows PC with LPT, but still can use it from Linux (in Linux I have access through C written program)

regards

_________________
UNICODE forever!
Post 13 Jul 2020, 08:52
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.