Mario. wrote: > I have the ultimate goal of reaching 2 milion quadrature output > changes per second from any of the outputs, even 200 thousand per > second is almost good for me. > How does your method help me get to the intended goal? I'm talking > about parallel port of course. > > It will be totally impossible to make a motherboard parallel port output 2 million changes per second. Even if you coded up : loop : outb 0x378 not A outb 0x378 jmp loop
you would only get a little over 1 million changes/second. Even getting 200 KHz output with complex code is very unlikely. You would need to set the interrupt frequency to 200 KHz = 50 us, and then there would be a huge step from 200 KHz down to 100 KHz. It would not be possible to have any frequency between 100 KHz and 200 KHz. You could set the interrupt frequency to 400 KHz or 25 us, but that is near the limit. It only slightly improves the problem. I make a board with step rate generators built into an FPGA. Each generator has a 24-bit counter running at 10 MHz. The computer calculates what the count should be to output a pulse. So, to get 123.456 KHz, you divide 10 million by 123456 and get 81 counts. So, you program 81 into the counter's limit, and you get your step pulses at the desired rate. (Actually, the counter would count up from (2 ^ 24-1) - 81, and when it overflows, that generates the step pulse.) This allows very fine frequency resolution at high step rates, far beyond what you can do with software. Since the steps are generated autonomously from the CPU, the board counts the steps going out, and the CPU can read the current position. There are a few other boards that work in similar ways to do this job. Jon ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ Emc-developers mailing list Emc-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-developers