NF: First-pass implementation of by-direction ADC. Still needs more testing.