On Sat, 20 Nov 2010, James Newton wrote: > In this specific case: I have a pot connected to AN0 and set so that 2.5v= is > on the pin. Now I want to know exactly what ADC count the chip is reading= so > I can set that as the midpoint in my code and turn the motors one directi= on > when the voltage is lower and the other when it is higher. > > With a debugger, I simply read the ADC output register and I'm done. > > How would you get that value without the debugger? The simulator has a register injection feature that reads hex values from a file that are injected into ADRES over time. -- John W. Temples, III --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .