Figure 9—The acquisition of the x and y analog values is managed thanks to a five-state machine executed each time the line-batch routine is called (each 65 µs). This allows you to comply with the PIC ADC timing (precharge, conversion, and then read) without losing any time.