Bob Ammerman started this thread with: > > > What is Mchip trying to say here? It looks to me that references to > > > addresses 0x106 and 0x186 only affect the high two order bits of > > PORTB/TRISB > > > while references to 0x006 and 0x086 refer to the entire PORTB/TRISB. > > Perhaps > > > this is only true when in ICD code (INBUG == 1). > > > > > > What do you folks think? Myke Predko noted: > When I was doing the second edition of my PICmicro microcontroller book, I > did some hacking of the ICD Interface and I found that in "ICD mode", all > the hardware registers could be written to, but any changes to them didn't > take effect until *after* a "return" instruction was executed. Bob then wondered: Would this still be the case if 'FREEZE' wasn't specified inthe debug control register? Myke continued on: > While the PICmicro MCU was in ICD mode the only hardware resources that > could be accessed correctly were: > 1. RB6/RB7 via 0x0106. Only the Programming "Data" pin's TRIS bit could be > changed. The Clock bit stayed in input mode. > 2. Program memory flash read/write controls. > 3. ICKBUG and BIGBUG (according to DS51242A - I didn't have this document > when I was playing around with it so I called the registers "Reserve_E" and > "Reserve_F") could be read and written before executing a "return" to return > to the executing application. > 4. STATUS, PCLATH, FSR > 5. All File Registers > > If you are interested in seeing what I found, Take a look at pages 650 to > 652 of the book. On the CD-ROM, in the EMU-II directory, you will find the > source code that I created from the 256 instructions inserted into the ICD > by the controller. Finally, Bob queried: I assume you mean the 256 instructions inserted into the device under test by the ICD? Bob Ammerman RAm Systems (contract development of high performance, high function, low-level software) -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.