Take a look here. Key part is Schmitt trigger 7414 in SOT case:
I am looking for suggestions for the best optical switch i should use. It needs to be fast and reliable. It will be seeing up to 1000 pulses per second and connected to the parallel port. It is mounted next to a metal slotted wheel. The ones i am using now start to miss pulses at about 300 pps. Thanks .
I am not sure if I understand. Could I not use an optical switch by itself. I was thinking of using something like OPB917 directly tied to the parallel port.
Most opto's I've used will do well over 1000 pps. What switch are you now using?
I am at work right now and can't remember. It can easily source enough power to put the pin high. It seems to miss pulses at high speeds and I am unsure why.
It is set up as pictured. I have tried a few opto interrupters removed from a newer printer. I have some old dot printers if they would work better.
Try re orienting the output transistor as and open collector output. Connect the emitter of the phototransistor to gnd (v-) and use the collector as your output. The collector will be low when not interupted and can be pulled high via pullup resistor when interupted by your flag.