10-14-2008 01:22 PM
I caved and bought a PCI 6602 counter card to make my life easier when I want a quick fix but I would still like to get the fast loop to work.
I changed the loop contents to be very simple as suggested here:
while(true){
data_out=[ (i AND 2) =? 0 ]
}
but it is still very slow. I think i can get around 5khz but with significant jitter. I don't have a scope handy but hopefully will get the usb one I ordered off ebay soon to analyze the signal.
Right now, I'm outputting to my linear table and watching the speed of the motor spin and compare it with a PWM output on the counter at the same rate. Can't seem to get similar performance above 5khz.
What other optimizations can I do?
10-14-2008 04:03 PM