Wouter van Ooijen wrote: >> [ICD2 debugging] >> FAR more powerful than serial debugging. FAR FAR FAR more powerful. > > In some situation yes, but I have an ICD2 at my desk yet I seldom use > it. I often prefer serial logging, because it does not disturb the > timing of the application much (at least not when you limit your > debugging info). And you can do serial logging with any pin you want, a > software UART is not that difficult. Exactly my approach, too. I pretty much never have to step through live code. If there's something that needs stepping through, it's in most cases a small, limited piece of code and a simulator (or a brain :) is way more convenient. (The ICD2 steps really slowly.) My other debugging challenges usually involve the whole application and its realtime behavior together with the process -- and stepping through any of this wouldn't do me much good. Neither does the possibility to set any SFRs seem to be very important to me; the phase to figure out how to configure a new peripheral seems to be quite short. For debugging the realtime application behavior, serial logging is a real godsend; especially if it's already planned into the design. I use debug macros that either insert print statements that can be controlled by bits on a file-by-file basis (each file has eight categories of print statements available) or nothing (for release builds). If during testing I have a certain "question" for a certain piece of code, I just enable one or more of these bits. Of course, sometimes I have to add extra print macros for that (because I didn't anticipate the "question" when writing the code) and re-program the chip, but then to disable these again is just a matter of setting the bit to 0 -- no temporary inserting and removing of debug code necessary. The statements remain available if needed later (or when re-using that piece of code in a different application). I do have an ICD2 here, but for these reasons I pretty much exclusively use it as an ICSP programmer. BTW, there's nothing that says that you can't do a half-duplex serial connection through one pin. What one usually sends back to the processor in such a scenario are simple, slow commands with a few characters (for example to set or clear such a print control bit). Gerhard -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist