0

I can control 8 pins in LPT using inpout.dll. I want to control some LPT device but I need to use more than 8 pins. How to do it?

example

It can be COM or NET dll. I have no idea how to control more than 8 pins.

Hooch
  • 28,817
  • 29
  • 102
  • 161
  • I don't think this has much to do with programming as it does with hardware. – Robert Koritnik Jan 26 '11 at 15:41
  • 1
    What sort of a LPT port is it... ? Is it a standard LPT that is visibly becoming extinct? Or is it a proprietary board? If its the latter, you'll have to consult with the manufacturer's website.... – t0mm13b Jan 26 '11 at 15:47
  • You cannot effectively control a stepper motor with a PC. Your program will lose the CPU occasionally, you'll stop generating pulses. *Very* bad for the motor. You need a stepper controller. – Hans Passant Jan 26 '11 at 16:26
  • This is board that is connected to pc by LPT. I read about control pinst and strobe pins somewhere. – Hooch Jan 26 '11 at 18:51

2 Answers2

1

MUX maybe?

It can help you manipulate certain amount of bits by using less bits. By using 7 of them you could use the last X to multiplex others:

6 (data) + 1 (selector) => 12 bits
5 + 2 => 20 bits
4 + 3 => 32 bits
3 + 4 => 48 bits
2 + 5 => 64 bits

But this is not a programming question anyway. You will have to attach a multiplexer and a demultiplexer on the other side.

BTW: What kind of an LPT port is this, since [LPT port has lots of pins]. 25 and not just 7 or 8. Your holes for a connector are not really related to LPT port. At least it doesn't really look like they would be. Unless they are serialized. It seems there are 4 LPT ports on your connector + enable, ground & power supply (Vcc)

Robert Koritnik
  • 103,639
  • 52
  • 277
  • 404
  • LPT has 25 pins. 8 data, 8 ground, 4 status, 4 control, 1 unused. Out pins are: data and control. I don't know how to control "contreol pins". – Hooch Jan 26 '11 at 18:54
0

http://www.codeproject.com/KB/vb/Inpout32_read.aspx it's in VB.NET but i'm sure you can figure out how to translate it ;)

Dustin Davis
  • 14,482
  • 13
  • 63
  • 119