Alberto, assuming you have used the slowest delay possible so that your pulse is not faster than the device you used to test it, then I would believe you might have a problem with your parallel card. I cannot see how the program could cause this problem since the program only tells the processor to send pulses. It does not tell the computer what level to send.
You can use opto isolators and pull up resistors, but be sure this output voltage is not due to something going out on your parallel card or you will have other problems later. If you need to use pull-up resistors, the voltage should be +5 and the resistor should limit the current to the spec of the opto isolator you use. For example, if it you want 10 ma of current, 5V/470 ohm = .0106 amps. Close enough. This is a pretty standard value for these devices.
MP
MP