On Tue, Nov 23, 2010 at 11:52 PM, Bob Axtell wrote: > The way _I_ do debugging on non-ICD2-capable PICs is to connect a piezo > beeper to an unused pin, and beep out in MORSE CODE the value of the ADC > while running. > Hehe, nice one :-) But would not it be better to use a serial line (bit-ban= g or hardware does not matter) to your PC and see debug messages on screen? Tamas > > I track a firmware loop it by first clearing a memory location, then set > bits in it as the PIC cranks through thr code. > > Morse code is very easy to learn, especially just the 126 hex values. > > I'll send some actually-used code if you like. Uses about 50 pgm words > in the PIC12 and PIC16 devices. > > Bob A > > On 11/20/2010 5:38 PM, 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 > > direction > >> 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 > > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > --=20 int main() { char *a,*s,*q; printf(s=3D"int main() { char *a,*s,*q; printf(s=3D%s%s%s, q=3D%s%s%s%s,s,q,q,a=3D%s%s%s%s,q,q,q,a,a,q); }", q=3D"\"",s,q,q,a=3D"\\",q,q,q,a,a,q); } --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .