| ??? 09/13/07 04:09 Read: times |
#144534 - Some suggestions Responding to: ???'s previous message |
Sounds like you've got some noise in the system. I think you require some analog filtering on the a/d input - something like a 10k resistor/10nF capacitor on each input as a low pass filter might help here. A few bypass capacitors between the VCC and 0V wires will also help. Also, rather than do just one adc conversion, do a number of them and average the result - 8 would be a good start. Powers of 2 are always a good choice for the number of samples as the division for the average result becomes a right shift operation rather than a division operation. It is hard to eliminate the 1 bit jitter you get when doing a analog to digital conversion, in your case midi only requires 7 bits so you can shift the 8bit result right to get 7 bits then test to see if there has been a change. This should go a long way to curing your jitter problem. |



