Need a better algorithm for my ADC
Let me describe what I'm trying to do. I have a perfectly working signed 7-bit register, so I can avoid all the problems with strictly using analog for things such as health bars. I also have a working analog to digital converter, so I can input values into my digital circuits using batteries. However, the algorithm I'm using puts sequencers in-line within the circuit. For each sequencer, I get one frame of latency. So for a 7-bit register, I am hit with 7 frames of latency everytime I want to convert from analog to digital.
I'm using a simple algorithm where I subtract the input from 64, if the result is positive I carry the original value onto the next bit test. If it is negative (or zero), I set the bit and carry the result onto the next bit test. So for the next bit, I do the same thing but using 32.
So this works perfectly, and I've tested it for all 100 possible inputs. The problem is, I need to support changing the inputs on the fly, and 7 frames of latency is not acceptable. Does anyone have a different algorithm for converting the analog to digital, that wouldn't put test dependencies on the sequencers (this puts them in-line)?