G
Hi all,
I made an interface for my parallel PC-port, according to the instructions in The Robot Builder's Bonanza, by Gordon McComb.
When using it under DOS, everything works fine. eg I send 255 to the datalines and all lines go high. When I send 0 all lines go low.
Now follows my problem. I am programming some Windows interface using Delphi. A GUI is much easier to use than a text based program like the one I wrote to use in DOS (using QBasic).
But apparently some bits are forced high by Windows, and others low. When I send 255 to the dataregister, for example, all outputs go high for a very short period of time (blink), and then they go low again, leaving only databits 0 and 6 high. When I want to take all low, bits 0 and 6 go low and immediately high again. As you know this is rather inconvenient: when I want a motor to stop, it has to stop, and not (randomly) turn...
The bits I spoke of go high when Windows is started, so I suppose that Windows is the source of my problem.
For testing, I used an old Olivetti M290. (I don't want to risk blowing up the motherboard of my new computer while testing). Because of limited PC-resources, I used Windows 3.1. I programmes in Delphi 1 (16 bit).
Can anyone tell me why the datalines are forced the way they are (by Windows)? And is there a way around this?
Greetings,
Gert Love
I made an interface for my parallel PC-port, according to the instructions in The Robot Builder's Bonanza, by Gordon McComb.
When using it under DOS, everything works fine. eg I send 255 to the datalines and all lines go high. When I send 0 all lines go low.
Now follows my problem. I am programming some Windows interface using Delphi. A GUI is much easier to use than a text based program like the one I wrote to use in DOS (using QBasic).
But apparently some bits are forced high by Windows, and others low. When I send 255 to the dataregister, for example, all outputs go high for a very short period of time (blink), and then they go low again, leaving only databits 0 and 6 high. When I want to take all low, bits 0 and 6 go low and immediately high again. As you know this is rather inconvenient: when I want a motor to stop, it has to stop, and not (randomly) turn...
The bits I spoke of go high when Windows is started, so I suppose that Windows is the source of my problem.
For testing, I used an old Olivetti M290. (I don't want to risk blowing up the motherboard of my new computer while testing). Because of limited PC-resources, I used Windows 3.1. I programmes in Delphi 1 (16 bit).
Can anyone tell me why the datalines are forced the way they are (by Windows)? And is there a way around this?
Greetings,
Gert Love
