> Hi Bob, hi Myke, and others interested in ICD > > Another question: > The ICD code do not allow nested routines? According to DS51242A, > a RETURN will cause the clear of the INBUG bit and "warms" peripherals > freezed by FREEZ bit. (I think that more flexible will be if Microchip > creates a new specific instruction, like "RETURN_FROM_ICD" > instead a general-purpose RETURN). Yes, that is how I read it. > Another more interesting thing: > Is necesary to write a GOTO DEBUG_CODE in the configuration zone (at > position > 0x2004)? In certain situation, the PC points to 0x2004 (beyond the program > memory) Yeah, I guess so. But something is fishy here because nothing is being done with PCLATH! > But, I dont understand why, in another situation, if a HALT > signal is asserted the PC points to 0x0001. (Section 2.7 to 2.7.2 ) Its because of the way the breakpoint is implemented. The breakpoint address register is initialized to zero. If external HALT is asserted as we come out of reset the device will automatically take a breakpoint, BUT the breakpoint is always taken AFTER the instruction executes, hence the PC will be 0x0001. That's why mChip tells you to put a NOP in location 0: so that you can really start single stepping your programming from location 0x0001. > What do you have discovered about it? DS51242A is confusing, I think. It certainly is. > Cheers! > Alejandro. > > -- > http://www.piclist.com hint: The list server can filter out subtopics > (like ads or off topics) for you. See http://www.piclist.com/#topics > > -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics